mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Cleanup and fixes
This commit is contained in:
@@ -5,6 +5,9 @@ enum VarItemListIndex {
|
||||
VarItemListIndexLeftHanded,
|
||||
VarItemListIndexRgbBacklight,
|
||||
VarItemListIndexLcdColor,
|
||||
VarItemListIndexRainbowLcd,
|
||||
VarItemListIndexRainbowSpeed,
|
||||
VarItemListIndexRainbowInterval,
|
||||
};
|
||||
|
||||
void xtreme_app_scene_misc_screen_var_item_list_callback(void* context, uint32_t index) {
|
||||
@@ -237,6 +240,7 @@ bool xtreme_app_scene_misc_screen_on_event(void* context, SceneManagerEvent even
|
||||
if(change) {
|
||||
XTREME_SETTINGS()->rgb_backlight = !XTREME_SETTINGS()->rgb_backlight;
|
||||
app->save_settings = true;
|
||||
app->save_backlight = true;
|
||||
notification_message(app->notification, &sequence_display_backlight_on);
|
||||
rgb_backlight_reconfigure(XTREME_SETTINGS()->rgb_backlight);
|
||||
scene_manager_previous_scene(app->scene_manager);
|
||||
|
||||
@@ -1734,7 +1734,7 @@ Function,+,hex_char_to_uint8,_Bool,"char, char, uint8_t*"
|
||||
Function,+,hex_chars_to_uint64,_Bool,"const char*, uint64_t*"
|
||||
Function,+,hex_chars_to_uint8,_Bool,"const char*, uint8_t*"
|
||||
Function,+,hsv2rgb,RgbColor,HsvColor
|
||||
Function,+,hsvcmp,int,"HsvColor*, HsvColor*"
|
||||
Function,+,hsvcmp,int,"const HsvColor*, const HsvColor*"
|
||||
Function,-,hypot,double,"double, double"
|
||||
Function,-,hypotf,float,"float, float"
|
||||
Function,-,hypotl,long double,"long double, long double"
|
||||
@@ -2570,7 +2570,7 @@ Function,+,rgb_backlight_set_rainbow_interval,void,uint32_t
|
||||
Function,+,rgb_backlight_set_rainbow_mode,void,RGBBacklightRainbowMode
|
||||
Function,+,rgb_backlight_set_rainbow_speed,void,uint8_t
|
||||
Function,-,rgb_backlight_update,void,"uint8_t, _Bool"
|
||||
Function,+,rgbcmp,int,"RgbColor*, RgbColor*"
|
||||
Function,+,rgbcmp,int,"const RgbColor*, const RgbColor*"
|
||||
Function,-,rindex,char*,"const char*, int"
|
||||
Function,-,rint,double,double
|
||||
Function,-,rintf,float,float
|
||||
|
||||
|
@@ -53,12 +53,7 @@ static struct {
|
||||
.last_brightness = 0,
|
||||
.last_color = {0, 0, 0},
|
||||
.rainbow_timer = NULL,
|
||||
.rainbow_hsv =
|
||||
{
|
||||
.h = 0,
|
||||
.s = 255,
|
||||
.v = 255,
|
||||
},
|
||||
.rainbow_hsv = {0, 255, 255},
|
||||
};
|
||||
|
||||
static void rainbow_timer(void* ctx) {
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
#include "colors.h"
|
||||
|
||||
inline int rgbcmp(RgbColor* a, RgbColor* b) {
|
||||
inline int rgbcmp(const RgbColor* a, const RgbColor* b) {
|
||||
return memcmp(a, b, sizeof(RgbColor));
|
||||
}
|
||||
|
||||
inline int hsvcmp(HsvColor* a, HsvColor* b) {
|
||||
inline int hsvcmp(const HsvColor* a, const HsvColor* b) {
|
||||
return memcmp(a, b, sizeof(HsvColor));
|
||||
}
|
||||
|
||||
|
||||
@@ -19,9 +19,9 @@ typedef struct HsvColor {
|
||||
uint8_t v;
|
||||
} HsvColor;
|
||||
|
||||
int rgbcmp(RgbColor* a, RgbColor* b);
|
||||
int rgbcmp(const RgbColor* a, const RgbColor* b);
|
||||
|
||||
int hsvcmp(HsvColor* a, HsvColor* b);
|
||||
int hsvcmp(const HsvColor* a, const HsvColor* b);
|
||||
|
||||
RgbColor hsv2rgb(HsvColor hsv);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user