|
From: | Gareth Roberts |
Subject: | [Paparazzi-devel] Non-blocking module code |
Date: | Mon, 02 Jul 2012 23:46:05 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 |
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.cIt'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
[Prev in Thread] | Current Thread | [Next in Thread] |