Index: firmware/App/Controllers/Valves.c =================================================================== diff -u -r0074b704ffe85b2ad5600bcdf5e591e33808cdf5 -rdb29226a158778db9c0bbcc202d3b56f9cf305c8 --- firmware/App/Controllers/Valves.c (.../Valves.c) (revision 0074b704ffe85b2ad5600bcdf5e591e33808cdf5) +++ firmware/App/Controllers/Valves.c (.../Valves.c) (revision db29226a158778db9c0bbcc202d3b56f9cf305c8) @@ -132,7 +132,6 @@ NUM_OF_VALVE_DIRECTION ///< Number of valve directions } VALVE_DIRECTION_T; -#pragma pack(push, 1) /// Valve bypass (fixed PWM) structure typedef struct { @@ -148,27 +147,26 @@ { VALVE_POSITION_T commandedPosition; ///< Valve commanded position enum VALVE_POSITION_T currentPosition; ///< Valve current position enum - S16 currentPositionInCounts; ///< Valve current position n counts + S16 currentPositionInCounts; ///< Valve current position in counts S16 targetPositionInCounts; ///< Valve target position in counts - BOOL hasTransitionBeenRequested; ///< Valve transition has been requested flag + BOOL hasTransitionBeenRequested; ///< Valve transition request flag VALVE_STATE_T execState; ///< Valve execution state U32 transitionStartTime; ///< Valve transition start time S16 positions[ NUM_OF_VALVE_POSITIONS ]; ///< Valve positions array (Pos A, Pos B, Pos C) - VALVE_MODE_T controlMode; ///< Valve control mode + VALVE_MODE_T controlMode; ///< Valve control mode (PID, bypass, disable) F32 current; ///< Valve current U32 overCurrentCounter; ///< Valve over current counter U32 positionOutOfRangeCounter; ///< Valve position out of range counter U32 dataPublishCounter; ///< Valve data publish counter // Homing variables U32 numberOfFailedHomings; ///< Valve number of failed homing - U32 homingEdgeDetectionCounter; ///< Valve homing edge detection counter + U32 homingEdgeDetectionCounter; ///< Valve homing counter when there is not much travel BOOL hasHomingBeenRequested; ///< Valve homing request flag BOOL hasValveBeenHomed; ///< Valve homing completed flag BOOL hasHomingFailed; ///< Valve homing failed flag // Bypass (fixed PWM) mode VALVE_BYPASS_T bypassModeStatus; ///< Valve bypass (fixed PWM) mode } VALVE_STATUS_T; -#pragma pack(pop) // ********** private data ********** @@ -1192,14 +1190,6 @@ valvesStatus[ valve ].dataPublishCounter = 0; } - - // TODO REMOVE Fast 10ms publish - HD_VALVE_FAST_DATA_T fastDataRemoveLater; - fastDataRemoveLater.currentPos = valvesStatus[ valve ].currentPositionInCounts; - fastDataRemoveLater.current = valvesStatus[ valve ].current; - fastDataRemoveLater.cmdPosition = valvesStatus[ valve ].targetPositionInCounts; - broadcastFastTempHDValves( &fastDataRemoveLater ); - // TODO REMOVE } /*********************************************************************//**