Skip to content

Commit

Permalink
fix: negative temperature
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanndroid committed Nov 29, 2024
1 parent 3c6ebb9 commit 4d95d13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static void display_show_temperature(weather_t *weather, color_t color) {
if (temp < 0) { // XOR minus and tens digit
uint8_t abs_temp = abs(temp);
display_segment_digit(SEGMENT_3, abs_temp % 10, color);
uint8_t mask = display_digit_masks[19] ^ display_digit_masks[abs_temp / 10];
uint8_t mask = display_digit_masks[19] ^ display_digit_masks[display_blank_0(abs_temp / 10)];
display_segment_mask(SEGMENT_4, mask, color);
} else {
display_segment_digit(SEGMENT_3, temp % 10, color);
Expand Down

0 comments on commit 4d95d13

Please sign in to comment.