Andrew Tridgell
da6f6f3e41
PeriodicProcess: switch to SREG = oldSREG pattern for interrupt mask/restore
2012-11-20 22:31:23 +11:00
rmackay9
db15b3b563
AP_PeriodicProcessStub: fixed build due to missing reference to _suspended
2012-09-29 14:41:25 +09:00
rmackay9
56320d282f
AP_PeriodicProcess: added running() method which tells the caller whether the timer is suspended or not
2012-09-29 13:47:55 +09:00
rmackay9
2c29fd8ba4
AP_TimerProcess: added simple example sketch
2012-09-29 13:23:51 +09:00
Andrew Tridgell
24ab456f8e
PeriodProcess: fixed build warning
2012-09-25 07:10:35 +10:00
rmackay9
825246617e
AP_TimerProcess: add one additional slot for optical flow
2012-09-24 18:39:28 +09:00
rmackay9
b1b3b806ad
AP_PeriodicProcess: queue_process changes to suspend other processes before running queued process
...
Also restored suspend_timer to void return type
2012-09-10 11:37:58 +09:00
uncrustify
c4059511cb
uncrustify libraries/AP_PeriodicProcess/PeriodicProcess.h
2012-08-21 19:04:10 -07:00
uncrustify
c964bdf4ff
uncrustify libraries/AP_PeriodicProcess/AP_TimerProcess.h
2012-08-21 19:04:09 -07:00
uncrustify
777a9b9d88
uncrustify libraries/AP_PeriodicProcess/AP_PeriodicProcessStub.h
2012-08-21 19:04:09 -07:00
uncrustify
871849c4f5
uncrustify libraries/AP_PeriodicProcess/AP_PeriodicProcessStub.cpp
2012-08-21 19:04:09 -07:00
uncrustify
6c2822ad65
uncrustify libraries/AP_PeriodicProcess/AP_TimerProcess.cpp
2012-08-21 19:04:09 -07:00
Andrew Tridgell
2046e396a2
AnalogSource: make the Arduino AnalogSource interrupt driven
...
this fixes several problems with reading analog sources:
- we were getting poor values because we didn't wait long enough for
an analog source to settle
- we wasted a lot of CPU cycles waiting for conversions
- we were not taking averages over many samples, which we did with
the old AP_ADC driver on the APM1
2012-07-01 15:01:05 +10:00
Andrew Tridgell
57ac39649a
TimerProcess: added suspend_timer()/resume_timer()
...
this will be used to avoid races in driver initialisation
2012-05-01 12:06:54 +10:00
Randy Mackay
98f3386ea0
Arduino 1.0 - changed all #includes of "WProgram.h", "wiring.h" and "WConstants.h to "Arduino.h".
...
Modified FastSerial's write function to return size_t (number of bytes written).
2012-01-28 12:25:47 +09:00
Andrew Tridgell
f8e1d88815
TimerProcess: prevent a race in setting up the timer callbacks
2011-12-28 16:00:49 +11:00
Andrew Tridgell
d35113f8a6
TimerProcess: check for duplicate registrations
...
if a driver gets initialised twice, make sure it doesn't get called
twice in the timer loop
2011-12-28 16:00:48 +11:00
Andrew Tridgell
0a08a0b515
TimerProcess: make some variables uint8_t
...
save a couple of bytes
2011-12-28 16:00:48 +11:00
Andrew Tridgell
8cc2b7669b
PeriodicProcess: added set_failsafe() call
...
this adds an optional failsafe function that will be called in the
timer loop
2011-12-21 23:31:38 +11:00
Andrew Tridgell
4bbd5392ef
removed AperiodicProcess code
...
this code was never being used, and was more complex than it was
worth.
2011-12-17 07:29:09 +11:00
Andrew Tridgell
be1ba5354e
timer: enable interrupts during timer processing
...
this prevents us losing serial bytes when we call sensor drivers that
take more than 100usec to read.
We also prevent timer recursion by re-enabling the timer after all
callbacks are complete
2011-12-16 20:09:38 +11:00
Andrew Tridgell
5b4717ea55
timers: change to 1kHz timer by default
...
we were using a 227Hz timer, which is far too slow
2011-12-16 20:09:25 +11:00
Pat Hickey
a7b9c8b9cd
AP_PeriodicProcess: AP_TimerProcess can register multiple callbacks.
2011-12-11 15:21:10 -08:00
Pat Hickey
48f92c49fa
hil-sensors: added stub libraries for InertialSensor and PeriodicProcess
...
* Also added dummy ivar to APM_BMP085_hil
2011-11-25 20:00:18 -08:00
Pat Hickey
7474a8be53
purple: added PeriodicProcess library
...
this library provides a clean API for drivers to request periodic
timer driven calls at whatever rate they need
2011-11-25 20:00:16 -08:00