mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-20 05:52:22 +02:00
fix(esp_modem): Update the test to exersise CBC parser
This commit is contained in:
@ -31,7 +31,7 @@ int LoopbackTerm::write(uint8_t *data, size_t len)
|
|||||||
} else if (command.find("AT+CGMM\r") != std::string::npos) {
|
} else if (command.find("AT+CGMM\r") != std::string::npos) {
|
||||||
response = "0G Dummy Model\n\r\nOK\r\n";
|
response = "0G Dummy Model\n\r\nOK\r\n";
|
||||||
} else if (command.find("AT+CBC\r") != std::string::npos) {
|
} else if (command.find("AT+CBC\r") != std::string::npos) {
|
||||||
response = is_bg96 ? "+CBC: 1,2,123456V\r\r\n\r\nOK\r\n\n\r\n" :
|
response = is_bg96 ? "+CBC: 1,20,123456\r\r\n\r\nOK\r\n\n\r\n" :
|
||||||
"+CBC: 123.456V\r\r\n\r\nOK\r\n\n\r\n";
|
"+CBC: 123.456V\r\r\n\r\nOK\r\n\n\r\n";
|
||||||
} else if (command.find("AT+CPIN=1234\r") != std::string::npos) {
|
} else if (command.find("AT+CPIN=1234\r") != std::string::npos) {
|
||||||
response = "OK\r\n";
|
response = "OK\r\n";
|
||||||
|
@ -24,7 +24,7 @@ TEST_CASE("DCE AT parser", "[esp_modem]")
|
|||||||
CHECK(dce->get_battery_status(milli_volt, bcl, bcs) == command_result::OK);
|
CHECK(dce->get_battery_status(milli_volt, bcl, bcs) == command_result::OK);
|
||||||
CHECK(milli_volt == 123456);
|
CHECK(milli_volt == 123456);
|
||||||
CHECK(bcl == 1);
|
CHECK(bcl == 1);
|
||||||
CHECK(bcs == 2);
|
CHECK(bcs == 20);
|
||||||
|
|
||||||
int rssi, ber;
|
int rssi, ber;
|
||||||
CHECK(dce->get_signal_quality(rssi, ber) == command_result::OK);
|
CHECK(dce->get_signal_quality(rssi, ber) == command_result::OK);
|
||||||
|
Reference in New Issue
Block a user