Skip to content

Commit

Permalink
Update test_ble.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
1technophile committed Apr 8, 2024
1 parent ce50613 commit e15f153
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/BLE/test_ble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ const char* expected_name_uuid_mfgsvcdata[] = {
"{\"brand\":\"Sensor Easy\",\"model\":\"SE RHT\",\"model_id\":\"SE_RHT\",\"type\":\"THB\",\"hum\":47,\"volt\":3.097}",
"{\"brand\":\"Sensor Easy\",\"model\":\"SE TEMP PROBE\",\"model_id\":\"SE_TPROBE\",\"type\":\"THB\",\"tempc\":20.6,\"tempf\":69.08,\"volt\":3.044}",
"{\"brand\":\"Sensor Easy\",\"model\":\"SE MAG\",\"model_id\":\"SE_MAG\",\"type\":\"CTMO\",\"cont\":true,\"open\":false,\"volt\":3.079}",
"{\"brand\":\"Sensor Easy\",\"model\":\"SE TEMP\",\"model_id\":\"SE_TEMP\",\"type\":\"THB\",\"volt\":3.074}",
"{\"brand\":\"SwitchBot\",\"model\":\"Blind Tilt\",\"model_id\":\"W270160X\",\"type\":\"WCVR\",\"acts\":true,\"open\":30,\"direction\":\"up\",\"motion\":false,\"calibrated\":true,\"lightlevel\":2,\"batt\":60,\"mac\":\"AA:BB:CC:DD:EE:FF\"}",
"{\"brand\":\"SwitchBot\",\"model\":\"Blind Tilt\",\"model_id\":\"W270160X\",\"type\":\"WCVR\",\"acts\":true,\"open\":0,\"direction\":\"up\",\"motion\":false,\"calibrated\":true,\"lightlevel\":2,\"batt\":72,\"mac\":\"AA:BB:CC:DD:EE:FF\"}",
"{\"brand\":\"SwitchBot\",\"model\":\"Blind Tilt\",\"model_id\":\"W270160X\",\"type\":\"WCVR\",\"acts\":true,\"open\":100,\"direction\":\"\",\"motion\":false,\"calibrated\":true,\"lightlevel\":2,\"batt\":54,\"mac\":\"AA:BB:CC:DD:EE:FF\"}",
Expand Down Expand Up @@ -230,7 +231,6 @@ const char* expected_uuid_name_svcdata[] = {
"{\"brand\":\"Sensor Easy\",\"model\":\"SE TEMP PROBE\",\"model_id\":\"SE_TPROBE\",\"type\":\"THB\",\"tempc\":20.7,\"tempf\":69.26}",
"{\"brand\":\"Sensor Easy\",\"model\":\"SE MAG\",\"model_id\":\"SE_MAG\",\"type\":\"CTMO\",\"open\":true,\"cont\":true}",
"{\"brand\":\"Sensor Easy\",\"model\":\"SE MAG\",\"model_id\":\"SE_MAG\",\"type\":\"CTMO\",\"open\":false,\"cont\":true}",
"{\"brand\":\"Sensor Easy\",\"model\":\"SE TEMP\",\"model_id\":\"SE_TEMP\",\"type\":\"THB\"}",
};

const char* expected_uuid[] = {
Expand Down Expand Up @@ -725,6 +725,7 @@ const char* test_name_uuid_mfgsvcdata[][5] = {
{"SE RHT volt","P RHT 88888B","0x2a6f","5707f2190c","2f"},
{"SE TEMP PROBE","P TPROBE 000000","0x2a6e","5707f2e40b","0c08"},
{"SE MAG","P MAG CCCCCC","0x2a06","5707f2070c","3b00"},
{"SE TEMP wrong svc data","P T EN 888888","0x2a6e","5707f2020c","ff7f"},
{"Switchbot_BlindTilt", "WoBlindTilt", "0xfd3d", "6909aabbccddeeff0d275514", "78003c"},
{"Switchbot_BlindTilt", "WoBlindTilt", "0xfd3d", "6909aabbccddeeffd5256414", "780048"},
{"Switchbot_BlindTilt", "WoBlindTilt", "0xfd3d", "6909aabbccddeeffd8253214", "780036"},
Expand All @@ -749,6 +750,7 @@ TheengsDecoder::BLE_ID_NUM test_name_uuid_mfgsvcdata_id_num[]{
TheengsDecoder::BLE_ID_NUM::SE_RHT,
TheengsDecoder::BLE_ID_NUM::SE_TPROBE,
TheengsDecoder::BLE_ID_NUM::SE_MAG,
TheengsDecoder::BLE_ID_NUM::SE_TEMP,
TheengsDecoder::BLE_ID_NUM::SBBT,
TheengsDecoder::BLE_ID_NUM::SBBT,
TheengsDecoder::BLE_ID_NUM::SBBT,
Expand Down Expand Up @@ -823,7 +825,6 @@ const char* test_uuid_name_svcdata[][4] = {
{"SE TEMP PROBE temp","0x2a6e","P TPROBE 111999","1608"},
{"SE MAG Open","0x2a06","P MAG CCCCCC","2400"},
{"SE MAG Closed","0x2a06","P MAG CCCCCC","2900"},
{"SE TEMP wrong svc data","0x2a6e","P T EN 888888","ff7f"},
};

TheengsDecoder::BLE_ID_NUM test_uuid_name_svcdata_id_num[]{
Expand Down Expand Up @@ -866,7 +867,6 @@ TheengsDecoder::BLE_ID_NUM test_uuid_name_svcdata_id_num[]{
TheengsDecoder::BLE_ID_NUM::SE_TPROBE,
TheengsDecoder::BLE_ID_NUM::SE_MAG,
TheengsDecoder::BLE_ID_NUM::SE_MAG,
TheengsDecoder::BLE_ID_NUM::SE_TEMP,
};

// uuid test input [test name] [uuid] [data source] [data]
Expand Down

0 comments on commit e15f153

Please sign in to comment.