Skip to content

Commit

Permalink
PRMAC
Browse files Browse the repository at this point in the history
  • Loading branch information
DigiH committed Oct 25, 2024
1 parent 6e31be5 commit fba73af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/devices/APPLEAIRPODS_json.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const char* _APPLEAIRPODS_json = "{\"brand\":\"Apple/Beats\",\"model\":\"AirPods (Pro)/Solo|Studio Buds\",\"model_id\":\"APPLEAIRPODS\",\"tag\":\"0b18\",\"condition\":[\"manufacturerdata\",\"index\",8,\"01\",\"&\",\"manufacturerdata\",\"=\",58,\"index\",0,\"4c0007\"],\"properties\":{\"version\":{\"decoder\":[\"static_value\",\"thus far unknown - please report your model version\"]},\"_version\":{\"decoder\":[\"string_from_hex_data\",\"manufacturerdata\",10,4],\"lookup\":[\"0e20\",\"AirPods Pro\",\"0f20\",\"AirPods ?? - please report if correct model version\"]},\"color\":{\"decoder\":[\"static_value\",\"thus far unknown - please report your color\"]},\"_color\":{\"decoder\":[\"string_from_hex_data\",\"manufacturerdata\",21,2],\"lookup\":[\"00\",\"white\"]},\"status\":{\"decoder\":[\"static_value\",\"thus far unknown - please report your status\"]},\"_status\":{\"decoder\":[\"string_from_hex_data\",\"manufacturerdata\",14,2],\"lookup\":[\"55\",\"Both AirPods in case\",\"22\",\"Both AirPods not in case ??\"]},\"batt_r\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",16,1],\"post_proc\":[\"*\",10,\"max\",100]},\"batt_l\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",17,1],\"post_proc\":[\"*\",10,\"max\",100]},\"batt_case\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",19,1],\"post_proc\":[\"*\",10,\"max\",100]},\"charging_r\":{\"decoder\":[\"bit_static_value\",\"manufacturerdata\",18,1,false,true]},\"charging_l\":{\"decoder\":[\"bit_static_value\",\"manufacturerdata\",18,0,false,true]},\"charging_case\":{\"decoder\":[\"bit_static_value\",\"manufacturerdata\",18,2,false,true]}}}";
const char* _APPLEAIRPODS_json = "{\"brand\":\"Apple/Beats\",\"model\":\"AirPods (Pro)/Solo|Studio Buds\",\"model_id\":\"APPLEAIRPODS\",\"tag\":\"0b08\",\"condition\":[\"manufacturerdata\",\"index\",8,\"01\",\"&\",\"manufacturerdata\",\"=\",58,\"index\",0,\"4c0007\"],\"properties\":{\"version\":{\"decoder\":[\"static_value\",\"thus far unknown - please report your model version\"]},\"_version\":{\"decoder\":[\"string_from_hex_data\",\"manufacturerdata\",10,4],\"lookup\":[\"0e20\",\"AirPods Pro\",\"0f20\",\"AirPods ?? - please report if correct model version\"]},\"color\":{\"decoder\":[\"static_value\",\"thus far unknown - please report your color\"]},\"_color\":{\"decoder\":[\"string_from_hex_data\",\"manufacturerdata\",21,2],\"lookup\":[\"00\",\"white\"]},\"status\":{\"decoder\":[\"static_value\",\"thus far unknown - please report your status\"]},\"_status\":{\"decoder\":[\"string_from_hex_data\",\"manufacturerdata\",14,2],\"lookup\":[\"55\",\"Both AirPods in case\",\"22\",\"Both AirPods not in case ??\"]},\"batt_r\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",16,1],\"post_proc\":[\"*\",10,\"max\",100]},\"batt_l\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",17,1],\"post_proc\":[\"*\",10,\"max\",100]},\"batt_case\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",19,1],\"post_proc\":[\"*\",10,\"max\",100]},\"charging_r\":{\"decoder\":[\"bit_static_value\",\"manufacturerdata\",18,1,false,true]},\"charging_l\":{\"decoder\":[\"bit_static_value\",\"manufacturerdata\",18,0,false,true]},\"charging_case\":{\"decoder\":[\"bit_static_value\",\"manufacturerdata\",18,2,false,true]}}}";
/*R""""(
{
"brand":"Apple/Beats",
"model":"AirPods (Pro)/Solo|Studio Buds",
"model_id":"APPLEAIRPODS",
"tag":"0b18",
"tag":"0b08",
"condition":["manufacturerdata", "index", 8, "01", "&", "manufacturerdata","=", 58, "index", 0, "4c0007"],
"properties":{
"version":{
Expand Down
10 changes: 5 additions & 5 deletions tests/BLE/test_ble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ const char* expected_mfg[] = {
"{\"brand\":\"Onset\",\"model\":\"Hobo Water Level Sensor\",\"model_id\":\"HOBOMX2001\",\"type\":\"UNIQ\",\"lvl_cm\":8.46760273,\"lvl_in\":3.333701862}",
"{\"brand\":\"Onset\",\"model\":\"Hobo Water Level Sensor\",\"model_id\":\"HOBOMX2001\",\"type\":\"UNIQ\",\"lvl_cm\":9.514185786,\"lvl_in\":3.745742436}",
"{\"brand\":\"SwitchBot\",\"model\":\"Outdoor Meter\",\"model_id\":\"W340001X\",\"type\":\"THB\",\"tempc\":25.5,\"tempf\":77.9,\"hum\":50,\"mac\":\"AA:BB:CC:DD:EE:FF\"}",
"{\"brand\":\"Apple/Beats\",\"model\":\"AirPods (Pro)/Solo|Studio Buds\",\"model_id\":\"APPLEAIRPODS\",\"type\":\"BODY\",\"track\":true,\"prmac\":true,\"version\":\"AirPods Pro\",\"color\":\"white\",\"status\":\"Both AirPods not in case ??\",\"batt_r\":100,\"batt_l\":50,\"batt_case\":100,\"charging_r\":false,\"charging_l\":false,\"charging_case\":false}",
"{\"brand\":\"Apple/Beats\",\"model\":\"AirPods (Pro)/Solo|Studio Buds\",\"model_id\":\"APPLEAIRPODS\",\"type\":\"BODY\",\"track\":true,\"prmac\":true,\"version\":\"thus far unknown - please report your model version\",\"color\":\"thus far unknown - please report your color\",\"status\":\"thus far unknown - please report your status\",\"batt_r\":90,\"batt_l\":90,\"batt_case\":100,\"charging_r\":false,\"charging_l\":false,\"charging_case\":false}",
"{\"brand\":\"Apple/Beats\",\"model\":\"AirPods (Pro)/Solo|Studio Buds\",\"model_id\":\"APPLEAIRPODS\",\"type\":\"BODY\",\"track\":true,\"prmac\":true,\"version\":\"thus far unknown - please report your model version\",\"color\":\"thus far unknown - please report your color\",\"status\":\"thus far unknown - please report your status\",\"batt_r\":0,\"batt_l\":20,\"batt_case\":0,\"charging_r\":false,\"charging_l\":false,\"charging_case\":false}",
"{\"brand\":\"Apple/Beats\",\"model\":\"AirPods (Pro)/Solo|Studio Buds\",\"model_id\":\"APPLEAIRPODS\",\"type\":\"BODY\",\"track\":true,\"prmac\":true,\"version\":\"AirPods ?? - please report if correct model version\",\"color\":\"white\",\"status\":\"Both AirPods not in case ??\",\"batt_r\":100,\"batt_l\":70,\"batt_case\":100,\"charging_r\":false,\"charging_l\":false,\"charging_case\":false}",
"{\"brand\":\"Apple/Beats\",\"model\":\"AirPods (Pro)/Solo|Studio Buds\",\"model_id\":\"APPLEAIRPODS\",\"type\":\"BODY\",\"track\":true,\"prmac\":true,\"version\":\"AirPods Pro\",\"color\":\"white\",\"status\":\"thus far unknown - please report your status\",\"batt_r\":100,\"batt_l\":90,\"batt_case\":100,\"charging_r\":false,\"charging_l\":false,\"charging_case\":false}",
"{\"brand\":\"Apple/Beats\",\"model\":\"AirPods (Pro)/Solo|Studio Buds\",\"model_id\":\"APPLEAIRPODS\",\"type\":\"BODY\",\"track\":true,\"version\":\"AirPods Pro\",\"color\":\"white\",\"status\":\"Both AirPods not in case ??\",\"batt_r\":100,\"batt_l\":50,\"batt_case\":100,\"charging_r\":false,\"charging_l\":false,\"charging_case\":false}",
"{\"brand\":\"Apple/Beats\",\"model\":\"AirPods (Pro)/Solo|Studio Buds\",\"model_id\":\"APPLEAIRPODS\",\"type\":\"BODY\",\"track\":true,\"version\":\"thus far unknown - please report your model version\",\"color\":\"thus far unknown - please report your color\",\"status\":\"thus far unknown - please report your status\",\"batt_r\":90,\"batt_l\":90,\"batt_case\":100,\"charging_r\":false,\"charging_l\":false,\"charging_case\":false}",
"{\"brand\":\"Apple/Beats\",\"model\":\"AirPods (Pro)/Solo|Studio Buds\",\"model_id\":\"APPLEAIRPODS\",\"type\":\"BODY\",\"track\":true,\"version\":\"thus far unknown - please report your model version\",\"color\":\"thus far unknown - please report your color\",\"status\":\"thus far unknown - please report your status\",\"batt_r\":0,\"batt_l\":20,\"batt_case\":0,\"charging_r\":false,\"charging_l\":false,\"charging_case\":false}",
"{\"brand\":\"Apple/Beats\",\"model\":\"AirPods (Pro)/Solo|Studio Buds\",\"model_id\":\"APPLEAIRPODS\",\"type\":\"BODY\",\"track\":true,\"version\":\"AirPods ?? - please report if correct model version\",\"color\":\"white\",\"status\":\"Both AirPods not in case ??\",\"batt_r\":100,\"batt_l\":70,\"batt_case\":100,\"charging_r\":false,\"charging_l\":false,\"charging_case\":false}",
"{\"brand\":\"Apple/Beats\",\"model\":\"AirPods (Pro)/Solo|Studio Buds\",\"model_id\":\"APPLEAIRPODS\",\"type\":\"BODY\",\"track\":true,\"version\":\"AirPods Pro\",\"color\":\"white\",\"status\":\"thus far unknown - please report your status\",\"batt_r\":100,\"batt_l\":90,\"batt_case\":100,\"charging_r\":false,\"charging_l\":false,\"charging_case\":false}",
};

const char* expected_name_uuid_mfgsvcdata[] = {
Expand Down

0 comments on commit fba73af

Please sign in to comment.