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
+1 -6
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) {
+2 -2
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));
}
+2 -2
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);