Commit Graph

174 Commits

Author SHA1 Message Date
Peter Barker 5647141f70 AP_Scheduler: log RTC into PM message 2024-11-21 09:19:38 +11:00
Dr.-Ing. Amilcar do Carmo Lucas 12b761c534 AP_Scheduler: Use a range of values here because it is valid to do so.
Makes it easier for GUI applications to display this better and valudate the range
2024-11-05 09:25:59 +09:00
Andy Piper 64a1fda05a AP_Scheduler: record and make available the last sample time 2024-09-17 10:12:35 +10:00
Thomas Watson 6c2daabd21 AP_Scheduler: make overtime margin definable
Also warn about overtime on ESP32 which is most likely to hit it.
2024-09-02 09:21:08 +10:00
Andrew Tridgell 5af89a4291 AP_Scheduler: use NEW_NOTHROW for new(std::nothrow) 2024-06-04 09:20:21 +10:00
Peter Barker 35dbf93e13 AP_Scheduler: fixes for AP_SCHEDULER_ENABLED 2024-04-18 08:25:15 +10:00
Andrew Tridgell 09500df4a8 AP_Scheduler: fixed example test to pass/fail 2024-02-28 19:22:14 +11:00
Andrew Tridgell 7226c5107d AP_Schedule: fixed loop in example with sitl NULL 2024-02-28 19:22:14 +11:00
Peter Barker 9ce9f88254 AP_Scheduler: move logger object up to AP_Vehicle 2024-02-13 10:54:29 +11:00
Peter Barker 2d3fed9784 AP_Scheduler: allow compilation with HAL_LOGGING_ENABLED false 2024-01-17 18:25:55 +11:00
Peter Barker 0f4262de3d AP_Scheduler: correct compilation when AP_Vehicle not available 2023-12-13 18:34:40 +11:00
Peter Barker 3604c44000 AP_Scheduler: allow more libraries to compile with no HAL_GCS_ENABLED 2023-09-05 22:23:51 +10:00
Peter Barker 8b13413f43 AP_Scheduler: add and use AP_SCHEDULER_EXTENDED_TASKINFO_ENABLED 2023-06-27 10:43:39 +10:00
Peter Barker 435214852e AP_Scheduler: add and use AP_Scheduler_config.h 2023-06-27 10:43:39 +10:00
Peter Barker 3e84eb2358 AP_Scheduler: rename HAL_SCHEDULER_ENABLED to AP_SCHEDULER_ENABLED
there's AP_HAL::Scheduler which confuses this
2023-02-28 11:26:04 +11:00
Andrew Tridgell 5f6d3e5d8c AP_Scheduler: added ticks32() API
this is the number of scheduler ticks since boot, as uint32_t
2023-01-29 15:28:43 +11:00
Andrew Tridgell ebc9616e00 AP_Scheduler: guarantee that FAST_TASK tasks do run on every loop
the breakup of the fast loop resulted in us sometimes (under heavy CPU
load) not running a fast task on every loop
2022-12-06 17:09:33 +11:00
Andrew Tridgell 47df6f0ab6 AP_Scheduler: constrain the load average
prevent numerical errors on logging load with SIM_TIME_JITTER
2022-12-06 11:03:50 +11:00
Randy Mackay 064627de04 AP_Scheduler: load_average returns 1 if main loop running slowly 2022-12-06 11:00:51 +11:00
Randy Mackay d9aa366b59 AP_Scheduler: add get_filtered_loop_rate_hz 2022-12-06 11:00:51 +11:00
jackhong12 4a4f361a17 all: use CLASS_NO_COPY() macro 2022-10-04 11:23:04 +11:00
Peter Barker f0fc23bdcb AP_Scheduler: fix examples 2022-08-19 18:33:58 +10:00
Iampete1 a0fc8cc46a AP_Scheduler: params always use set method 2022-08-03 13:43:48 +01:00
murata 16d7f69949 AP_Scheduler: Console output can be disabled 2022-05-17 09:53:06 +10:00
Andy Piper 2209576c90 AP_Scheduler: refactor task info into TaskInfo
break fast_loop down into FastTasks to aid profiling
run fast tasks before scheduled tasks
fix scheduler example
introduce fast task priorities
remove fast loop
2022-05-03 08:20:13 +09:00
Peter Barker 27b34f8b5f AP_Scheduler: tidy includes 2022-05-03 09:14:58 +10:00
Peter Barker 26d6c2413b AP_Scheduler: update simulation state on embedded 2022-03-17 14:39:55 +11:00
Andy Piper 5855ead822 AP_Scheduler: allow 9999us for task display 2022-02-09 12:47:55 +00:00
Jaaaky e92c900b56 AP_Scheduler: Fix multi #include's 2021-12-21 10:38:46 +11:00
Peter Barker e1310b2082 AP_Scheduler: allow specification of Scheduler table priorities 2021-11-17 19:00:04 +11:00
Andy Piper 592241f029 AP_Scheduler: convert APM_BUILD_COPTER_OR_HELI() to APM_BUILD_COPTER_OR_HELI 2021-10-26 11:42:12 +11:00
Gone4Dirt 55f6feac9a AP_Scheduler: Add APM_BUILD_Heli 2021-09-29 19:55:48 +10:00
Pierre Kancir ec03c9eaf4 AP_Scheduler: correct pointer checking 2021-08-26 10:17:22 +10:00
murata 55c07e24c0 AP_Scheduler: Change the Task Performance Notification Level to Information 2021-06-13 22:47:24 -07:00
Tamas Nepusz c544f3dd01 AP_Scheduler: corrected tick counter overflow handling, fixes #17642 2021-06-10 12:46:27 +10:00
Peter Barker ef2e273ee6 AP_Scheduler: add support for AP_Logger into AP_Periph 2021-06-08 09:57:55 +10:00
Andrew Tridgell f6ec48e0e2 AP_Scheduler: removed perf counters 2021-06-07 14:29:27 +10:00
Pierre Kancir f2570d49a1 AP_Scheduler: fix example 2021-03-03 18:07:38 +11:00
Patrick José Pereira 806bc4898b AP_Scheduler: Add missing const in member functions
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-03 18:45:14 +11:00
Andrew Tridgell 6da0212ce4 AP_Scheduler: use ExpandingString class 2021-01-05 10:52:00 +11:00
Michael du Breuil 0f5179d204 AP_Scheduler: Emit last internal error line 2020-11-03 11:04:13 +11:00
Andy Piper af8d6c5fc9 AP_Scheduler: add the fast loop to task statistics 2020-10-07 18:08:19 +11:00
Andy Piper 958c19543f AP_Scheduler: print task total time as a percentage of all tasks time 2020-09-30 17:37:20 +10:00
Andy Piper 5b5b9d57a1 AP_Scheduler: add per-task performance information accesible from @SYS/tasks.txt
print fully qualified name on most boards
remove old task slip message
Don't die on allocation failure.
dynamically allocation/free task info based on SCHED_OPTIONS
dynamically enable task info on ftp get
2020-09-09 17:06:12 +10:00
Andy Piper a16bb2f188 AP_Scheduler: allow registration of tasks at loop rate 2020-02-22 11:15:37 +11:00
Michael du Breuil c257cea375 AP_Scheduler: Add a lock that is held during all normal operations 2020-02-18 09:16:10 +11:00
Peter Barker 5580196b1c AP_Scheduler: move clamping of loop rate to init function
Parameters may not be available in the constructor, and that's what we
need to be clamping.
2020-02-06 14:41:06 +11:00
Andy Piper debc13965a AP_Scheduler: add common tasks from AP_Vehicle and manage them 2019-12-30 13:02:04 +11:00
Andrew Tridgell ddde512b74 AP_Scheduler: use fill_nanf() on each scheduler function 2019-10-01 17:35:26 +10:00
Andrew Tridgell 79acaeaef1 AP_Scheduler: cope with high CPU load by stretching loop times
this adds an extra budget of time per loop when we are not achieving
scheduled tasks at a rate of at least 1/8 of the desired rate. This
fixes an issue where a vehicle can become uncontrollable if the user
asks for a SCHED_LOOP_RATE which is not achievable. As these events
happen we add extra loop budget until we are able to run all tasks. We
drop the extra time when the CPU pressure eases.
2019-09-19 18:25:20 +10:00