forked from theengs/decoder
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
170 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -150,6 +150,7 @@ class TheengsDecoder { | |
GTAG, | ||
BOSCHNYON, | ||
JAALEE, | ||
APPLEAIRPODS, | ||
APPLEWATCH, | ||
APPLEDEVICE, | ||
IBEACON, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
const char* _APPLEAIRPODS_json = "{\"brand\":\"Apple/Beats\",\"model\":\"AirPods (Pro)/Solo|Studio Buds\",\"model_id\":\"APPLEAIRPODS\",\"tag\":\"1208\",\"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\":[\"0220\",\"AirPods 1st gen.\",\"0e20\",\"AirPods Pro 1st gen.\",\"1420\",\"AirPods Pro 2nd gen.\",\"0320\",\"Powerbeats3\",\"0520\",\"BeatsX\",\"0620\",\"Beats Solo3\"]},\"color\":{\"decoder\":[\"static_value\",\"thus far unknown - please report your color\"]},\"_color\":{\"decoder\":[\"string_from_hex_data\",\"manufacturerdata\",22,2],\"lookup\":[\"00\",\"white\",\"01\",\"black\",\"02\",\"red\",\"03\",\"blue\",\"04\",\"pink\",\"05\",\"gray\",\"06\",\"silver\",\"07\",\"gold\",\"08\",\"rose gold\",\"09\",\"space gray\",\"0a\",\"dark blue\",\"0b\",\"light blue\",\"0c\",\"yellow\"]},\"status\":{\"decoder\":[\"static_value\",\"thus far unknown - please report your status\"]},\"_status\":{\"decoder\":[\"string_from_hex_data\",\"manufacturerdata\",15,1],\"lookup\":[\"5\",\"Both AirPods in case\",\"1\",\"Both AirPods out of case\",\"3\",\"Both AirPods in ears\"]},\"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]},\"lid_open\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",20,2,false,false]},\"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":"1208", | ||
"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":["0220", "AirPods 1st gen.", | ||
"0e20", "AirPods Pro 1st gen.", | ||
"1420", "AirPods Pro 2nd gen.", | ||
"0320", "Powerbeats3", | ||
"0520", "BeatsX", | ||
"0620", "Beats Solo3"] | ||
}, | ||
"color":{ | ||
"decoder":["static_value", "thus far unknown - please report your color"] | ||
}, | ||
"_color":{ | ||
"decoder":["string_from_hex_data", "manufacturerdata", 22, 2], | ||
"lookup":["00", "white", | ||
"01", "black", | ||
"02", "red", | ||
"03", "blue", | ||
"04", "pink", | ||
"05", "gray", | ||
"06", "silver", | ||
"07", "gold", | ||
"08", "rose gold", | ||
"09", "space gray", | ||
"0a", "dark blue", | ||
"0b", "light blue", | ||
"0c", "yellow"] | ||
}, | ||
"status":{ | ||
"decoder":["static_value", "thus far unknown - please report your status"] | ||
}, | ||
"_status":{ | ||
"decoder":["string_from_hex_data", "manufacturerdata", 15, 1], | ||
"lookup":["5", "Both AirPods in case", | ||
"1", "Both AirPods out of case", | ||
"3", "Both AirPods in ears"] | ||
}, | ||
"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] | ||
}, | ||
"lid_open":{ | ||
"decoder":["value_from_hex_data", "manufacturerdata", 20, 2, false, false] | ||
}, | ||
"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_props = "{\"properties\":{\"version\":{\"unit\":\"string\",\"name\":\"model version\"},\"color\":{\"unit\":\"string\",\"name\":\"color\"},\"status\":{\"unit\":\"string\",\"name\":\"status\"},\"batt_r\":{\"unit\":\"%\",\"name\":\"batt\"},\"batt_l\":{\"unit\":\"%\",\"name\":\"batt\"},\"batt_case\":{\"unit\":\"%\",\"name\":\"batt\"},\"lid_open\":{\"unit\":\"int\",\"name\":\"lid open counter\"},\"charging_r\":{\"unit\":\"status\",\"name\":\"battery_charging\"},\"charging_l\":{\"unit\":\"status\",\"name\":\"battery_charging\"},\"charging_case\":{\"unit\":\"status\",\"name\":\"battery_charging\"}}}"; | ||
/*R""""( | ||
{ | ||
"properties":{ | ||
"version":{ | ||
"unit":"string", | ||
"name":"model version" | ||
}, | ||
"color":{ | ||
"unit":"string", | ||
"name":"color" | ||
}, | ||
"status":{ | ||
"unit":"string", | ||
"name":"status" | ||
}, | ||
"batt_r":{ | ||
"unit":"%", | ||
"name":"batt" | ||
}, | ||
"batt_l":{ | ||
"unit":"%", | ||
"name":"batt" | ||
}, | ||
"batt_case":{ | ||
"unit":"%", | ||
"name":"batt" | ||
}, | ||
"lid_open":{ | ||
"unit":"int", | ||
"name":"lid open counter" | ||
}, | ||
"charging_r":{ | ||
"unit":"status", | ||
"name":"battery_charging" | ||
}, | ||
"charging_l":{ | ||
"unit":"status", | ||
"name":"battery_charging" | ||
}, | ||
"charging_case":{ | ||
"unit":"status", | ||
"name":"battery_charging" | ||
} | ||
} | ||
})"""";*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters