fix warnings
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 */
|
||||
Reference in New Issue
Block a user