Skip to content

Commit

Permalink
autocorrect indicator; Read current hsv rather than storing it
Browse files Browse the repository at this point in the history
  • Loading branch information
plodah committed Nov 12, 2024
1 parent 6d214c2 commit 7f67920
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions users/plodah/functions/autocorrect.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
bool autocorrect_indicator_on = false;
uint8_t autocorrect_indicator_count = 255;
uint16_t autocorrect_indicator_timer = 0;
HSV curhsv;
HSV indhsv;

#ifndef PLODAH_AUTOCORRECT_INDICATOR_DURATION
Expand All @@ -28,7 +27,7 @@
autocorrect_indicator_on = true;
rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
HSV indhsv = { PLODAH_AUTOCORRECT_INDICATOR_COLOUR };
indhsv = plodah_rgblimit(curhsv, indhsv, PLODAH_INDICATOR_MINVAL);
indhsv = plodah_rgblimit(rgb_matrix_get_hsv(), indhsv, PLODAH_INDICATOR_MINVAL);
rgb_matrix_sethsv_noeeprom(indhsv.h, indhsv.s, indhsv.v);
autocorrect_indicator_timer = timer_read();
}
Expand All @@ -42,9 +41,6 @@

void plodah_autocorrect_indicator_start(void){
autocorrect_indicator_count = 0;
if (autocorrect_indicator_count == 0){
curhsv = rgb_matrix_get_hsv();
}
}

void plodah_autocorrect_indicator_check(void){
Expand Down

0 comments on commit 7f67920

Please sign in to comment.