|
|
|
@@ -129,7 +129,11 @@ extern "C" void app_main(void) { |
|
|
|
cJSON_Delete(json); |
|
|
|
} |
|
|
|
|
|
|
|
LEDStrip *LEDs = new SPI_LEDs(39); //new TerminalLEDs(); |
|
|
|
// TerminalLEDs() |
|
|
|
// ScreenLEDs() |
|
|
|
// SPI_LEDs(39); |
|
|
|
LEDStrip *LEDs = new SPI_LEDs(39); |
|
|
|
int frequency = 60; |
|
|
|
|
|
|
|
while (true) { |
|
|
|
// Trash the old preset in case we can't find the set effect |
|
|
|
@@ -172,12 +176,13 @@ extern "C" void app_main(void) { |
|
|
|
if (!pattern) ESP_LOGW(TAG, "No LED pattern set"); |
|
|
|
ESP_LOGI(TAG, "Waiting for new config"); |
|
|
|
|
|
|
|
LEDs->clear(); |
|
|
|
device.wait(); |
|
|
|
|
|
|
|
} else { |
|
|
|
ESP_LOGI(TAG, "Starting animation"); |
|
|
|
|
|
|
|
int period_us = 1000000 / 30; |
|
|
|
int period_us = 1000000 / frequency; |
|
|
|
int64_t target_us = time_us(); |
|
|
|
int64_t profile_start = target_us; |
|
|
|
#ifdef PROFILE_PERF |
|
|
|
|