Commit Graph

113 Commits

Author SHA1 Message Date
Peter Barker 7d52746267 AP_Scheduler: use AP_FWVersion singleton 2018-06-18 19:10:37 +01:00
Peter Barker 01e0c03a12 AP_Scheduler: add singleton 2018-06-15 08:01:22 +10:00
Peter Barker 2d4d99e836 AP_Scheduler: remove unused log_dropped variable 2018-05-15 08:35:05 +09:00
Andrew Tridgell ce5db7b813 AP_Scheduler: fixed use of sqrt() 2018-05-07 11:43:23 +10:00
Andrew Tridgell 99884c89c9 AP_Scheduler: fixed build warning 2018-05-07 11:43:23 +10:00
Peter Barker c4ea83177f AP_Scheduler: remove unused ins error count logging 2018-04-04 14:21:20 +01:00
Peter Barker d5c57d949b AP_Scheduler: eliminate goto update_spare_ticks 2018-03-22 10:01:45 +11:00
Peter Barker badfde6f18 AP_Scheduler: use continue instead of nested-if (NFC) 2018-03-22 10:01:45 +11:00
Peter Barker 224ea50260 AP_Scheduler: continue in place of nested if (NFC) 2018-03-22 10:01:45 +11:00
Mark Whitehorn 919383a739 AP_Scheduler: add load_average() to PM log message 2018-02-21 23:53:08 +10:00
Andrew Tridgell 6cc007598e AP_Scheduler: initialise _last_loop_time_s in init() 2018-02-13 17:15:05 +11:00
Andrew Tridgell 8907cb3b23 AP_Scheduler: time in seconds should be a float 2018-02-13 17:15:05 +11:00
Peter Barker 8288198ac8 AP_Scheduler: force single-precision floating point calculations 2018-02-13 17:15:05 +11:00
Andrew Tridgell 491715bec7 AP_Scheduler: added get_last_loop_time_s()
this gives compatibility with previous G_Dt in copter
2018-02-13 17:15:05 +11:00
Andrew Tridgell f436901517 AP_Scheduler: fixed perf info to match previous behaviour 2018-02-13 17:15:05 +11:00
Andrew Tridgell e0c9d9b592 AP_Scheduler: fixed loop time available 2018-02-13 17:15:05 +11:00
Andrew Tridgell 24d6493453 AP_Scheduler: make loop times cover INS wait_for_sample
this matches past behaviour, and gives much more useful information to
a user wanting to know if their board it meeting its desired loop rate
2018-02-13 17:15:05 +11:00
Andrew Tridgell 434c3fffc7 AP_Scheduler: fixed filtered loop time 2018-02-13 17:15:05 +11:00
Andrew Tridgell 620d6ab4b8 AP_Scheduler: fixed merge issues 2018-02-13 17:15:05 +11:00
Peter Barker 73c0905b5e AP_Scheduler: pass log-performance-bit at init time rather than update time 2018-02-13 17:15:05 +11:00
Peter Barker 4672e9d4eb AP_Scheduler: resolve debug name conflict 2018-02-13 17:15:05 +11:00
Peter Barker d3c1b720c6 AP_Scheduler: move logging of PM messages to AP_Scheduler 2018-02-13 17:15:05 +11:00
Peter Barker d151b27e92 AP_Scheduler: move PERF: statustext sending into AP_Scheduler 2018-02-13 17:15:05 +11:00
Peter Barker baa6e04854 AP_Scheduler: change loop time to remove sleeping in wait_for_sample 2018-02-13 17:15:05 +11:00
Peter Barker 4909000441 AP_Scheduler: implement loop() 2018-02-13 17:15:05 +11:00
Peter Barker e713802c24 AP_Scheduler: add accessor for tick counter 2018-02-13 17:15:05 +11:00
Peter Barker ae9d4d514d AP_Scheduler: PerfInfo: allow specification of loop rate 2018-02-13 17:15:05 +11:00
Peter Barker d1781532d4 AP_Scheduler: PerfInfo: add pragma-once to header 2018-02-13 17:15:05 +11:00
Andrew Tridgell b3ed8fd3f9 AP_Scheduler: scale perf_info with loop rate
this allows it to be used for a wide range of loop rates
2018-02-08 17:36:33 +11:00
Andrew Tridgell 8dcf89b2b7 AP_Scheduler: put scheduler debug on console 2018-02-08 17:36:33 +11:00
Andrew Tridgell 8b0e9bcff4 AP_Scheduler: use pre-computed loop constants
this prevents changing the loop rate without a reboot. Too many
subsystems rely on a consistent loop rate to allow it to be changed
2018-01-20 15:35:58 +11:00
Peter Barker f2242e07db AP_Scheduler: remove memoisation in loop_period_s() 2018-01-20 15:35:58 +11:00
Peter Barker a6ac37d0ba AP_Scheduler: eliminate MAIN_LOOP_SECONDS macro 2018-01-20 15:35:58 +11:00
Andrew Tridgell 44dd079cb9 AP_Scheduler: allow for loop rates above 400Hz
with ChibiOS we can run copter at 1KHz with no scheduling misses. This
small PR allows that to be configured.
2018-01-20 10:40:37 +11:00
Andrew Tridgell 580af4a69a AP_Scheduler: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Peter Barker fd543fce6d AP_Scheduler: create AP::PerfInfo class 2017-11-16 15:31:53 +00:00
Peter Barker 5c2f68e8f5 Copter+AP_Scheduler: move perf_info.cpp into Scheduler 2017-11-16 15:31:53 +00:00
Lucas De Marchi 69b6d95cb2 global: use static method to construct AP_Board_Config{,_CAN} 2017-09-26 03:01:21 +01:00
Lucas De Marchi de680dac5b global: use static method to construct AP_Scheduler 2017-09-26 03:01:21 +01:00
Lucas De Marchi d3e12eb899 AP_Scheduler: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi 87b30b4552 global: use static method to construct AP_InertialSensor 2017-09-26 03:01:21 +01:00
Peter Barker b445313bf1 AP_Scheduler: remove loop-period argument from load_average
This now comes from a parameter rather than being hard-set
in the vehicle code

Also adds a method returning the max loop period based on the
loop rate
2017-08-01 19:39:27 +01:00
Andrew Tridgell 56aa467d60 AP_Scheduler: adjust debug levels
this is more useful for performance analysis of scheduler, using perf
command
2017-05-01 15:02:34 +10:00
jaxxzer ccb6434831 AP_Scheduler: Set main loop rate to 400hz for Sub 2017-02-21 11:26:14 +11:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
murata bb1a787852 AP_Scheduler: To add a comment to _loop_rate_hz variable. 2016-10-16 00:02:40 -07:00
Lucas De Marchi ae53920e5b build: don't build examples with old build system
We currently check examples are buildable with waf which doesn't need
the libraries to be specified in a make.inc file.  Having the makefiles
there is misleading since people try to build and realize the build is
broken.
2016-10-11 13:03:08 +11:00
Andy Little 0d113b265c Examples: fix examples for px4
The change to use AP_BoardConfig messed up the examples. Here are some
updated but there are plenty more to do.
2016-10-04 12:50:47 -03:00
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