Commit Graph

35 Commits

Author SHA1 Message Date
murata 7721290160 AP_Scheduler:time_available value type invalid uint16_t to valid uint32_t. 2016-07-25 20:18:16 -03:00
Andrew Tridgell 63d0c040e4 AP_Scheduler: expose loop rate on all builds
as discussed with Randy
2016-06-17 15:02:28 +10:00
Andrew Tridgell fb4cdafef8 AP_Scheduler: allow SCHED_LOOP_RATE for copter in SITL
very useful for slow simulation environment
2016-06-17 15:01:18 +10:00
Andrew Tridgell ced4cce358 AP_Scheduler: added optional perf counters at SCHED_DEBUG >= 4 2016-04-21 16:45:02 +10:00
Andrew Tridgell cc25575b3a AP_Scheduler: prevent a startup crash in autotest for Rover 2016-01-05 16:31:06 +11:00
Andrew Tridgell c3829dfb64 AP_Scheduler: allow for arbitrary loop rates
it turns out 300Hz is pretty useful as it allows for triple EKF on
pixhawk
2016-01-04 08:37:31 +11:00
Lucas De Marchi eb9fd96d5c AP_Scheduler: remove trailing whitespace 2015-12-27 15:58:12 -02:00
Lucas De Marchi 3375b6b01c AP_Scheduler: stop using Progmem.h 2015-12-27 15:58:12 -02:00
Andrew Tridgell 1b1be7e4a2 AP_Scheduler: switch to Hz based scheduler config 2015-12-27 14:57:06 +09:00
Caio Marcelo de Oliveira Filho 81186e5416 AP_Scheduler: use millis/micros/panic functions 2015-11-20 12:34:17 +09:00
Lucas De Marchi 5244559010 Minimize AP_Progmem.h includes
Most of AP_Progmem is already gone so we can stop including it in most
of the places. The only places that need it are the ones using
pgm_read_*() APIs.

In some cases the header needed to be added in the .cpp since it was
removed from the .h to reduce scope. In those cases the headers were
also reordered.
2015-10-30 14:35:32 +09:00
Lucas De Marchi 20c6ffc5e3 Replace use of UARTDriver::printf_P() with UARTDriver::printf()
This also starts to show warnings on places that were already using
wrong printf format strings.
2015-10-30 14:35:25 +09:00
Lucas De Marchi 831d8acca5 Remove use of PROGMEM
Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:

    git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
    git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'

The 2 commands were done so we don't leave behind spurious spaces.

AVR-specific places were not changed.
2015-10-30 14:35:16 +09:00
Lucas De Marchi 2c38e31c93 Remove use of PSTR
The PSTR is already define as a NOP for all supported platforms. It's
only needed for AVR so here we remove all the uses throughout the
codebase.

This was automated with a simple python script so it also converts
places which spans to multiple lines, removing the matching parentheses.

AVR-specific places were not changed.
2015-10-30 14:35:04 +09:00
Gustavo Jose de Sousa 53b5b70960 AP_Scheduler: use also task name besides the id for logging
This makes it easier to identify for which task a log line is.
2015-09-01 20:22:19 +10:00
Gustavo Jose de Sousa c04b984e6c AP_Scheduler: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:23 +10:00
Andrew Tridgell dd691ae75c AP_Scheduler: all vehicles now use functors 2015-06-01 15:18:31 +10:00
Andrew Tridgell 7db9da6545 AP_Scheduler: removed delegate ptr handling
no longer needed
2015-05-26 14:33:30 +10:00
Lucas De Marchi 78b00784fb AP_Scheduler: allow to use functor 2015-05-26 13:46:50 +10:00
Andrew Tridgell 1237772479 AP_Scheduler: support member functions for rover 2015-05-21 07:48:46 +10:00
Andrew Tridgell 8ba5272b0e AP_Scheduler: fixed PSTR() usage 2015-05-05 13:54:27 +10:00
Tom Pittenger d823541eb1 AP_Scheduler: compile warnings: format not a string literal, argument types not checked
PSTR() goofs things up when using hal.console->printf_P()
2015-05-05 13:27:01 +10:00
Andrew Tridgell 67f5ba0b94 AP_Scheduler: added current_task static
will be used to debug stuck tasks on PX4
2014-07-03 09:09:11 +10:00
Andrew Tridgell c4d62f6b92 AP_Scheduler: fixed SCHED_DEBUG docs 2013-10-13 21:41:01 +11:00
Andrew Tridgell 0f4da25e68 AP_Scheduler: make sure we run remaining tasks on overrun
when a task overruns its time, we can still run the rest of the tasks
in the task list
2013-10-13 21:41:01 +11:00
Andrew Tridgell cfa1b5353f AP_Scheduler: show slips only for SCHED_DEBUG>1
this allows us to see PERF reports in copter without console writes
slowing things down
2013-10-10 15:41:34 +11:00
Andrew Tridgell dd4b9275fd AP_Scheduler: improved the accuracy of the scheduling code
prevent accumulated micros() errors in run()
2013-10-10 14:14:39 +11:00
Andrew Tridgell e8fc8cea01 AP_Scheduler: updated docs 2013-08-30 15:33:30 +10:00
Andrew Tridgell 97b7130bb9 libraries: update license header to GPLv3
we switched to GPLv3 a long time ago, but neglected to update the
per-file license headers
2013-08-30 13:01:39 +10:00
Andrew Tridgell b7e3851ef8 AP_Scheduler: prevent a divide by zero 2013-08-02 22:07:00 +10:00
Andrew Tridgell a192b9ee46 AP_Scheduler: added load_average() function
useful to give a load average in SYS_STATUS mavlink message
2013-07-26 16:07:00 +10:00
Andrew Tridgell c437900a49 AP_Scheduler: added SCHED_DEBUG=2
used to show overruns and slips
2013-04-21 23:46:35 +10:00
Andrew Tridgell 02bd24cf57 AP_Scheduler: fixed _last_run initialisation
another valgrind bug
2013-04-17 23:02:13 +10:00
Andrew Tridgell 64734dc51c AP_Scheduler: show scheduler task slips
this is when a task doesn't run at the desired rate
2013-01-12 13:04:52 +11:00
Andrew Tridgell 7ddadcf34e AP_Scheduler: added new scheduler library
this will be used for main loop control
2013-01-12 12:02:57 +11:00