mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 23:48:35 -07:00
Add VGM color settings backend
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <furi_hal_serial_types.h>
|
||||
#include <toolbox/colors.h>
|
||||
#include <gui/canvas.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -43,6 +44,13 @@ typedef enum {
|
||||
SpiCount,
|
||||
} SpiHandle;
|
||||
|
||||
typedef enum {
|
||||
VgmColorModeDefault,
|
||||
VgmColorModeRgbBacklight,
|
||||
VgmColorModeCustom,
|
||||
VgmColorModeCount,
|
||||
} VgmColorMode;
|
||||
|
||||
typedef struct {
|
||||
char asset_pack[ASSET_PACKS_NAME_LEN];
|
||||
uint32_t anim_speed;
|
||||
@@ -79,6 +87,9 @@ typedef struct {
|
||||
FuriHalSerialId uart_esp_channel;
|
||||
FuriHalSerialId uart_nmea_channel;
|
||||
bool file_naming_prefix_after;
|
||||
VgmColorMode vgm_color_mode;
|
||||
Rgb565Color vgm_color_fg;
|
||||
Rgb565Color vgm_color_bg;
|
||||
} MomentumSettings;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -41,6 +41,9 @@ MomentumSettings momentum_settings = {
|
||||
.uart_esp_channel = FuriHalSerialIdUsart, // pin 13,14
|
||||
.uart_nmea_channel = FuriHalSerialIdUsart, // pin 13,14
|
||||
.file_naming_prefix_after = false, // Before
|
||||
.vgm_color_mode = VgmColorModeDefault, // Default
|
||||
.vgm_color_fg.value = 0xFC00, // Default Orange
|
||||
.vgm_color_bg.value = 0x0000, // Default Black
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
@@ -110,6 +113,9 @@ static const struct {
|
||||
{setting_enum(uart_esp_channel, FuriHalSerialIdMax)},
|
||||
{setting_enum(uart_nmea_channel, FuriHalSerialIdMax)},
|
||||
{setting_bool(file_naming_prefix_after)},
|
||||
{setting_enum(vgm_color_mode, VgmColorModeCount)},
|
||||
{setting_uint(vgm_color_fg, 0x0000, 0xFFFF)},
|
||||
{setting_uint(vgm_color_bg, 0x0000, 0xFFFF)},
|
||||
};
|
||||
|
||||
void momentum_settings_load() {
|
||||
|
||||
Reference in New Issue
Block a user