Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
openshwprojects committed Dec 9, 2024
1 parent 6e176a3 commit 6acd938
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/selftest/selftest_tuyaMCU.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,18 +593,20 @@ void Test_TuyaMCU_Basic() {
CMD_ExecuteCommand("uartFakeHex 55AA03070014060000080916000099000023010200040000000310", 0);
// above command will just put into buffer - need at least a frame to parse it
Sim_RunFrames(100, false);
SELFTEST_ASSERT_CHANNEL(40, 2326);
SELFTEST_ASSERT_CHANNEL(41, 153);
SELFTEST_ASSERT_CHANNEL(42, 35);
SELFTEST_ASSERT_CHANNEL(40, 2326);// voltage
SELFTEST_ASSERT_CHANNEL(41, 153);// current
SELFTEST_ASSERT_CHANNEL(42, 35);// power

// this will write to channel 45, 46 and 47
CMD_ExecuteCommand("linkTuyaMCUOutputToChannel 8 RAW_TAC2121C_VCP 45", 0);
CMD_ExecuteCommand("uartFakeHex 55 AA 03 07 00 0C 08 00 00 08 09 01 00 01 2E 00 00 43 A1 ", 0);
// above command will just put into buffer - need at least a frame to parse it
Sim_RunFrames(100, false);
SELFTEST_ASSERT_CHANNEL(45, 2305);
SELFTEST_ASSERT_CHANNEL(46, 302);
SELFTEST_ASSERT_CHANNEL(47, 67);
SELFTEST_ASSERT_CHANNEL(45, 2305); // voltage
SELFTEST_ASSERT_CHANNEL(46, 302);// current
SELFTEST_ASSERT_CHANNEL(47, 67); // power

SIM_ClearUART();
}

#endif

0 comments on commit 6acd938

Please sign in to comment.