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...");