From f4f66dd13cb148c29bb2544d7c1d51c4121d87b4 Mon Sep 17 00:00:00 2001 From: jrhoffa Date: Wed, 14 Sep 2022 19:25:11 -0700 Subject: [PATCH] Remove extra debugging --- main/main.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/main/main.cpp b/main/main.cpp index 68eef8e..dfe8d83 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -56,6 +56,7 @@ static void start_filesystem() { ESP_ERROR_CHECK(esp_vfs_spiffs_register(&conf)); } +/* #include #include #include @@ -83,7 +84,7 @@ static void log_dir(const std::string &path) { closedir(dir); } - +*/ static std::string read_file(const char *path) { std::string data; @@ -157,7 +158,7 @@ extern "C" void app_main(void) { // Dummy Filesystem start_filesystem(); // TODO: Scrape this out - log_dir("/spiffs"); + //log_dir("/spiffs"); Device device("blinky-jr"); @@ -213,14 +214,16 @@ extern "C" void app_main(void) { int period_us = 1000000 / 60; int64_t start = time_us(); int64_t target_us = start; +/* int64_t total_delay_us = 0; int n_delays = 0; int64_t after_sleep_us = 0; int n_processes = 0; int64_t total_process_us = 0; +*/ while (true) { int64_t now = time_us(); - +/* if (after_sleep_us > 0) { total_process_us += now - after_sleep_us; ++n_processes; @@ -237,19 +240,19 @@ extern "C" void app_main(void) { start = now; } - +*/ int64_t delay_us = target_us - now; if (delay_us < 0) delay_us = 0; if (device.wait(delay_us / 1000)) { // If the semaphore is set, go back to top of outer loop break; } - +/* after_sleep_us = time_us(); total_delay_us += (after_sleep_us - now); ++n_delays; - +*/ LEDs->step(); LEDs->show();