From d608fdbf9aa5ebf73ec97f007459e59f24856d22 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Thu, 11 Jan 2024 00:15:00 +0700 Subject: [PATCH] fix syntax error --- ESPMegaPRO-IRKit-SDK/src/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ESPMegaPRO-IRKit-SDK/src/main.cpp b/ESPMegaPRO-IRKit-SDK/src/main.cpp index dd9c4e4..632221b 100644 --- a/ESPMegaPRO-IRKit-SDK/src/main.cpp +++ b/ESPMegaPRO-IRKit-SDK/src/main.cpp @@ -1,4 +1,4 @@ -#include +#include #include /** @@ -27,14 +27,14 @@ void beginRoutine() { Serial.printf("Please press the button on your remote for %d degrees\n", i); IRReceiver::start_long_receive(); - for (int i = 0; i < CAPTURE_TIMEOUT, i++) + for (int i = 0; i < CAPTURE_TIMEOUT; i++) { Serial.printf("Waiting for IR signal... (%d seconds left)\n", CAPTURE_TIMEOUT - i); } - ir_data_t data = IRReceiver::end_receive(); - timing_count[i - MIN_TEMP] = data.count; + ir_data_t data = IRReceiver::end_long_receive(); + timings_count[i - MIN_TEMP] = data.size; // Copy the timings into the timings array - memcpy(timings[i - MIN_TEMP], data.data, sizeof(uint16_t) * data.count); + memcpy(timings[i - MIN_TEMP], data.data, sizeof(uint16_t) * data.size); free(data.data); } Serial.println("Generating C++ code for the timings, please wait...");