Initialise esp32 pwm, fix esp32 initial setup as it uses 2 bytes

This commit is contained in:
Piv
2023-01-22 15:05:32 +10:30
parent 40e5269c35
commit 34fbc40ebb
3 changed files with 7 additions and 6 deletions

View File

@@ -19,8 +19,8 @@ void setup()
void setupServos(uint8_t size, uint8_t *calibrationValues)
{
// We assume there are 3 bytes per servo. Ignore if there aren't.
if (size % 3 == 0)
// We assume there are 2 bytes per servo [channel number, pin number]. Ignore if there aren't.
if (size % 2 == 0)
{
for (int i = 0; i < size; i += 2)
{