Fix some imports

This commit is contained in:
Willy-JL
2024-03-07 23:27:55 +00:00
parent 47bd1696ba
commit d09a8f2517
5 changed files with 16 additions and 10 deletions

View File

@@ -163,6 +163,7 @@ MomentumApp* momentum_app_alloc() {
MomentumApp* app = malloc(sizeof(MomentumApp));
app->gui = furi_record_open(RECORD_GUI);
app->dialogs = furi_record_open(RECORD_DIALOGS);
app->expansion = furi_record_open(RECORD_EXPANSION);
app->notification = furi_record_open(RECORD_NOTIFICATION);
// View Dispatcher and Scene Manager
@@ -361,6 +362,7 @@ void momentum_app_free(MomentumApp* app) {
// Records
furi_record_close(RECORD_NOTIFICATION);
furi_record_close(RECORD_EXPANSION);
furi_record_close(RECORD_DIALOGS);
furi_record_close(RECORD_GUI);
free(app);

View File

@@ -25,6 +25,7 @@
#include <flipper_application/flipper_application.h>
#include <notification/notification_app.h>
#include <power/power_service/power.h>
#include <expansion/expansion.h>
#include <rgb_backlight.h>
#include <m-array.h>
#include <momentum/namespoof.h>
@@ -35,6 +36,7 @@ ARRAY_DEF(CharList, char*)
typedef struct {
Gui* gui;
DialogsApp* dialogs;
Expansion* expansion;
NotificationApp* notification;
SceneManager* scene_manager;
ViewDispatcher* view_dispatcher;

View File

@@ -1,4 +1,3 @@
#include <expansion/expansion.h>
#include "../momentum_app.h"
enum VarItemListIndex {
@@ -56,10 +55,10 @@ static void momentum_app_scene_misc_screen_lcd_color_changed(VariableItem* item,
variable_item_set_current_value_text(item, lcd_colors[index].name);
rgb_backlight_set_color(led, &lcd_colors[index].color);
app->save_backlight = true;
Expansion* expansion = furi_record_open(RECORD_EXPANSION);
expansion_disable(expansion);
expansion_enable(expansion);
if(momentum_settings.vgm_color_mode == VgmColorModeRgbBacklight) {
expansion_disable(app->expansion);
expansion_enable(app->expansion);
}
}
static void momentum_app_scene_misc_screen_lcd_color_0_changed(VariableItem* item) {
momentum_app_scene_misc_screen_lcd_color_changed(item, 0);

View File

@@ -43,6 +43,10 @@ bool momentum_app_scene_misc_screen_color_on_event(void* context, SceneManagerEv
scene_manager_get_scene_state(app->scene_manager, MomentumAppSceneMiscScreenColor),
&app->lcd_color);
app->save_backlight = true;
if(momentum_settings.vgm_color_mode == VgmColorModeRgbBacklight) {
expansion_disable(app->expansion);
expansion_enable(app->expansion);
}
scene_manager_previous_scene(app->scene_manager);
break;
default:

View File

@@ -1,6 +1,3 @@
#include "SK6805.h"
#include "colors.h"
#include "property.h"
#include <furi_hal_info.h>
#include <furi_hal_region.h>
#include <furi_hal_version.h>
@@ -12,8 +9,10 @@
#include <furi.h>
#include <protobuf_version.h>
#include "momentum/momentum.h"
#include "rgb_backlight.h"
#include <momentum/momentum.h>
#include <rgb_backlight.h>
#include <SK6805.h>
#include <colors.h>
#include <stdint.h>
FURI_WEAK void furi_hal_info_get_api_version(uint16_t* major, uint16_t* minor) {