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

Commit 15074d90 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add getLnbByName Test in Tuner VTS" into rvc-dev am: 154d45d7

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11732812

Change-Id: I42a261c7fb16bfe1b83811bfd60408dab4783f37
parents 412ee58e 154d45d7
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -321,6 +321,17 @@ TEST_P(TunerFrontendHidlTest, BlindScanFrontend) {
    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) {
    description("Open and configure an Lnb with specific settings then send a diseqc msg to it.");
    vector<uint32_t> ids;
+7 −0
Original line number Diff line number Diff line
@@ -99,6 +99,7 @@ typedef enum {

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

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

struct LnbConfig {
    bool usingLnb;
    string name;
    LnbVoltage voltage;
    LnbTone tone;
    LnbPosition position;
@@ -226,6 +228,11 @@ inline void initLnbConfig() {
    lnbArray[LNB0].voltage = LnbVoltage::VOLTAGE_12V;
    lnbArray[LNB0].tone = LnbTone::NONE;
    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 */