Index: firmware/App/Controllers/AirTrap.c =================================================================== diff -u -ra5560a2917aa62bcafd8e6a81041ace723237109 -r07c1dbf3b8227766cb584352d9ea86e230270260 --- firmware/App/Controllers/AirTrap.c (.../AirTrap.c) (revision a5560a2917aa62bcafd8e6a81041ace723237109) +++ firmware/App/Controllers/AirTrap.c (.../AirTrap.c) (revision 07c1dbf3b8227766cb584352d9ea86e230270260) @@ -505,5 +505,37 @@ return result; } +/*********************************************************************//** + * @brief + * The testSetAirTrapControl function sets the air trap to start or end + * auto level control. + * @details \b Inputs: none + * @details \b Outputs: airTrapDataPublishInterval + * @param message Override message from Dialin which includes the interval + * (in ms) to override the air trap broadcast interval to. + * @return TRUE if override request is successful, FALSE if not + *************************************************************************/ +BOOL testSetAirTrapControl( MESSAGE_T *message ) +{ + BOOL result = FALSE; + BOOL startControl = FALSE; + + if ( ( TRUE == isTestingActivated() ) && ( sizeof(BOOL) == message->hdr.payloadLen ) ) + { + result = TRUE; + memcpy( &startControl, message->payload, sizeof(BOOL) ); + if ( TRUE == startControl ) + { + startAirTrapControl(); + } + else + { + endAirTrapControl(); + } + } + + return result; +} + /**@}*/ Index: firmware/App/Controllers/AirTrap.h =================================================================== diff -u -raa6d45143096dfab776ce2ed7c775cfe2dd6db18 -r07c1dbf3b8227766cb584352d9ea86e230270260 --- firmware/App/Controllers/AirTrap.h (.../AirTrap.h) (revision aa6d45143096dfab776ce2ed7c775cfe2dd6db18) +++ firmware/App/Controllers/AirTrap.h (.../AirTrap.h) (revision 07c1dbf3b8227766cb584352d9ea86e230270260) @@ -60,6 +60,7 @@ BOOL isAirTrapControlling( void ); BOOL testAirTrapDataPublishIntervalOverride( MESSAGE_T *message ); +BOOL testSetAirTrapControl( MESSAGE_T *message ); /**@}*/ Index: firmware/App/Services/Messaging.c =================================================================== diff -u -r51f42cd88bd9c50ed9096a2d1d8ff859a95aff95 -r07c1dbf3b8227766cb584352d9ea86e230270260 --- firmware/App/Services/Messaging.c (.../Messaging.c) (revision 51f42cd88bd9c50ed9096a2d1d8ff859a95aff95) +++ firmware/App/Services/Messaging.c (.../Messaging.c) (revision 07c1dbf3b8227766cb584352d9ea86e230270260) @@ -155,7 +155,8 @@ { MSG_ID_TD_OP_MODE_PUBLISH_INTERVAL_OVERRIDE_REQUEST, &testSetOpModePublishIntervalOverride }, { MSG_ID_TD_OP_MODE_OVERRIDE_REQUEST, &testSetOperationMode }, { MSG_ID_TD_EJECTOR_MOTOR_SET_SPEED_REQUEST, &testSetEjectorMotorSpeed }, - { MSG_ID_TD_EJECTOR_COMMAND, &testEjectorCommand } + { MSG_ID_TD_EJECTOR_COMMAND, &testEjectorCommand }, + { MSG_ID_TD_SET_AIR_TRAP_CONTROL, &testSetAirTrapControl } }; #define NUM_OF_FUNCTION_HANDLERS (sizeof(MSG_FUNCTION_HANDLER_LOOKUP) / sizeof(MSG_HANDLER_LOOKUP_T))