diff --git a/src/devices/Skale_json.h b/src/devices/Skale_json.h index 8557d5c1..5603f42e 100644 --- a/src/devices/Skale_json.h +++ b/src/devices/Skale_json.h @@ -1,4 +1,4 @@ -const char* _Skale_json = "{\"brand\":\"Atomax\",\"model\":\"Skale I/II\",\"model_id\":\"SKALE\",\"tag\":\"0501\",\"condition\":[\"manufacturerdata\",\"=\",12,\"index\",0,\"ef81\"],\"properties\":{\"weight\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",4,4,true,false],\"post_proc\":[\"/\",10]}}}"; +const char* _Skale_json = "{\"brand\":\"Atomax\",\"model\":\"Skale I/II\",\"model_id\":\"SKALE\",\"tag\":\"0501\",\"condition\":[\"manufacturerdata\",\"=\",12,\"index\",0,\"ef81\"],\"properties\":{\"weight\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",4,4,true,true],\"post_proc\":[\"/\",10]}}}"; /*R""""( { "brand":"Atomax", @@ -8,7 +8,7 @@ const char* _Skale_json = "{\"brand\":\"Atomax\",\"model\":\"Skale I/II\",\"mode "condition":["manufacturerdata", "=", 12, "index", 0, "ef81"], "properties":{ "weight":{ - "decoder":["value_from_hex_data", "manufacturerdata", 4, 4, true, false], + "decoder":["value_from_hex_data", "manufacturerdata", 4, 4, true, true], "post_proc":["/", 10] } } diff --git a/tests/BLE/test_ble.cpp b/tests/BLE/test_ble.cpp index 4a328eea..453d2315 100644 --- a/tests/BLE/test_ble.cpp +++ b/tests/BLE/test_ble.cpp @@ -110,6 +110,7 @@ const char* expected_mfg[] = { "{\"brand\":\"Polar\",\"model\":\"Heart Rate Sensor\",\"model_id\":\"H10\",\"type\":\"BODY\",\"bpm\":104}", "{\"brand\":\"Atomax\",\"model\":\"Skale I/II\",\"model_id\":\"SKALE\",\"type\":\"SCALE\",\"cidc\":false,\"weight\":123.9}", "{\"brand\":\"Atomax\",\"model\":\"Skale I/II\",\"model_id\":\"SKALE\",\"type\":\"SCALE\",\"cidc\":false,\"weight\":29.6}", + "{\"brand\":\"Atomax\",\"model\":\"Skale I/II\",\"model_id\":\"SKALE\",\"type\":\"SCALE\",\"cidc\":false,\"weight\":-92.8}", }; const char* expected_name_uuid_mfgsvcdata[] = { @@ -381,6 +382,7 @@ const char* test_mfgdata[][3] = { {"Polar", "Polar H10 75087320", "6b002f166b68"}, {"Atomax", "Skale I/II", "ef81d70400ff"}, {"Atomax", "Skale I/II", "ef81280100ff"}, + {"Atomax", "Skale I/II", "ef8160fcffff"}, }; TheengsDecoder::BLE_ID_NUM test_mfgdata_id_num[]{ @@ -473,6 +475,7 @@ TheengsDecoder::BLE_ID_NUM test_mfgdata_id_num[]{ TheengsDecoder::BLE_ID_NUM::PH10, TheengsDecoder::BLE_ID_NUM::SKALE, TheengsDecoder::BLE_ID_NUM::SKALE, + TheengsDecoder::BLE_ID_NUM::SKALE, }; // uuid test input [test name] [device name] [uuid] [manufacturer data] [service data]