Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 154d45d7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add getLnbByName Test in Tuner VTS" into rvc-dev

parents ff07d31b 71a50c31
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -321,6 +321,17 @@ TEST_P(TunerFrontendHidlTest, BlindScanFrontend) {
    mFrontendTests.scanTest(frontendScanArray[SCAN_DVBT], FrontendScanType::SCAN_BLIND);
    mFrontendTests.scanTest(frontendScanArray[SCAN_DVBT], FrontendScanType::SCAN_BLIND);
}
}


TEST_P(TunerLnbHidlTest, OpenLnbByName) {
    description("Open and configure an Lnb with name then send a diseqc msg to it.");
    ASSERT_TRUE(mLnbTests.openLnbByName(lnbArray[LNB_EXTERNAL].name));
    ASSERT_TRUE(mLnbTests.setLnbCallback());
    ASSERT_TRUE(mLnbTests.setVoltage(lnbArray[LNB_EXTERNAL].voltage));
    ASSERT_TRUE(mLnbTests.setTone(lnbArray[LNB_EXTERNAL].tone));
    ASSERT_TRUE(mLnbTests.setSatellitePosition(lnbArray[LNB_EXTERNAL].position));
    ASSERT_TRUE(mLnbTests.sendDiseqcMessage(diseqcMsgArray[DISEQC_POWER_ON]));
    ASSERT_TRUE(mLnbTests.closeLnb());
}

TEST_P(TunerLnbHidlTest, SendDiseqcMessageToLnb) {
TEST_P(TunerLnbHidlTest, SendDiseqcMessageToLnb) {
    description("Open and configure an Lnb with specific settings then send a diseqc msg to it.");
    description("Open and configure an Lnb with specific settings then send a diseqc msg to it.");
    vector<uint32_t> ids;
    vector<uint32_t> ids;
+7 −0
Original line number Original line Diff line number Diff line
@@ -99,6 +99,7 @@ typedef enum {


typedef enum {
typedef enum {
    LNB0,
    LNB0,
    LNB_EXTERNAL,
    LNB_MAX,
    LNB_MAX,
} Lnb;
} Lnb;


@@ -140,6 +141,7 @@ struct FrontendConfig {


struct LnbConfig {
struct LnbConfig {
    bool usingLnb;
    bool usingLnb;
    string name;
    LnbVoltage voltage;
    LnbVoltage voltage;
    LnbTone tone;
    LnbTone tone;
    LnbPosition position;
    LnbPosition position;
@@ -226,6 +228,11 @@ inline void initLnbConfig() {
    lnbArray[LNB0].voltage = LnbVoltage::VOLTAGE_12V;
    lnbArray[LNB0].voltage = LnbVoltage::VOLTAGE_12V;
    lnbArray[LNB0].tone = LnbTone::NONE;
    lnbArray[LNB0].tone = LnbTone::NONE;
    lnbArray[LNB0].position = LnbPosition::UNDEFINED;
    lnbArray[LNB0].position = LnbPosition::UNDEFINED;
    lnbArray[LNB_EXTERNAL].usingLnb = true;
    lnbArray[LNB_EXTERNAL].name = "default_lnb_external";
    lnbArray[LNB_EXTERNAL].voltage = LnbVoltage::VOLTAGE_5V;
    lnbArray[LNB_EXTERNAL].tone = LnbTone::NONE;
    lnbArray[LNB_EXTERNAL].position = LnbPosition::UNDEFINED;
};
};


/** Diseqc messages array for the Lnb test */
/** Diseqc messages array for the Lnb test */