paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Non-blocking module code


From: Christophe De Wagter
Subject: Re: [Paparazzi-devel] Non-blocking module code
Date: Thu, 5 Jul 2012 08:26:56 +0200

Yes, you are blocking the entire autopilot. Particularly interesting especially if you use an IMU... that stops integrating for 2 seconds.

I think with the current messaging system you should make a
Volatile uint8_t telemetry_stop or use the stealth mode that used to be around?

Then your module could count the seconds in a 1Hz periodic, disable telemetry, wait for the buffers to clear, , wait an extra second, do what it needs to do and then re-enable the telemetry...

On Jul 3, 2012 12:46 AM, "Gareth Roberts" <address@hidden> wrote:
Hi all,

I've written a module to reset an xbee via AT commands every 5 minutes (yes, I'm back to the 868's...).

https://github.com/blutack/paparazzi/blob/v3.9/sw/airborne/modules/xbee_resetter/xbee_resetter.c

It's working well, but the problem I'm using sys_time_usleep to block for a second to allow all in-progress transmissions to clear out, and then another second long block to wait out the guard time.

Two questions:
- Am I correct in assuming there are no threads & the module code is blocking the main event loop (thereby making landings potentially interesting)?
- If yes, is there a relatively safe way to stop the AP code transmitting on the downlink, so I can allow the event loop to continue & re-implement the module using counters?

Many thanks,
Gareth

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]