Index: firmware/App/Controllers/AirPump.c =================================================================== diff -u -r33c3a81272ce8c9bae64ae20537e9be45b11edd0 -rcd5be724d5a3ba7457e761191d82f278654d7f5c --- firmware/App/Controllers/AirPump.c (.../AirPump.c) (revision 33c3a81272ce8c9bae64ae20537e9be45b11edd0) +++ firmware/App/Controllers/AirPump.c (.../AirPump.c) (revision cd5be724d5a3ba7457e761191d82f278654d7f5c) @@ -1,14 +1,14 @@ /************************************************************************** * -* Copyright (c) 2022-2023 Diality Inc. - All Rights Reserved. +* Copyright (c) 2022-2024 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file AirPump.c * -* @author (last) Michael Garthwaite -* @date (last) 23-Dec-2022 +* @author (last) Sean Nash +* @date (last) 01-Aug-2023 * * @author (original) Michael Garthwaite * @date (original) 21-Nov-2022 @@ -37,7 +37,7 @@ #define AIR_PUMP_DATA_PUB_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) #define DATA_PUBLISH_COUNTER_START_COUNT 13 #define AIR_PUMP_GPIO_PIN 0x04 -#define AIR_PUMP_OPERATION_TIMEOUT ( 6 * MS_PER_SECOND ) +#define AIR_PUMP_OPERATION_TIMEOUT ( 10 * MS_PER_SECOND ) typedef enum AirPumpMotorStates { @@ -92,6 +92,10 @@ if ( state < NUM_OF_AIR_PUMP_MOTOR_STATES ) { gioSetBit( hetPORT1, AIR_PUMP_GPIO_PIN, (U32)state ); + if ( state != currentAirPumpMotorState ) + { + SEND_EVENT_WITH_2_U32_DATA( HD_EVENT_AIR_PUMP_ON_OFF, (U32)state, 0 ); + } currentAirPumpMotorState = state; } else @@ -274,7 +278,7 @@ * The testSetAirPumpDataPublishIntervalOverride function overrides the * air pump data publish interval. * @details Inputs: none - * @details Outputs: airTrapDataPublishInterval + * @details Outputs: airPumpDataPublishInterval * @param value override air trap data publish interval with (in ms) * @return TRUE if override successful, FALSE if not *************************************************************************/