tweaks
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
static const char *TAG = "wires";
|
||||
|
||||
static const uint32_t STRIKE_TIME_PENALTY = 30'000;
|
||||
|
||||
static bool button_state;
|
||||
static bool button_pressed;
|
||||
static bool button_released;
|
||||
@@ -79,6 +81,7 @@ void strike(char* reason) {
|
||||
ESP_LOGW("strike!", "%s", reason);
|
||||
lcd_set_cursor(&lcd, 0, 3);
|
||||
lcd_print(&lcd, reason);
|
||||
set_game_time(get_game_time() - STRIKE_TIME_PENALTY);
|
||||
uint8_t reg = 6;
|
||||
ESP_ERROR_CHECK_WITHOUT_ABORT(i2c_master_write_to_device(WIRES_I2C_NUM, WIRES_I2C_ADDR, ®, 1, (100 / portTICK_PERIOD_MS)));
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <driver/gpio.h>
|
||||
#include <esp_log.h>
|
||||
#include "drivers/char_lcd.h"
|
||||
#include "drivers/game_timer.h"
|
||||
|
||||
#define WIRES_PIN_DELTA GPIO_NUM_2
|
||||
#define WIRES_I2C_NUM I2C_NUM_1
|
||||
|
||||
Reference in New Issue
Block a user