From 3eb41d3ef254db5db7db322f1a279f6ccfa50b35 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Thu, 19 Jul 2012 22:18:36 -0500 Subject: [PATCH] When the systemmod callback happens exit if the operation is error or completed --- flight/Modules/System/systemmod.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/flight/Modules/System/systemmod.c b/flight/Modules/System/systemmod.c index 879c4ac86..56f4b7820 100644 --- a/flight/Modules/System/systemmod.c +++ b/flight/Modules/System/systemmod.c @@ -219,6 +219,12 @@ static void objectUpdatedCb(UAVObjEvent * ev) FlightStatusData flightStatus; FlightStatusGet(&flightStatus); + // When this is called because of this method don't do anything + if (objper.Operation == OBJECTPERSISTENCE_OPERATION_ERROR || + objper.Operation == OBJECTPERSISTENCE_OPERATION_COMPLETED) { + return; + } + // Execute action if disarmed if(flightStatus.Armed != FLIGHTSTATUS_ARMED_DISARMED) { retval = -1;