Peter Barker
d151b27e92
AP_Scheduler: move PERF: statustext sending into AP_Scheduler
7 years ago
Peter Barker
baa6e04854
AP_Scheduler: change loop time to remove sleeping in wait_for_sample
7 years ago
Peter Barker
4909000441
AP_Scheduler: implement loop()
7 years ago
Peter Barker
e713802c24
AP_Scheduler: add accessor for tick counter
7 years ago
Peter Barker
ae9d4d514d
AP_Scheduler: PerfInfo: allow specification of loop rate
7 years ago
Peter Barker
d1781532d4
AP_Scheduler: PerfInfo: add pragma-once to header
7 years ago
Andrew Tridgell
b3ed8fd3f9
AP_Scheduler: scale perf_info with loop rate
...
this allows it to be used for a wide range of loop rates
7 years ago
Andrew Tridgell
8dcf89b2b7
AP_Scheduler: put scheduler debug on console
7 years ago
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
7 years ago
Peter Barker
f2242e07db
AP_Scheduler: remove memoisation in loop_period_s()
7 years ago
Peter Barker
a6ac37d0ba
AP_Scheduler: eliminate MAIN_LOOP_SECONDS macro
7 years ago
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.
7 years ago
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
7 years ago
Peter Barker
fd543fce6d
AP_Scheduler: create AP::PerfInfo class
7 years ago
Peter Barker
5c2f68e8f5
Copter+AP_Scheduler: move perf_info.cpp into Scheduler
7 years ago
Lucas De Marchi
69b6d95cb2
global: use static method to construct AP_Board_Config{,_CAN}
8 years ago
Lucas De Marchi
de680dac5b
global: use static method to construct AP_Scheduler
8 years ago
Lucas De Marchi
d3e12eb899
AP_Scheduler: add static create method
8 years ago
Lucas De Marchi
87b30b4552
global: use static method to construct AP_InertialSensor
8 years ago
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
8 years ago
Andrew Tridgell
56aa467d60
AP_Scheduler: adjust debug levels
...
this is more useful for performance analysis of scheduler, using perf
command
8 years ago
jaxxzer
ccb6434831
AP_Scheduler: Set main loop rate to 400hz for Sub
8 years ago
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.
8 years ago
murata
bb1a787852
AP_Scheduler: To add a comment to _loop_rate_hz variable.
8 years ago
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.
8 years ago
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.
9 years ago
murata
7721290160
AP_Scheduler:time_available value type invalid uint16_t to valid uint32_t.
9 years ago
Andrew Tridgell
63d0c040e4
AP_Scheduler: expose loop rate on all builds
...
as discussed with Randy
9 years ago
Andrew Tridgell
fb4cdafef8
AP_Scheduler: allow SCHED_LOOP_RATE for copter in SITL
...
very useful for slow simulation environment
9 years ago
Andrew Tridgell
ced4cce358
AP_Scheduler: added optional perf counters at SCHED_DEBUG >= 4
9 years ago
Lucas De Marchi
f5437f30ac
AP_Scheduler: replace header guard with pragma once
9 years ago
Gustavo Jose de Sousa
c2e3f05dbf
waf: ardupilotwaf: prefix build context methods with ap_
...
It helps to distinguish between things from waf and things from ardupilotwaf.
9 years ago
Gustavo Jose de Sousa
3d22490397
waf: examples: use methods from bld instead of ardupilotwaf
9 years ago
Gustavo Jose de Sousa
d281067bcc
waf: make example binaries be placed in 'examples' dir
...
This commit makes examples' wscripts use ardupilotwaf.example() instead of
ardupilot.program().
9 years ago
Andrew Tridgell
cc25575b3a
AP_Scheduler: prevent a startup crash in autotest for Rover
9 years ago
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
9 years ago
Jonathan Challinger
94543d55bb
AP_Scheduler: fix example build
9 years ago
Lucas De Marchi
a096703b06
Global: don't link with AP_Progmem
...
AP_Progmem is not used anymore.
9 years ago
Lucas De Marchi
eb9fd96d5c
AP_Scheduler: remove trailing whitespace
9 years ago
Lucas De Marchi
3375b6b01c
AP_Scheduler: stop using Progmem.h
9 years ago
Andrew Tridgell
1b1be7e4a2
AP_Scheduler: switch to Hz based scheduler config
9 years ago
Lucas De Marchi
c59490677d
AP_Scheduler: remove unused AP_ADC_AnalogSource
9 years ago
Caio Marcelo de Oliveira Filho
6e7b73610d
waf: add waf support
9 years ago
Caio Marcelo de Oliveira Filho
81186e5416
AP_Scheduler: use millis/micros/panic functions
9 years ago
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.
9 years ago
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.
9 years ago
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.
9 years ago
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.
9 years ago
Caio Marcelo de Oliveira Filho
12850742f9
AP_Scheduler: remove unnecessary includes from example
9 years ago
Caio Marcelo de Oliveira Filho
ec52df991c
build: compile only the HAL files needed by the board
...
Instead of requiring every program to specify the HAL related modules,
let the build system do it (in practice everything we compiled depended
on HAL anyway). This allow including only the necessary files in the
compilation.
9 years ago