mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-20 04:54:45 -07:00
Format (and thanks nano for the big folder fix <3)
This commit is contained in:
@@ -56,8 +56,12 @@ static void archive_list_load_cb(void* context, uint32_t list_load_offset) {
|
|||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void archive_list_item_cb(
|
||||||
archive_list_item_cb(void* context, FuriString* item_path, uint32_t idx, bool is_folder, bool is_last) {
|
void* context,
|
||||||
|
FuriString* item_path,
|
||||||
|
uint32_t idx,
|
||||||
|
bool is_folder,
|
||||||
|
bool is_last) {
|
||||||
furi_assert(context);
|
furi_assert(context);
|
||||||
UNUSED(idx);
|
UNUSED(idx);
|
||||||
ArchiveBrowserView* browser = (ArchiveBrowserView*)context;
|
ArchiveBrowserView* browser = (ArchiveBrowserView*)context;
|
||||||
|
|||||||
@@ -21,12 +21,13 @@
|
|||||||
#define MAX_HISTORY 4
|
#define MAX_HISTORY 4
|
||||||
|
|
||||||
static const uint32_t subghz_frequency_list[] = {
|
static const uint32_t subghz_frequency_list[] = {
|
||||||
300000000, 302757000, 303875000, 304250000, 307000000, 307500000, 307800000, 309000000,
|
300000000, 302757000, 303875000, 304250000, 307000000, 307500000, 307800000,
|
||||||
310000000, 312000000, 312100000, 313000000, 313850000, 314000000, 314350000, 314980000,
|
309000000, 310000000, 312000000, 312100000, 313000000, 313850000, 314000000,
|
||||||
315000000, 318000000, 330000000, 345000000, 348000000, 350000000, 387000000, 390000000,
|
314350000, 314980000, 315000000, 318000000, 330000000, 345000000, 348000000,
|
||||||
418000000, 433075000, 433220000, 433420000, 433657070, 433889000, 433920000, 434075000,
|
350000000, 387000000, 390000000, 418000000, 433075000, 433220000, 433420000,
|
||||||
434176948, 434390000, 434420000, 434775000, 438900000, 440175000, 464000000, 467750000, 779000000,
|
433657070, 433889000, 433920000, 434075000, 434176948, 434390000, 434420000,
|
||||||
868350000, 868400000, 868800000, 868950000, 906400000, 915000000, 925000000, 928000000};
|
434775000, 438900000, 440175000, 464000000, 467750000, 779000000, 868350000,
|
||||||
|
868400000, 868800000, 868950000, 906400000, 915000000, 925000000, 928000000};
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
SubGhzFrequencyAnalyzerStatusIDLE,
|
SubGhzFrequencyAnalyzerStatusIDLE,
|
||||||
|
|||||||
@@ -120,7 +120,10 @@ bool subghz_test_carrier_input(InputEvent* event, void* context) {
|
|||||||
furi_hal_subghz_rx();
|
furi_hal_subghz_rx();
|
||||||
} else {
|
} else {
|
||||||
furi_hal_gpio_init(
|
furi_hal_gpio_init(
|
||||||
furi_hal_subghz.cc1101_g0_pin, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow);
|
furi_hal_subghz.cc1101_g0_pin,
|
||||||
|
GpioModeOutputPushPull,
|
||||||
|
GpioPullNo,
|
||||||
|
GpioSpeedLow);
|
||||||
furi_hal_gpio_write(furi_hal_subghz.cc1101_g0_pin, true);
|
furi_hal_gpio_write(furi_hal_subghz.cc1101_g0_pin, true);
|
||||||
if(!furi_hal_subghz_tx()) {
|
if(!furi_hal_subghz_tx()) {
|
||||||
furi_hal_gpio_init(
|
furi_hal_gpio_init(
|
||||||
|
|||||||
@@ -101,7 +101,11 @@ static void gui_redraw_status_bar(Gui* gui, bool need_attention) {
|
|||||||
canvas_set_color(gui->canvas, ColorBlack);
|
canvas_set_color(gui->canvas, ColorBlack);
|
||||||
// ViewPort draw
|
// ViewPort draw
|
||||||
canvas_frame_set(
|
canvas_frame_set(
|
||||||
gui->canvas, x - xtreme_settings->status_bar, GUI_STATUS_BAR_Y + 2, width, GUI_STATUS_BAR_WORKAREA_HEIGHT);
|
gui->canvas,
|
||||||
|
x - xtreme_settings->status_bar,
|
||||||
|
GUI_STATUS_BAR_Y + 2,
|
||||||
|
width,
|
||||||
|
GUI_STATUS_BAR_WORKAREA_HEIGHT);
|
||||||
view_port_draw(view_port, gui->canvas);
|
view_port_draw(view_port, gui->canvas);
|
||||||
}
|
}
|
||||||
ViewPortArray_next(it);
|
ViewPortArray_next(it);
|
||||||
@@ -175,7 +179,8 @@ static void gui_redraw_status_bar(Gui* gui, bool need_attention) {
|
|||||||
width + 2,
|
width + 2,
|
||||||
GUI_STATUS_BAR_WORKAREA_HEIGHT + 2);
|
GUI_STATUS_BAR_WORKAREA_HEIGHT + 2);
|
||||||
canvas_set_color(gui->canvas, ColorWhite);
|
canvas_set_color(gui->canvas, ColorWhite);
|
||||||
canvas_draw_box(gui->canvas, 0, 0, canvas_width(gui->canvas), canvas_height(gui->canvas));
|
canvas_draw_box(
|
||||||
|
gui->canvas, 0, 0, canvas_width(gui->canvas), canvas_height(gui->canvas));
|
||||||
canvas_set_color(gui->canvas, ColorBlack);
|
canvas_set_color(gui->canvas, ColorBlack);
|
||||||
// Draw Icon
|
// Draw Icon
|
||||||
canvas_frame_set(
|
canvas_frame_set(
|
||||||
|
|||||||
@@ -82,8 +82,7 @@ XtremeApp* xtreme_app_alloc() {
|
|||||||
variable_item_list_get_view(app->var_item_list));
|
variable_item_list_get_view(app->var_item_list));
|
||||||
|
|
||||||
app->popup = popup_alloc();
|
app->popup = popup_alloc();
|
||||||
view_dispatcher_add_view(
|
view_dispatcher_add_view(app->view_dispatcher, XtremeAppViewPopup, popup_get_view(app->popup));
|
||||||
app->view_dispatcher, XtremeAppViewPopup, popup_get_view(app->popup));
|
|
||||||
|
|
||||||
return app;
|
return app;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,11 +47,18 @@ static SVCCTL_EvtAckStatus_t hid_svc_event_handler(void* event) {
|
|||||||
// that specify attibute handle value from char handle (or the reverse)
|
// that specify attibute handle value from char handle (or the reverse)
|
||||||
if(req->Attribute_Handle == (hid_svc->led_state_char_handle + 1)) {
|
if(req->Attribute_Handle == (hid_svc->led_state_char_handle + 1)) {
|
||||||
hid_svc->led_state_event_callback(req->Data[0], hid_svc->led_state_ctx);
|
hid_svc->led_state_event_callback(req->Data[0], hid_svc->led_state_ctx);
|
||||||
aci_gatt_write_resp(req->Connection_Handle, req->Attribute_Handle,
|
aci_gatt_write_resp(
|
||||||
0x00, /* write_status = 0 (no error))*/
|
req->Connection_Handle,
|
||||||
0x00, /* err_code */
|
req->Attribute_Handle,
|
||||||
req->Data_Length, req->Data);
|
0x00, /* write_status = 0 (no error))*/
|
||||||
aci_gatt_write_char_value(req->Connection_Handle, hid_svc->led_state_char_handle, req->Data_Length, req->Data);
|
0x00, /* err_code */
|
||||||
|
req->Data_Length,
|
||||||
|
req->Data);
|
||||||
|
aci_gatt_write_char_value(
|
||||||
|
req->Connection_Handle,
|
||||||
|
hid_svc->led_state_char_handle,
|
||||||
|
req->Data_Length,
|
||||||
|
req->Data);
|
||||||
ret = SVCCTL_EvtAckFlowEnable;
|
ret = SVCCTL_EvtAckFlowEnable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -179,8 +179,8 @@ uint8_t furi_hal_bt_hid_get_led_state(void) {
|
|||||||
hid_host_led_state.s_shift);
|
hid_host_led_state.s_shift);
|
||||||
|
|
||||||
return (hid_host_led_state.s_value >> 1); // bit 0 is undefined (after shift bit location
|
return (hid_host_led_state.s_value >> 1); // bit 0 is undefined (after shift bit location
|
||||||
// match with HID led state bits defines)
|
// match with HID led state bits defines)
|
||||||
// see bad_kb_script.c (ducky_numlock_on function)
|
// see bad_kb_script.c (ducky_numlock_on function)
|
||||||
}
|
}
|
||||||
|
|
||||||
void furi_hal_bt_hid_start() {
|
void furi_hal_bt_hid_start() {
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ extern "C" {
|
|||||||
#define FURI_HAL_VERSION_NAME_LENGTH 8
|
#define FURI_HAL_VERSION_NAME_LENGTH 8
|
||||||
#define FURI_HAL_VERSION_ARRAY_NAME_LENGTH (FURI_HAL_VERSION_NAME_LENGTH + 1)
|
#define FURI_HAL_VERSION_ARRAY_NAME_LENGTH (FURI_HAL_VERSION_NAME_LENGTH + 1)
|
||||||
/** BLE symbol + name */
|
/** BLE symbol + name */
|
||||||
#define FURI_HAL_VERSION_DEVICE_NAME_LENGTH (1 + FURI_HAL_VERSION_ARRAY_NAME_LENGTH) + 9 // for bad kb custom name
|
#define FURI_HAL_VERSION_DEVICE_NAME_LENGTH \
|
||||||
|
(1 + FURI_HAL_VERSION_ARRAY_NAME_LENGTH) + 9 // for bad kb custom name
|
||||||
|
|
||||||
/** OTP Versions enum */
|
/** OTP Versions enum */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|||||||
Reference in New Issue
Block a user