fix syntax error

This commit is contained in:
Siwat Sirichai 2024-01-11 00:15:00 +07:00
parent 631894c43f
commit d608fdbf9a
1 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
#include <ESPMegaProOS.h>
#include <ESPMegaProOS.hpp>
#include <IRReceiver.hpp>
/**
@ -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...");