playback for char lcd
This commit is contained in:
@@ -30,7 +30,7 @@ void setup_wires(void) {
|
||||
clear_all_pressed_released();
|
||||
get_cut_wires();
|
||||
lcd_clear();
|
||||
lcd_set_cursor_vis(false);
|
||||
lcd_set_cursor_vis(true);
|
||||
|
||||
WireColor wires[NUM_WIRES];
|
||||
load_wires_from_sd_card(wires);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "step0.h"
|
||||
#include "drivers/state_tracking.h"
|
||||
|
||||
static const char* TAG = "step0";
|
||||
|
||||
@@ -34,6 +35,16 @@ static void battery_stats() {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: remove. This is temperary
|
||||
static void replay_last() {
|
||||
FILE* record_file = fopen(MOUNT_POINT "/record.txt", "r");
|
||||
if (record_file == nullptr) {
|
||||
ESP_LOGE("main", "failed to open record.txt");
|
||||
}
|
||||
set_playback_source(record_file, true);
|
||||
start_playback();
|
||||
}
|
||||
|
||||
/// Wait for "*9819"
|
||||
void step0() {
|
||||
led_set(IndicatorLED::LED_SPEAKER, LEDColor::LED_COLOR_BLUE);
|
||||
@@ -154,6 +165,12 @@ void step0() {
|
||||
.should_exit = false,
|
||||
.callback = flashbang,
|
||||
},
|
||||
{
|
||||
.code = "*1113",
|
||||
.display_text = "replay_last",
|
||||
.should_exit = false,
|
||||
.callback = replay_last,
|
||||
},
|
||||
};
|
||||
int len = sizeof(star_codes)/sizeof(StarCodeHandler);
|
||||
do_star_codes(star_codes, len);
|
||||
|
||||
Reference in New Issue
Block a user