From d375723a137219192d36baea6b135eec76ae1a4b Mon Sep 17 00:00:00 2001 From: peteGSX Date: Tue, 31 Jan 2023 19:29:39 +1000 Subject: [PATCH] Cleaned up PWM start --- IO_EXIOExpander.h | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/IO_EXIOExpander.h b/IO_EXIOExpander.h index f284bc1..34ece1b 100644 --- a/IO_EXIOExpander.h +++ b/IO_EXIOExpander.h @@ -78,7 +78,6 @@ private: _analoguePinBytes = _numAnaloguePins * 2; _analogueInputStates = (byte*) calloc(_analoguePinBytes, 1); _analoguePinMap = (uint8_t*) calloc(_numAnaloguePins, 1); - _servoData = (struct ServoData*) calloc(_numPWMPins, 14); } else { DIAG(F("ERROR configuring EX-IOExpander device, I2C:x%x"), _i2cAddress); @@ -198,26 +197,6 @@ private: uint8_t* _analoguePinMap; uint8_t _numPWMPins = 0; - struct ServoData { - uint16_t activePosition : 12; // Config parameter - uint16_t inactivePosition : 12; // Config parameter - uint16_t currentPosition : 12; - uint16_t fromPosition : 12; - uint16_t toPosition : 12; - uint8_t profile; // Config parameter - uint16_t stepNumber; // Index of current step (starting from 0) - uint16_t numSteps; // Number of steps in animation, or 0 if none in progress. - uint8_t currentProfile; // profile being used for current animation. - uint16_t duration; // time (tenths of a second) for animation to complete. - } ServoData; // 14 bytes per element, i.e. per pin in use - - struct ServoData* _servoData; - - static const uint8_t _catchupSteps = 5; // number of steps to wait before switching servo off - static const byte FLASH _bounceProfile[30]; - - const unsigned int refreshInterval = 50; // refresh every 50ms - enum { EXIOINIT = 0xE0, // Flag to initialise setup procedure EXIORDY = 0xE1, // Flag we have completed setup procedure, also for EX-IO to ACK setup