Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #3141: 12-bits is 0xFFF (or 0xFF0) CAME/NICE 12-bit #3142

Merged
merged 3 commits into from
Oct 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions applications/main/subghz/scenes/subghz_scene_set_type.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ bool subghz_scene_set_type_on_event(void* context, SceneManagerEvent event) {
subghz->txrx, "AM650", 315000000, SUBGHZ_PROTOCOL_PRINCETON_NAME, key, 24, 400);
break;
case SubmenuIndexNiceFlo12bit:
key = (key & 0x0000FFF0) | 0x1; //btn 0x1, 0x2, 0x4
key = (key & 0x00000FF0) | 0x1; //btn 0x1, 0x2, 0x4
generated_protocol = subghz_txrx_gen_data_protocol(
subghz->txrx, "AM650", 433920000, SUBGHZ_PROTOCOL_NICE_FLO_NAME, key, 12);
break;
Expand All @@ -144,7 +144,7 @@ bool subghz_scene_set_type_on_event(void* context, SceneManagerEvent event) {
subghz->txrx, "AM650", 433920000, SUBGHZ_PROTOCOL_NICE_FLO_NAME, key, 24);
break;
case SubmenuIndexCAME12bit:
key = (key & 0x0000FFF0) | 0x1; //btn 0x1, 0x2, 0x4
key = (key & 0x00000FF0) | 0x1; //btn 0x1, 0x2, 0x4
generated_protocol = subghz_txrx_gen_data_protocol(
subghz->txrx, "AM650", 433920000, SUBGHZ_PROTOCOL_CAME_NAME, key, 12);
break;
Expand Down Expand Up @@ -198,14 +198,17 @@ bool subghz_scene_set_type_on_event(void* context, SceneManagerEvent event) {
subghz_txrx_gen_secplus_v1_protocol(subghz->txrx, "AM650", 390000000);
break;
case SubmenuIndexSecPlus_v2_310_00:
key = (key & 0x7FFFF3FC); // 850LM pairing
generated_protocol = subghz_txrx_gen_secplus_v2_protocol(
subghz->txrx, "AM650", 310000000, key, 0x68, 0xE500000);
break;
case SubmenuIndexSecPlus_v2_315_00:
key = (key & 0x7FFFF3FC); // 850LM pairing
generated_protocol = subghz_txrx_gen_secplus_v2_protocol(
subghz->txrx, "AM650", 315000000, key, 0x68, 0xE500000);
break;
case SubmenuIndexSecPlus_v2_390_00:
key = (key & 0x7FFFF3FC); // 850LM pairing
generated_protocol = subghz_txrx_gen_secplus_v2_protocol(
subghz->txrx, "AM650", 390000000, key, 0x68, 0xE500000);
break;
Expand Down