Skip to content

Commit

Permalink
[Painter] Make color blocks more/less accurate
Browse files Browse the repository at this point in the history
  • Loading branch information
drashna committed Aug 5, 2024
1 parent 94f5643 commit 7daf8a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@

#define QUANTUM_PAINTER_DISPLAY_TIMEOUT 3600000
#define QUANTUM_PAINTER_SUPPORTS_256_PALETTE TRUE
#define QUANTUM_PAINTER_PIXDATA_BUFFER_SIZE 4096
6 changes: 4 additions & 2 deletions users/drashna/display/painter/ili9341_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,8 @@ __attribute__((weak)) void ili9341_draw_user(void) {
}
qp_rect(ili9341_display, xpos, ypos, max_hsv_xpos, ypos + font_oled->line_height, 0, 0, 0, true);
qp_rect(ili9341_display, max_hsv_xpos + 5, ypos, max_hsv_xpos + 25, ypos + font_oled->line_height - 1,
rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val(), true);
rgblight_get_hue(), rgblight_get_sat(), (uint8_t)(rgblight_get_val() * 0xFF / RGBLIGHT_LIMIT_VAL),
true);
}
#endif // RGBLIGHT_ENABLE

Expand Down Expand Up @@ -509,7 +510,8 @@ __attribute__((weak)) void ili9341_draw_user(void) {
}
qp_rect(ili9341_display, xpos, ypos, max_hsv_xpos, ypos + font_oled->line_height, 0, 0, 0, true);
qp_rect(ili9341_display, max_hsv_xpos + 5, ypos, max_hsv_xpos + 25, ypos + font_oled->line_height - 1,
rgb_matrix_get_hue(), rgb_matrix_get_sat(), rgb_matrix_get_val(), true);
rgb_matrix_get_hue(), rgb_matrix_get_sat(),
(uint8_t)(rgb_matrix_get_val() * 0xFF / RGB_MATRIX_MAXIMUM_BRIGHTNESS), true);
}
#endif // RGB_MATRIX_ENABLE

Expand Down

0 comments on commit 7daf8a8

Please sign in to comment.