mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-20 04:54:45 -07:00
Merge branch 'dev' of https://github.com/flipperdevices/flipperzero-firmware into dev
This commit is contained in:
@@ -24,6 +24,9 @@ static void gpio_app_tick_event_callback(void* context) {
|
||||
GpioApp* gpio_app_alloc() {
|
||||
GpioApp* app = malloc(sizeof(GpioApp));
|
||||
|
||||
app->expansion = furi_record_open(RECORD_EXPANSION);
|
||||
expansion_disable(app->expansion);
|
||||
|
||||
app->gui = furi_record_open(RECORD_GUI);
|
||||
app->gpio_items = gpio_items_alloc();
|
||||
|
||||
@@ -80,12 +83,7 @@ GpioApp* gpio_app_alloc() {
|
||||
GpioAppViewUsbUartCfg,
|
||||
variable_item_list_get_view(app->var_item_list));
|
||||
|
||||
if(furi_hal_serial_control_is_busy(FuriHalSerialIdUsart) ||
|
||||
furi_hal_serial_control_is_busy(FuriHalSerialIdLpuart)) {
|
||||
scene_manager_next_scene(app->scene_manager, GpioSceneErrorExpansion);
|
||||
} else {
|
||||
scene_manager_next_scene(app->scene_manager, GpioSceneStart);
|
||||
}
|
||||
scene_manager_next_scene(app->scene_manager, GpioSceneStart);
|
||||
|
||||
return app;
|
||||
}
|
||||
@@ -118,6 +116,9 @@ void gpio_app_free(GpioApp* app) {
|
||||
furi_record_close(RECORD_GUI);
|
||||
furi_record_close(RECORD_NOTIFICATION);
|
||||
|
||||
expansion_enable(app->expansion);
|
||||
furi_record_close(RECORD_EXPANSION);
|
||||
|
||||
gpio_items_free(app->gpio_items);
|
||||
free(app);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user