This commit is contained in:
2024-08-11 23:18:41 -05:00
parent 5534cd733e
commit a7b22343fe
5 changed files with 8 additions and 4 deletions
+3
View File
@@ -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, &reg, 1, (100 / portTICK_PERIOD_MS)));
}
+1
View File
@@ -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