mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-18 19:01:47 +03:00
SubGhz: fix PVS
This commit is contained in:
parent
d4bc0cc10c
commit
aad06fdd43
@ -27,12 +27,12 @@ static uint8_t subghz_scene_radio_settings_next_index_connect_ext_device(
|
||||
SubGhz* subghz,
|
||||
uint8_t current_index) {
|
||||
uint8_t index = 0;
|
||||
for(index = current_index; index < RADIO_DEVICE_COUNT + 1; index++) {
|
||||
for(index = current_index; index < RADIO_DEVICE_COUNT; index++) {
|
||||
if(subghz_txrx_radio_device_is_external_connected(subghz->txrx, radio_device_name[index])) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(index > RADIO_DEVICE_COUNT) index = 0;
|
||||
if(index == RADIO_DEVICE_COUNT) index = 0;
|
||||
return index;
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ bool subghz_scene_set_type_on_event(void* context, SceneManagerEvent event) {
|
||||
case SubmenuIndexDoorHan_433_92:
|
||||
generated_protocol = subghz_txrx_gen_keeloq_protocol(
|
||||
subghz->txrx, "AM650", 433920000, "DoorHan", key, 0x2, 0x0003);
|
||||
if(!generated_protocol) {
|
||||
if(generated_protocol != SubGhzProtocolStatusOk) {
|
||||
furi_string_set(
|
||||
subghz->error_str, "Function requires\nan SD card with\nfresh databases.");
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowError);
|
||||
@ -183,7 +183,7 @@ bool subghz_scene_set_type_on_event(void* context, SceneManagerEvent event) {
|
||||
case SubmenuIndexDoorHan_315_00:
|
||||
generated_protocol = subghz_txrx_gen_keeloq_protocol(
|
||||
subghz->txrx, "AM650", 315000000, "DoorHan", key, 0x2, 0x0003);
|
||||
if(!generated_protocol) {
|
||||
if(generated_protocol != SubGhzProtocolStatusOk) {
|
||||
furi_string_set(
|
||||
subghz->error_str, "Function requires\nan SD card with\nfresh databases.");
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowError);
|
||||
|
Loading…
Reference in New Issue
Block a user