fix warnings

This commit is contained in:
2024-08-28 17:50:26 -05:00
parent afdbbeb233
commit 0b816aca68
10 changed files with 103 additions and 48 deletions
+7 -3
View File
@@ -51,7 +51,7 @@ void stop_module_timer(void) {
is_module_playing = false;
}
void set_game_time(uint32_t new_time) {
void set_game_time(int32_t new_time) {
if (new_time > 0) {
game_time_count_up = false;
game_time_left = new_time;
@@ -62,8 +62,12 @@ void set_game_time(uint32_t new_time) {
write_game_time(game_time_left);
}
uint32_t get_game_time() {
return game_time_left;
int32_t get_game_time() {
if (game_time_count_up) {
return -((int32_t) game_time_left);
} else {
return ((int32_t) game_time_left);
}
}
void set_module_time(uint32_t new_time) {
+2 -2
View File
@@ -18,9 +18,9 @@ void start_module_timer(void);
void stop_module_timer(void);
/// Sets the game time in ms
void set_game_time(uint32_t new_time);
void set_game_time(int32_t new_time);
/// Gets the current game time in ms
uint32_t get_game_time();
int32_t get_game_time();
/// Gets the current game time in ms
void time_penalty(uint32_t penalty);
+1 -1
View File
@@ -79,7 +79,7 @@ void clear_wires_pressed_released_cut(void) {
button_released = false;
}
void strike(char* reason) {
void strike(const char* reason) {
ESP_LOGW("strike!", "%s", reason);
lcd_set_cursor(&lcd, 0, 3);
lcd_print(&lcd, reason);
+1 -1
View File
@@ -29,6 +29,6 @@ void clear_wires_pressed_released_cut(void);
void set_leds(uint8_t led_states);
void strike(char* reason);
void strike(const char* reason);
#endif /* WIRES_HPP */