From b879bd8fb48001556ab994dad45a4d7423932b0a Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Tue, 18 Feb 2014 01:04:43 +0100 Subject: [PATCH] OP-1232 set lowpriority field on all other UAVObjEvent usage intances --- flight/modules/CameraStab/camerastab.c | 1 + flight/modules/Logging/Logging.c | 7 ++++++- flight/modules/TxPID/txpid.c | 1 + flight/uavobjects/uavobjectmanager.c | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/flight/modules/CameraStab/camerastab.c b/flight/modules/CameraStab/camerastab.c index b39a19492..d6e9aed26 100644 --- a/flight/modules/CameraStab/camerastab.c +++ b/flight/modules/CameraStab/camerastab.c @@ -128,6 +128,7 @@ int32_t CameraStabInitialize(void) .obj = AttitudeStateHandle(), .instId = 0, .event = 0, + .lowPriority = false, }; EventPeriodicCallbackCreate(&ev, attitudeUpdated, SAMPLE_PERIOD_MS / portTICK_RATE_MS); diff --git a/flight/modules/Logging/Logging.c b/flight/modules/Logging/Logging.c index 504b58abf..c0592dd0a 100644 --- a/flight/modules/Logging/Logging.c +++ b/flight/modules/Logging/Logging.c @@ -73,7 +73,12 @@ int32_t LoggingStart(void) FlightStatusConnectCallback(FlightStatusUpdatedCb); SettingsUpdatedCb(DebugLogSettingsHandle()); - UAVObjEvent ev = { .obj = DebugLogSettingsHandle(), .instId = 0, .event = EV_UPDATED_PERIODIC }; + UAVObjEvent ev = { + .obj = DebugLogSettingsHandle(), + .instId = 0, + .event = EV_UPDATED_PERIODIC, + .lowPriority = true, + }; EventPeriodicCallbackCreate(&ev, StatusUpdatedCb, 1000); // invoke a periodic dispatcher callback - the event struct is a dummy, it could be filled with anything! StatusUpdatedCb(&ev); diff --git a/flight/modules/TxPID/txpid.c b/flight/modules/TxPID/txpid.c index f0c269c01..0ebcaceb4 100644 --- a/flight/modules/TxPID/txpid.c +++ b/flight/modules/TxPID/txpid.c @@ -111,6 +111,7 @@ int32_t TxPIDInitialize(void) .obj = AccessoryDesiredHandle(), .instId = 0, .event = 0, + .lowPriority = false, }; EventPeriodicCallbackCreate(&ev, updatePIDs, SAMPLE_PERIOD_MS / portTICK_RATE_MS); diff --git a/flight/uavobjects/uavobjectmanager.c b/flight/uavobjects/uavobjectmanager.c index f5077c982..579f71104 100644 --- a/flight/uavobjects/uavobjectmanager.c +++ b/flight/uavobjects/uavobjectmanager.c @@ -1719,6 +1719,7 @@ static int32_t sendEvent(struct UAVOBase *obj, uint16_t instId, UAVObjEventType .obj = (UAVObjHandle)obj, .event = triggered_event, .instId = instId, + .lowPriority = false, }; // Go through each object and push the event message in the queue (if event is activated for the queue)