SubGHz: ScherKhan more informative messages instead of "Unknown"

may be not correct, because we guessing type by bits
This commit is contained in:
MX
2023-03-30 04:51:52 +03:00
parent 37bacdd83d
commit cae1a6cc08
2 changed files with 19 additions and 6 deletions
+1
View File
@@ -1,6 +1,7 @@
### New changes
* Plugins: Show External CC1101 module status in Weather Station and in POCSAG Pager plugins
* SubGHz: Fix false detections of StarLine 72bit, flipper can decode only 64bit
* SubGHz: ScherKhan, more informative messages instead of "Unknown", may be not correct, because we guessing type by bits
* SubGHz: Clear code in "Add Manually" scene (by @gid9798 | PR #403)
* Infrared: Universal remote assets updated (by @amec0e | PR #404)
* Plugins: GPS NMEA (UART) modifications
+18 -6
View File
@@ -220,18 +220,30 @@ static void subghz_protocol_scher_khan_check_remote_controller(
*/
switch(instance->data_count_bit) {
// case 35: //MAGIC CODE, Static
// instance->protocol_name = "MAGIC CODE, Static";
// break;
case 35: //MAGIC CODE, Static
*protocol_name = "MAGIC CODE, Static";
instance->serial = 0;
instance->btn = 0;
instance->cnt = 0;
break;
case 51: //MAGIC CODE, Dynamic
*protocol_name = "MAGIC CODE, Dynamic";
instance->serial = ((instance->data >> 24) & 0xFFFFFF0) | ((instance->data >> 20) & 0x0F);
instance->btn = (instance->data >> 24) & 0x0F;
instance->cnt = instance->data & 0xFFFF;
break;
// case 57: //MAGIC CODE PRO / PRO2
// instance->protocol_name = "MAGIC CODE PRO / PRO2";
// break;
case 57: //MAGIC CODE PRO / PRO2
*protocol_name = "MAGIC CODE PRO / PRO2";
instance->serial = 0;
instance->btn = 0;
instance->cnt = 0;
break;
case 81: //MAGIC CODE PRO / PRO2 Response
*protocol_name = "MAGIC CODE PRO, Response";
instance->serial = 0;
instance->btn = 0;
instance->cnt = 0;
break;
default:
*protocol_name = "Unknown";