Fix SubGhz test views erratic behavior on mode switch. New bootloader image. (#669)
* Assets: add bootloader DFU icon. * SubGhz: locking model in test views, wait for calibration complete on frequency change.
This commit is contained in:
parent
153666f73f
commit
dd8a90957f
@ -139,7 +139,7 @@ SubghzStatic* subghz_static_alloc() {
|
|||||||
|
|
||||||
// View allocation and configuration
|
// View allocation and configuration
|
||||||
instance->view = view_alloc();
|
instance->view = view_alloc();
|
||||||
view_allocate_model(instance->view, ViewModelTypeLockFree, sizeof(SubghzStaticModel));
|
view_allocate_model(instance->view, ViewModelTypeLocking, sizeof(SubghzStaticModel));
|
||||||
view_set_context(instance->view, instance);
|
view_set_context(instance->view, instance);
|
||||||
view_set_draw_callback(instance->view, (ViewDrawCallback)subghz_static_draw);
|
view_set_draw_callback(instance->view, (ViewDrawCallback)subghz_static_draw);
|
||||||
view_set_input_callback(instance->view, subghz_static_input);
|
view_set_input_callback(instance->view, subghz_static_input);
|
||||||
|
@ -71,41 +71,37 @@ bool subghz_test_carrier_input(InputEvent* event, void* context) {
|
|||||||
furi_assert(context);
|
furi_assert(context);
|
||||||
SubghzTestCarrier* subghz_test_carrier = context;
|
SubghzTestCarrier* subghz_test_carrier = context;
|
||||||
|
|
||||||
if(event->key == InputKeyBack) {
|
if(event->key == InputKeyBack || event->type != InputTypeShort) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
with_view_model(
|
with_view_model(
|
||||||
subghz_test_carrier->view, (SubghzTestCarrierModel * model) {
|
subghz_test_carrier->view, (SubghzTestCarrierModel * model) {
|
||||||
osTimerStop(subghz_test_carrier->timer);
|
|
||||||
furi_hal_subghz_idle();
|
furi_hal_subghz_idle();
|
||||||
|
|
||||||
if(event->type == InputTypeShort) {
|
if(event->key == InputKeyLeft) {
|
||||||
if(event->key == InputKeyLeft) {
|
if(model->frequency > 0) model->frequency--;
|
||||||
if(model->frequency > 0) model->frequency--;
|
} else if(event->key == InputKeyRight) {
|
||||||
} else if(event->key == InputKeyRight) {
|
if(model->frequency < subghz_frequencies_count - 1) model->frequency++;
|
||||||
if(model->frequency < subghz_frequencies_count - 1) model->frequency++;
|
} else if(event->key == InputKeyDown) {
|
||||||
} else if(event->key == InputKeyDown) {
|
if(model->path > 0) model->path--;
|
||||||
if(model->path > 0) model->path--;
|
} else if(event->key == InputKeyUp) {
|
||||||
} else if(event->key == InputKeyUp) {
|
if(model->path < FuriHalSubGhzPath868) model->path++;
|
||||||
if(model->path < FuriHalSubGhzPath868) model->path++;
|
} else if(event->key == InputKeyOk) {
|
||||||
} else if(event->key == InputKeyOk) {
|
if(model->status == SubghzTestCarrierModelStatusTx) {
|
||||||
if(model->status == SubghzTestCarrierModelStatusTx) {
|
model->status = SubghzTestCarrierModelStatusRx;
|
||||||
model->status = SubghzTestCarrierModelStatusRx;
|
} else {
|
||||||
} else {
|
model->status = SubghzTestCarrierModelStatusTx;
|
||||||
model->status = SubghzTestCarrierModelStatusTx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
model->real_frequency =
|
|
||||||
furi_hal_subghz_set_frequency(subghz_frequencies[model->frequency]);
|
|
||||||
furi_hal_subghz_set_path(model->path);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model->real_frequency =
|
||||||
|
furi_hal_subghz_set_frequency(subghz_frequencies[model->frequency]);
|
||||||
|
furi_hal_subghz_set_path(model->path);
|
||||||
|
|
||||||
if(model->status == SubghzTestCarrierModelStatusRx) {
|
if(model->status == SubghzTestCarrierModelStatusRx) {
|
||||||
hal_gpio_init(&gpio_cc1101_g0, GpioModeInput, GpioPullNo, GpioSpeedLow);
|
hal_gpio_init(&gpio_cc1101_g0, GpioModeInput, GpioPullNo, GpioSpeedLow);
|
||||||
furi_hal_subghz_rx();
|
furi_hal_subghz_rx();
|
||||||
osTimerStart(subghz_test_carrier->timer, 1024 / 4);
|
|
||||||
} else {
|
} else {
|
||||||
hal_gpio_init(&gpio_cc1101_g0, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow);
|
hal_gpio_init(&gpio_cc1101_g0, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow);
|
||||||
hal_gpio_write(&gpio_cc1101_g0, true);
|
hal_gpio_write(&gpio_cc1101_g0, true);
|
||||||
@ -159,8 +155,11 @@ void subghz_test_carrier_rssi_timer_callback(void* context) {
|
|||||||
|
|
||||||
with_view_model(
|
with_view_model(
|
||||||
subghz_test_carrier->view, (SubghzTestCarrierModel * model) {
|
subghz_test_carrier->view, (SubghzTestCarrierModel * model) {
|
||||||
model->rssi = furi_hal_subghz_get_rssi();
|
if(model->status == SubghzTestCarrierModelStatusRx) {
|
||||||
return true;
|
model->rssi = furi_hal_subghz_get_rssi();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,7 +169,7 @@ SubghzTestCarrier* subghz_test_carrier_alloc() {
|
|||||||
// View allocation and configuration
|
// View allocation and configuration
|
||||||
subghz_test_carrier->view = view_alloc();
|
subghz_test_carrier->view = view_alloc();
|
||||||
view_allocate_model(
|
view_allocate_model(
|
||||||
subghz_test_carrier->view, ViewModelTypeLockFree, sizeof(SubghzTestCarrierModel));
|
subghz_test_carrier->view, ViewModelTypeLocking, sizeof(SubghzTestCarrierModel));
|
||||||
view_set_context(subghz_test_carrier->view, subghz_test_carrier);
|
view_set_context(subghz_test_carrier->view, subghz_test_carrier);
|
||||||
view_set_draw_callback(subghz_test_carrier->view, (ViewDrawCallback)subghz_test_carrier_draw);
|
view_set_draw_callback(subghz_test_carrier->view, (ViewDrawCallback)subghz_test_carrier_draw);
|
||||||
view_set_input_callback(subghz_test_carrier->view, subghz_test_carrier_input);
|
view_set_input_callback(subghz_test_carrier->view, subghz_test_carrier_input);
|
||||||
|
@ -116,7 +116,7 @@ static bool subghz_test_packet_input(InputEvent* event, void* context) {
|
|||||||
furi_assert(context);
|
furi_assert(context);
|
||||||
SubghzTestPacket* instance = context;
|
SubghzTestPacket* instance = context;
|
||||||
|
|
||||||
if(event->key == InputKeyBack) {
|
if(event->key == InputKeyBack || event->type != InputTypeShort) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,28 +128,26 @@ static bool subghz_test_packet_input(InputEvent* event, void* context) {
|
|||||||
furi_hal_subghz_stop_async_tx();
|
furi_hal_subghz_stop_async_tx();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(event->type == InputTypeShort) {
|
if(event->key == InputKeyLeft) {
|
||||||
if(event->key == InputKeyLeft) {
|
if(model->frequency > 0) model->frequency--;
|
||||||
if(model->frequency > 0) model->frequency--;
|
} else if(event->key == InputKeyRight) {
|
||||||
} else if(event->key == InputKeyRight) {
|
if(model->frequency < subghz_frequencies_count - 1) model->frequency++;
|
||||||
if(model->frequency < subghz_frequencies_count - 1) model->frequency++;
|
} else if(event->key == InputKeyDown) {
|
||||||
} else if(event->key == InputKeyDown) {
|
if(model->path > 0) model->path--;
|
||||||
if(model->path > 0) model->path--;
|
} else if(event->key == InputKeyUp) {
|
||||||
} else if(event->key == InputKeyUp) {
|
if(model->path < FuriHalSubGhzPath868) model->path++;
|
||||||
if(model->path < FuriHalSubGhzPath868) model->path++;
|
} else if(event->key == InputKeyOk) {
|
||||||
} else if(event->key == InputKeyOk) {
|
if(model->status == SubghzTestPacketModelStatusTx) {
|
||||||
if(model->status == SubghzTestPacketModelStatusTx) {
|
model->status = SubghzTestPacketModelStatusRx;
|
||||||
model->status = SubghzTestPacketModelStatusRx;
|
} else {
|
||||||
} else {
|
model->status = SubghzTestPacketModelStatusTx;
|
||||||
model->status = SubghzTestPacketModelStatusTx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
model->real_frequency =
|
|
||||||
furi_hal_subghz_set_frequency(subghz_frequencies[model->frequency]);
|
|
||||||
furi_hal_subghz_set_path(model->path);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model->real_frequency =
|
||||||
|
furi_hal_subghz_set_frequency(subghz_frequencies[model->frequency]);
|
||||||
|
furi_hal_subghz_set_path(model->path);
|
||||||
|
|
||||||
if(model->status == SubghzTestPacketModelStatusRx) {
|
if(model->status == SubghzTestPacketModelStatusRx) {
|
||||||
furi_hal_subghz_start_async_rx(subghz_test_packet_rx_callback, instance);
|
furi_hal_subghz_start_async_rx(subghz_test_packet_rx_callback, instance);
|
||||||
} else {
|
} else {
|
||||||
@ -210,7 +208,7 @@ SubghzTestPacket* subghz_test_packet_alloc() {
|
|||||||
|
|
||||||
// View allocation and configuration
|
// View allocation and configuration
|
||||||
instance->view = view_alloc();
|
instance->view = view_alloc();
|
||||||
view_allocate_model(instance->view, ViewModelTypeLockFree, sizeof(SubghzTestPacketModel));
|
view_allocate_model(instance->view, ViewModelTypeLocking, sizeof(SubghzTestPacketModel));
|
||||||
view_set_context(instance->view, instance);
|
view_set_context(instance->view, instance);
|
||||||
view_set_draw_callback(instance->view, (ViewDrawCallback)subghz_test_packet_draw);
|
view_set_draw_callback(instance->view, (ViewDrawCallback)subghz_test_packet_draw);
|
||||||
view_set_input_callback(instance->view, subghz_test_packet_input);
|
view_set_input_callback(instance->view, subghz_test_packet_input);
|
||||||
|
File diff suppressed because one or more lines are too long
@ -3,61 +3,62 @@
|
|||||||
|
|
||||||
extern const Icon A_WatchingTV_128x64;
|
extern const Icon A_WatchingTV_128x64;
|
||||||
extern const Icon A_Wink_128x64;
|
extern const Icon A_Wink_128x64;
|
||||||
extern const Icon I_Nfc_10px;
|
|
||||||
extern const Icon I_ir_10px;
|
|
||||||
extern const Icon I_ble_10px;
|
|
||||||
extern const Icon I_sub1_10px;
|
|
||||||
extern const Icon I_dir_10px;
|
extern const Icon I_dir_10px;
|
||||||
extern const Icon I_unknown_10px;
|
extern const Icon I_Nfc_10px;
|
||||||
|
extern const Icon I_sub1_10px;
|
||||||
|
extern const Icon I_ir_10px;
|
||||||
extern const Icon I_ibutt_10px;
|
extern const Icon I_ibutt_10px;
|
||||||
|
extern const Icon I_unknown_10px;
|
||||||
|
extern const Icon I_ble_10px;
|
||||||
extern const Icon I_125_10px;
|
extern const Icon I_125_10px;
|
||||||
extern const Icon I_ButtonLeft_4x7;
|
|
||||||
extern const Icon I_ButtonRight_4x7;
|
|
||||||
extern const Icon I_Warning_30x23;
|
|
||||||
extern const Icon I_ButtonRightSmall_3x5;
|
extern const Icon I_ButtonRightSmall_3x5;
|
||||||
extern const Icon I_ButtonCenter_7x7;
|
extern const Icon I_ButtonLeft_4x7;
|
||||||
extern const Icon I_ButtonLeftSmall_3x5;
|
extern const Icon I_ButtonLeftSmall_3x5;
|
||||||
|
extern const Icon I_DFU_128x50;
|
||||||
|
extern const Icon I_Warning_30x23;
|
||||||
|
extern const Icon I_ButtonRight_4x7;
|
||||||
|
extern const Icon I_ButtonCenter_7x7;
|
||||||
extern const Icon I_DolphinOkay_41x43;
|
extern const Icon I_DolphinOkay_41x43;
|
||||||
extern const Icon I_DolphinFirstStart7_61x51;
|
|
||||||
extern const Icon I_DolphinFirstStart4_67x53;
|
extern const Icon I_DolphinFirstStart4_67x53;
|
||||||
extern const Icon I_DolphinFirstStart3_57x48;
|
|
||||||
extern const Icon I_Flipper_young_80x60;
|
|
||||||
extern const Icon I_DolphinFirstStart0_70x53;
|
|
||||||
extern const Icon I_DolphinFirstStart2_59x51;
|
extern const Icon I_DolphinFirstStart2_59x51;
|
||||||
extern const Icon I_DolphinFirstStart6_58x54;
|
|
||||||
extern const Icon I_DolphinFirstStart5_54x49;
|
extern const Icon I_DolphinFirstStart5_54x49;
|
||||||
extern const Icon I_DolphinFirstStart8_56x51;
|
extern const Icon I_DolphinFirstStart0_70x53;
|
||||||
|
extern const Icon I_DolphinFirstStart6_58x54;
|
||||||
extern const Icon I_DolphinFirstStart1_59x53;
|
extern const Icon I_DolphinFirstStart1_59x53;
|
||||||
extern const Icon I_DoorRight_70x55;
|
extern const Icon I_DolphinFirstStart8_56x51;
|
||||||
|
extern const Icon I_DolphinFirstStart7_61x51;
|
||||||
|
extern const Icon I_Flipper_young_80x60;
|
||||||
|
extern const Icon I_DolphinFirstStart3_57x48;
|
||||||
|
extern const Icon I_PassportBottom_128x17;
|
||||||
|
extern const Icon I_DoorLeft_8x56;
|
||||||
extern const Icon I_DoorLocked_10x56;
|
extern const Icon I_DoorLocked_10x56;
|
||||||
|
extern const Icon I_DoorRight_8x56;
|
||||||
extern const Icon I_DoorLeft_70x55;
|
extern const Icon I_DoorLeft_70x55;
|
||||||
extern const Icon I_PassportLeft_6x47;
|
extern const Icon I_PassportLeft_6x47;
|
||||||
extern const Icon I_DoorRight_8x56;
|
extern const Icon I_DoorRight_70x55;
|
||||||
extern const Icon I_DoorLeft_8x56;
|
|
||||||
extern const Icon I_LockPopup_100x49;
|
extern const Icon I_LockPopup_100x49;
|
||||||
extern const Icon I_PassportBottom_128x17;
|
|
||||||
extern const Icon I_Vol_up_25x27;
|
|
||||||
extern const Icon I_Fill_marker_7x7;
|
|
||||||
extern const Icon I_IrdaArrowUp_4x8;
|
|
||||||
extern const Icon I_Down_hvr_25x27;
|
|
||||||
extern const Icon I_Vol_up_hvr_25x27;
|
|
||||||
extern const Icon I_Power_25x27;
|
|
||||||
extern const Icon I_Vol_down_25x27;
|
|
||||||
extern const Icon I_IrdaSend_128x64;
|
|
||||||
extern const Icon I_Up_hvr_25x27;
|
|
||||||
extern const Icon I_Back_15x10;
|
|
||||||
extern const Icon I_IrdaSendShort_128x34;
|
|
||||||
extern const Icon I_Mute_hvr_25x27;
|
|
||||||
extern const Icon I_IrdaLearnShort_128x31;
|
|
||||||
extern const Icon I_Down_25x27;
|
|
||||||
extern const Icon I_Up_25x27;
|
|
||||||
extern const Icon I_Mute_25x27;
|
extern const Icon I_Mute_25x27;
|
||||||
extern const Icon I_Vol_down_hvr_25x27;
|
extern const Icon I_IrdaArrowUp_4x8;
|
||||||
|
extern const Icon I_Up_hvr_25x27;
|
||||||
|
extern const Icon I_Mute_hvr_25x27;
|
||||||
|
extern const Icon I_Vol_down_25x27;
|
||||||
|
extern const Icon I_Down_25x27;
|
||||||
extern const Icon I_Power_hvr_25x27;
|
extern const Icon I_Power_hvr_25x27;
|
||||||
extern const Icon I_IrdaLearn_128x64;
|
extern const Icon I_IrdaLearnShort_128x31;
|
||||||
extern const Icon I_IrdaArrowDown_4x8;
|
extern const Icon I_IrdaArrowDown_4x8;
|
||||||
extern const Icon I_KeyBackspaceSelected_16x9;
|
extern const Icon I_Vol_down_hvr_25x27;
|
||||||
|
extern const Icon I_IrdaLearn_128x64;
|
||||||
|
extern const Icon I_Down_hvr_25x27;
|
||||||
|
extern const Icon I_Fill_marker_7x7;
|
||||||
|
extern const Icon I_Power_25x27;
|
||||||
|
extern const Icon I_Vol_up_25x27;
|
||||||
|
extern const Icon I_Up_25x27;
|
||||||
|
extern const Icon I_Back_15x10;
|
||||||
|
extern const Icon I_IrdaSend_128x64;
|
||||||
|
extern const Icon I_IrdaSendShort_128x34;
|
||||||
|
extern const Icon I_Vol_up_hvr_25x27;
|
||||||
extern const Icon I_KeySave_24x11;
|
extern const Icon I_KeySave_24x11;
|
||||||
|
extern const Icon I_KeyBackspaceSelected_16x9;
|
||||||
extern const Icon I_KeySaveSelected_24x11;
|
extern const Icon I_KeySaveSelected_24x11;
|
||||||
extern const Icon I_KeyBackspace_16x9;
|
extern const Icon I_KeyBackspace_16x9;
|
||||||
extern const Icon A_125khz_14;
|
extern const Icon A_125khz_14;
|
||||||
@ -75,39 +76,39 @@ extern const Icon A_Sub1ghz_14;
|
|||||||
extern const Icon A_Tamagotchi_14;
|
extern const Icon A_Tamagotchi_14;
|
||||||
extern const Icon A_U2F_14;
|
extern const Icon A_U2F_14;
|
||||||
extern const Icon A_iButton_14;
|
extern const Icon A_iButton_14;
|
||||||
extern const Icon I_Medium_chip_22x21;
|
|
||||||
extern const Icon I_Detailed_chip_17x13;
|
extern const Icon I_Detailed_chip_17x13;
|
||||||
|
extern const Icon I_Medium_chip_22x21;
|
||||||
extern const Icon I_Health_16x16;
|
extern const Icon I_Health_16x16;
|
||||||
extern const Icon I_FaceNopower_29x14;
|
|
||||||
extern const Icon I_Battery_16x16;
|
|
||||||
extern const Icon I_BatteryBody_52x28;
|
|
||||||
extern const Icon I_FaceConfused_29x14;
|
|
||||||
extern const Icon I_FaceCharging_29x14;
|
extern const Icon I_FaceCharging_29x14;
|
||||||
extern const Icon I_FaceNormal_29x14;
|
extern const Icon I_BatteryBody_52x28;
|
||||||
extern const Icon I_Voltage_16x16;
|
extern const Icon I_Voltage_16x16;
|
||||||
extern const Icon I_Temperature_16x16;
|
extern const Icon I_Temperature_16x16;
|
||||||
extern const Icon I_RFIDDolphinReceive_97x61;
|
extern const Icon I_FaceNopower_29x14;
|
||||||
extern const Icon I_RFIDDolphinSend_97x61;
|
extern const Icon I_FaceNormal_29x14;
|
||||||
extern const Icon I_RFIDBigChip_37x36;
|
extern const Icon I_Battery_16x16;
|
||||||
|
extern const Icon I_FaceConfused_29x14;
|
||||||
extern const Icon I_RFIDDolphinSuccess_108x57;
|
extern const Icon I_RFIDDolphinSuccess_108x57;
|
||||||
|
extern const Icon I_RFIDBigChip_37x36;
|
||||||
|
extern const Icon I_RFIDDolphinSend_97x61;
|
||||||
|
extern const Icon I_RFIDDolphinReceive_97x61;
|
||||||
extern const Icon I_SDQuestion_35x43;
|
extern const Icon I_SDQuestion_35x43;
|
||||||
extern const Icon I_SDError_43x35;
|
extern const Icon I_SDError_43x35;
|
||||||
extern const Icon I_Battery_26x8;
|
|
||||||
extern const Icon I_PlaceholderL_11x13;
|
|
||||||
extern const Icon I_Bluetooth_5x8;
|
|
||||||
extern const Icon I_BadUsb_9x8;
|
extern const Icon I_BadUsb_9x8;
|
||||||
extern const Icon I_PlaceholderR_30x13;
|
extern const Icon I_PlaceholderR_30x13;
|
||||||
extern const Icon I_USBConnected_15x8;
|
|
||||||
extern const Icon I_Battery_19x8;
|
|
||||||
extern const Icon I_Lock_8x8;
|
|
||||||
extern const Icon I_Background_128x11;
|
|
||||||
extern const Icon I_Background_128x8;
|
extern const Icon I_Background_128x8;
|
||||||
extern const Icon I_SDcardFail_11x8;
|
extern const Icon I_Lock_8x8;
|
||||||
|
extern const Icon I_Battery_26x8;
|
||||||
|
extern const Icon I_PlaceholderL_11x13;
|
||||||
|
extern const Icon I_Battery_19x8;
|
||||||
extern const Icon I_SDcardMounted_11x8;
|
extern const Icon I_SDcardMounted_11x8;
|
||||||
extern const Icon I_iButtonDolphinVerySuccess_108x52;
|
extern const Icon I_SDcardFail_11x8;
|
||||||
|
extern const Icon I_USBConnected_15x8;
|
||||||
|
extern const Icon I_Bluetooth_5x8;
|
||||||
|
extern const Icon I_Background_128x11;
|
||||||
extern const Icon I_DolphinMafia_115x62;
|
extern const Icon I_DolphinMafia_115x62;
|
||||||
extern const Icon I_iButtonDolphinSuccess_109x60;
|
|
||||||
extern const Icon I_DolphinExcited_64x63;
|
extern const Icon I_DolphinExcited_64x63;
|
||||||
extern const Icon I_DolphinNice_96x59;
|
extern const Icon I_iButtonDolphinSuccess_109x60;
|
||||||
|
extern const Icon I_iButtonDolphinVerySuccess_108x52;
|
||||||
extern const Icon I_iButtonKey_49x44;
|
extern const Icon I_iButtonKey_49x44;
|
||||||
|
extern const Icon I_DolphinNice_96x59;
|
||||||
extern const Icon I_DolphinWait_61x59;
|
extern const Icon I_DolphinWait_61x59;
|
||||||
|
BIN
assets/icons/Common/DFU_128x50.png
Normal file
BIN
assets/icons/Common/DFU_128x50.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
@ -13,13 +13,57 @@
|
|||||||
#include <furi-hal.h>
|
#include <furi-hal.h>
|
||||||
#include <u8g2.h>
|
#include <u8g2.h>
|
||||||
|
|
||||||
const uint8_t I_Warning_30x23_0[] = {
|
const uint8_t I_DFU_128x50[] = {
|
||||||
0x00, 0xC0, 0x00, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xF0, 0x03, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0x00,
|
||||||
0x00, 0xF8, 0x07, 0x00, 0x00, 0x3C, 0x0F, 0x00, 0x00, 0x3C, 0x0F, 0x00, 0x00, 0x3E, 0x1F, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x38, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x3F, 0x3F, 0x00, 0x00, 0x3F, 0x3F, 0x00, 0x80, 0x3F, 0x7F, 0x00, 0xC0, 0x3F, 0xFF, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0xC0, 0x00, 0x00, 0x00,
|
||||||
0xC0, 0x3F, 0xFF, 0x00, 0xE0, 0x3F, 0xFF, 0x01, 0xF0, 0x3F, 0xFF, 0x03, 0xF0, 0x3F, 0xFF, 0x03,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8F, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00,
|
||||||
0xF8, 0x3F, 0xFF, 0x07, 0xFC, 0xFF, 0xFF, 0x0F, 0xFC, 0xFF, 0xFF, 0x0F, 0xFE, 0x3F, 0xFF, 0x1F,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
|
||||||
0xFF, 0x3F, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0x3F, 0xFE, 0xFF, 0xFF, 0x1F,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x75, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x0A, 0x00, 0x00, 0x0F, 0x60, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xE0, 0x0F, 0x00, 0xC0, 0xE0, 0x4F, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18, 0x00, 0x30, 0x1E, 0x90, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x18, 0x00, 0x8C, 0x01, 0xA0, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x81, 0xFF, 0x19, 0x00, 0x63, 0x00, 0xC0, 0xF0, 0x07,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x5E, 0x1F, 0x80, 0x18, 0x00, 0xE0, 0x0E, 0x18,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x18, 0xAF, 0x0F, 0x40, 0x06, 0x00, 0xF8, 0x01, 0x20,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x57, 0x01, 0x20, 0x01, 0x00, 0x78, 0x00, 0x3E,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x81, 0xAF, 0x02, 0x90, 0x00, 0x00, 0x38, 0x80, 0x41,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x80, 0x57, 0x01, 0x48, 0x00, 0x00, 0x10, 0x60, 0x40,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x10, 0x80, 0xAB, 0x00, 0x24, 0x00, 0x00, 0x08, 0x10, 0x40,
|
||||||
|
0x3F, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0C, 0xC0, 0x57, 0x01, 0x12, 0x00, 0x00, 0x04, 0x08, 0x40,
|
||||||
|
0xC0, 0x0F, 0x00, 0x00, 0xC0, 0x07, 0x03, 0xF0, 0xAB, 0x00, 0x0A, 0x00, 0x00, 0x02, 0x04, 0x40,
|
||||||
|
0x00, 0xF0, 0x1F, 0x80, 0x3F, 0xC0, 0x00, 0xFC, 0x55, 0x01, 0x05, 0xE0, 0x00, 0x01, 0x04, 0x40,
|
||||||
|
0x00, 0x00, 0xE0, 0x7F, 0x00, 0x30, 0x00, 0xFF, 0xAB, 0x00, 0x05, 0xE0, 0x80, 0x00, 0x02, 0x40,
|
||||||
|
0x0F, 0x00, 0x00, 0x00, 0x80, 0x0F, 0xE0, 0xCF, 0x55, 0x81, 0x02, 0xF0, 0x40, 0x00, 0x02, 0x40,
|
||||||
|
0xF0, 0x0F, 0x00, 0x00, 0x7F, 0x00, 0xFE, 0xC3, 0xAB, 0x80, 0x02, 0x78, 0x20, 0x00, 0x01, 0x40,
|
||||||
|
0x00, 0xF0, 0xFF, 0xFF, 0x00, 0xF0, 0xFF, 0xC0, 0xD5, 0x81, 0x01, 0x7E, 0x10, 0x80, 0x00, 0x20,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x0F, 0xE0, 0xFA, 0x83, 0xC1, 0x3F, 0x08, 0x80, 0x00, 0x20,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x01, 0xD8, 0x07, 0x83, 0xF1, 0x1F, 0x04, 0x40, 0x00, 0x20,
|
||||||
|
0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0x0F, 0x80, 0xC7, 0x01, 0x83, 0xF1, 0x0F, 0x00, 0x20, 0x00, 0x10,
|
||||||
|
0xE0, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0x7F, 0x40, 0x80, 0x83, 0xE1, 0x01, 0x00, 0x20, 0x00, 0x18,
|
||||||
|
0xFC, 0xFF, 0xFF, 0xFF, 0x03, 0x3F, 0x00, 0x20, 0xFC, 0x83, 0x01, 0x00, 0x00, 0x10, 0x00, 0x18,
|
||||||
|
0xFF, 0xFF, 0xFF, 0x3F, 0xF0, 0x00, 0x00, 0x10, 0xD7, 0x01, 0x03, 0x00, 0x00, 0x08, 0x00, 0x1C,
|
||||||
|
0xFF, 0xFF, 0x01, 0x00, 0x0F, 0x00, 0x00, 0x88, 0xAB, 0x02, 0xE3, 0x01, 0x00, 0x08, 0x00, 0x0C,
|
||||||
|
0xFF, 0x07, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xC4, 0x55, 0x05, 0x1E, 0x00, 0x00, 0x04, 0x00, 0x0E,
|
||||||
|
0x7F, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0xA3, 0xAB, 0x02, 0x06, 0x00, 0x00, 0x02, 0x00, 0x0F,
|
||||||
|
0x0F, 0x00, 0x80, 0x03, 0x00, 0x00, 0xC0, 0x10, 0x57, 0x05, 0x02, 0x00, 0x00, 0x01, 0x80, 0x07,
|
||||||
|
0x03, 0x00, 0x70, 0x00, 0x00, 0x00, 0x30, 0x08, 0xAB, 0x0A, 0x02, 0x00, 0xC0, 0x00, 0xC0, 0x07,
|
||||||
|
0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x84, 0x57, 0x15, 0x01, 0x00, 0x30, 0x00, 0xE0, 0x07,
|
||||||
|
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0xC3, 0xFF, 0x2A, 0x01, 0x00, 0x0C, 0x00, 0xF0, 0x0F,
|
||||||
|
0x00, 0xC0, 0x00, 0x00, 0x00, 0xE0, 0xC0, 0xE0, 0xFE, 0x55, 0x01, 0x82, 0x03, 0x00, 0xF8, 0x15,
|
||||||
|
0x00, 0x30, 0x00, 0x00, 0x00, 0x1C, 0x30, 0x78, 0xFE, 0xAA, 0x01, 0x7C, 0x00, 0x00, 0xFC, 0x23,
|
||||||
|
0x00, 0x0E, 0x00, 0x00, 0xC0, 0x03, 0x0C, 0x3C, 0x7F, 0x5D, 0x01, 0x00, 0x00, 0x00, 0xFF, 0x45,
|
||||||
|
0xC0, 0x01, 0x00, 0x00, 0x3E, 0x00, 0x02, 0x8F, 0xBF, 0xAE, 0x03, 0x00, 0x00, 0xC0, 0xFF, 0x82,
|
||||||
|
0x30, 0x00, 0x00, 0xC0, 0x01, 0x80, 0xC1, 0x43, 0xFE, 0x5D, 0x01, 0x00, 0x00, 0xF0, 0xFF, 0x05,
|
||||||
|
0x0F, 0x00, 0x80, 0x3F, 0x00, 0x60, 0xF0, 0x31, 0xF6, 0xAE, 0x03, 0x00, 0x00, 0xFA, 0xAF, 0x02,
|
||||||
|
0xFC, 0xFF, 0x7F, 0x00, 0x00, 0x18, 0x7C, 0x08, 0x23, 0xFF, 0x05, 0x00, 0x00, 0xFD, 0x55, 0x01,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x1F, 0x84, 0x30, 0xFE, 0x0A, 0x00, 0x00, 0xAA, 0xAA, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x80, 0xF1, 0x07, 0x43, 0x18, 0xFF, 0x15, 0x00, 0x00, 0x54, 0x15, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x80, 0x20, 0x8C, 0xFF, 0xAA, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Boot request enum
|
// Boot request enum
|
||||||
@ -153,10 +197,9 @@ void target_display_init() {
|
|||||||
u8g2_ClearBuffer(&fb);
|
u8g2_ClearBuffer(&fb);
|
||||||
u8g2_SetDrawColor(&fb, 0x01);
|
u8g2_SetDrawColor(&fb, 0x01);
|
||||||
u8g2_SetFont(&fb, u8g2_font_helvB08_tf);
|
u8g2_SetFont(&fb, u8g2_font_helvB08_tf);
|
||||||
u8g2_DrawStr(&fb, 2, 8, "Recovery & Update Mode");
|
u8g2_DrawXBM(&fb, 0, 64 - 50, 128, 50, I_DFU_128x50);
|
||||||
u8g2_DrawXBM(&fb, 49, 14, 30, 23, I_Warning_30x23_0);
|
u8g2_DrawStr(&fb, 2, 8, "Update & Recovery Mode");
|
||||||
u8g2_DrawStr(&fb, 2, 50, "DFU Bootloader activated");
|
u8g2_DrawStr(&fb, 2, 21, "DFU started");
|
||||||
u8g2_DrawStr(&fb, 6, 62, "www.flipp.dev/recovery");
|
|
||||||
// Send buffer
|
// Send buffer
|
||||||
u8g2_SetPowerSave(&fb, 0);
|
u8g2_SetPowerSave(&fb, 0);
|
||||||
u8g2_SendBuffer(&fb);
|
u8g2_SendBuffer(&fb);
|
||||||
|
@ -273,6 +273,11 @@ uint32_t furi_hal_subghz_set_frequency(uint32_t value) {
|
|||||||
uint32_t real_frequency = cc1101_set_frequency(device, value);
|
uint32_t real_frequency = cc1101_set_frequency(device, value);
|
||||||
cc1101_calibrate(device);
|
cc1101_calibrate(device);
|
||||||
|
|
||||||
|
while(true) {
|
||||||
|
CC1101Status status = cc1101_get_status(device);
|
||||||
|
if (status.STATE == CC1101StateIDLE) break;
|
||||||
|
}
|
||||||
|
|
||||||
furi_hal_spi_device_return(device);
|
furi_hal_spi_device_return(device);
|
||||||
|
|
||||||
return real_frequency;
|
return real_frequency;
|
||||||
|
Loading…
Reference in New Issue
Block a user