Commit Graph

40 Commits

Author SHA1 Message Date
Randy Mackay 87cada1d54 Scheduler: remove INS start style from example sketch 2015-09-21 17:06:25 +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 b59154103f AP_Scheduler: use function name for AP_Scheduler task name
That makes it easier to identify tasks when debug is enabled in AP_Scheduler.
2015-09-01 20:22:19 +10:00
Gustavo Jose de Sousa 8fe466ce27 AP_Scheduler: add initializer for task field "name"
We use define it as an empty macro if on AVR board.
2015-09-01 20:22:18 +10:00
Gustavo Jose de Sousa 8018748fe2 AP_Scheduler: add field "name" to task structure for logging purposes
That field will be useful for logging as it is easier to know what task a log
is related to by using the task's name rather than using the number.
2015-09-01 20:22:18 +10:00
Gustavo Jose de Sousa 2e6074c108 AP_Scheduler: use designated initializers for tasks structs
Makes code less prone to break build and semantics (e.g., when a new field is
added).
2015-09-01 20:22:18 +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
Daniel Frenzel b9c0f34897 AP_Scheduler example
Fixed build problem with "make linux"

Signed-off-by: Daniel Frenzel <dgdanielf@gmail.com>
2015-08-10 19:49:38 +10:00
rentt ad32a98e29 Scheduler: fix compiler warning in example sketch
printf except a unsigned long value, but the hal.scheduler->millis() return a uint32_t
2015-07-28 12:06:46 +09:00
Lucas De Marchi d8b70dc0c5 AP_Scheduler: use ARRAY_SIZE macro 2015-07-21 14:25:13 +09:00
Lucas De Marchi 98a1a05933 AP_Scheduler: stop using alias FUNCTOR_BIND_VOID 2015-06-04 13:37:40 +09:00
Andrew Tridgell b2a5de8a63 AP_Scheduler: fixed example sketch 2015-06-01 17:42:32 +10:00
Andrew Tridgell ae4cfe3f2f AP_Scheduler: convert example from .pde to .cpp 2015-06-01 17:07:06 +10:00
Andrew Tridgell dd691ae75c AP_Scheduler: all vehicles now use functors 2015-06-01 15:18:31 +10:00
Andrew Tridgell 96b921d4cc AP_Scheduler: fixed example build 2015-05-26 14:37:14 +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
Lucas De Marchi 5dfb3ed70c AP_Scheduler: replace tabs with spaces 2015-05-26 13:46:49 +10:00
Andrew Tridgell 0847bd2608 AP_Scheduler: use APM_BUILD_DELEGATES 2015-05-21 07:48:51 +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 a4e8d960d2 AP_Scheduler: fix for HAL_SITL rename 2015-05-05 09:45:56 +10:00
Randy Mackay 75e2498da2 Scheduler: fix example sketch 2015-05-02 11:55:50 +09:00
Randy Mackay 857c3ef0e9 Scheduler: fix example sketch 2015-01-28 17:15:51 +09:00
Andrew Tridgell 48abfcede7 AP_Scheduler: added example sketch 2014-11-28 12:59:47 +11: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 1cb64dacf9 AP_Scheduler: expose debug variable 2013-01-12 12:06:55 +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