Cleanup and fixes

This commit is contained in:
Willy-JL
2023-08-15 01:24:12 +02:00
parent ad689e0926
commit 6a618b6e19
5 changed files with 11 additions and 12 deletions

View File

@@ -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);

View File

@@ -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
1 entry status name type params
1734 Function + hex_chars_to_uint64 _Bool const char*, uint64_t*
1735 Function + hex_chars_to_uint8 _Bool const char*, uint8_t*
1736 Function + hsv2rgb RgbColor HsvColor
1737 Function + hsvcmp int HsvColor*, HsvColor* const HsvColor*, const HsvColor*
1738 Function - hypot double double, double
1739 Function - hypotf float float, float
1740 Function - hypotl long double long double, long double
2570 Function + rgb_backlight_set_rainbow_mode void RGBBacklightRainbowMode
2571 Function + rgb_backlight_set_rainbow_speed void uint8_t
2572 Function - rgb_backlight_update void uint8_t, _Bool
2573 Function + rgbcmp int RgbColor*, RgbColor* const RgbColor*, const RgbColor*
2574 Function - rindex char* const char*, int
2575 Function - rint double double
2576 Function - rintf float float

View File

@@ -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) {

View File

@@ -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));
}

View File

@@ -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);