Commit Graph

644 Commits

Author SHA1 Message Date
Lorenz Meier b07dde78e3 Move scheduling priorities into px4_tasks to simplify header usage 2017-08-02 21:18:35 +02:00
Lorenz Meier 494f7e4efb Properly document scheduling priorities 2017-08-02 21:18:35 +02:00
Lorenz Meier 501cec2469 Scheduling priorities: Formatting and sorting according to current system usage
this reflects what the system is currently using.
2017-08-02 21:18:35 +02:00
Beat Küng 8923664f30 param: seek to the beginning of the file before re-trying a failed export attempt 2017-07-29 23:10:47 +02:00
Beat Küng 931ef189b5 param: grab the shutdown lock while writing params to the file 2017-07-29 23:10:47 +02:00
Lorenz Meier 61b0a81bf9 HITL startup: Further simplification of boot logic in commander 2017-07-29 23:06:50 +02:00
Lorenz Meier 5838556742 HITL handling: Enforce the use of the activation parameter for HITL configuration 2017-07-29 23:06:50 +02:00
Beat Küng 7fc20049e0 param_shmem import: don't fail on type mismatch 2017-07-20 18:49:38 +02:00
Beat Küng 88b515390a flashparams import: don't fail on type mismatch 2017-07-20 18:49:38 +02:00
Beat Küng 2340e7073d param import: don't fail on type mismatch
This can happen for example when a param type is changed from int32 to
float. The type check will then fail if the param is stored and the param
import will be aborted.
Now we just skip the entry and continue loading the rest.
2017-07-20 18:49:38 +02:00
Beat Küng 0668d61665 SYS_FMU_TASK: add param to start fmu as task (default=work queue) 2017-07-18 20:06:10 +02:00
Beat Küng bb3b11e87a battery.cpp: initialize _current_filtered_a 2017-07-18 12:54:28 +02:00
David Sidrane 8e8510f398 Added Power Brick related battery_status.msg fields
system_source - This battery status is for the brick that is
                   supplying VDD_5V_IN
   priority      - Zero based, This battery status is for the brick
                   that is connected to the Power controller's
                   N-1 priority input. V1..VN. 0 would normally be
                   Brick1, 1 for Brick2 etc

  Battery now assigns connected from the api in the
  updateBatteryStatus, as well as system_source and priority
2017-07-17 21:02:50 -10:00
Beat Küng 35aa95c25f perf_counter.c: mention that the latency buckets are in us 2017-07-14 11:57:11 +02:00
Beat Küng 488bc9d7f3 hardfault_log.h: fix comments 2017-07-14 11:57:11 +02:00
Beat Küng 209f220288 hardfault_log: move hardfault_store_ulog_filename to logger module 2017-07-07 17:06:48 +02:00
Beat Küng 1be089cf0c BBSRAM: add another partition and store the last ulog path 2017-07-07 17:06:48 +02:00
imcnanie 629844adff Dodeca mixer using the AUX channels (#7532)
* Added Dodecarotor Mixer

* fixed formatting style

* Renamed dodeca mixers to top and bottom
2017-07-05 22:17:33 +02:00
Daniel Agar 8b3fb1e999 param fix parameters.xml dependency 2017-06-19 20:24:09 +02:00
Daniel Agar bd60f87283 move param jinja templates into relevant module 2017-06-12 12:18:53 -04:00
Daniel Agar 4937449890 move parameter unittest into systemcmds 2017-06-12 12:18:53 -04:00
Daniel Agar f26cd01d16 param gen reorganize and fix DISABLE_PARAMS_MODULE_SCOPING 2017-06-12 12:18:53 -04:00
Daniel Agar 24b26e53b9 cmake organize code coverage handling and base 2017-06-02 19:35:18 -04:00
Daniel Agar 768faa1ae3 clang-tidy param avoid malloc(0) 2017-06-02 19:35:18 -04:00
Daniel Agar 64ed96d81a clang-tidy readability-simplify-boolean-expr 2017-06-02 19:35:18 -04:00
bresch cdd7c57ded Multicopter mixer: When saturating, compute the new yaw value based on
the reduced thrust value
2017-05-30 12:01:42 +07:00
priseborough 519e903347 systemlib: Add circuit breaker parameter for position error checks 2017-05-03 08:37:14 +02:00
David Sidrane 6aadc75d18 Removed interrupt based locking on FMUv4 HW
The ramtron driver already calls SPI_LOCK when accessing the
  FRAM.

  Removed the interrupt lockout and anabled the SPI_LOCK
  in the ms5611 driver on any HW where the
  PX4_SPI_BUS_BARO == PX4_SPI_BUS_RAMTRON
2017-05-03 08:17:12 +02:00
Matthias Grob fac34de11e mixer_multirotor: switched to math::constrain (#7073)
- a local implementation was used before which is not necessary
2017-04-26 15:25:05 -04:00
Lorenz Meier 4d8b5e60c3 System: Set new logger system as the default
This will upgrade systems to the new .ulog format used by http://logs.px4.io and supported by Flight Plot
2017-04-24 10:12:23 +02:00
David Sidrane 0754e8f8bc Bugfix:hrt is used before it is initalized.
sched_note_{suspend|resume} were calling hrt_absolute_time before
   it hrt_init is called. This can lead to register access before
   clocking is enabled. The result is a hardfault.
2017-04-22 07:57:37 +02:00
Daniel Agar c1d9972244 commander add parameter COM_ARM_MIS_REQ
- arm without mission on by default
2017-04-20 11:18:32 -04:00
Beat Küng 694bf48422 system: add generic shutdown API 2017-04-20 10:01:51 +02:00
jwilson 57fa031e2b Fixes problem preventing params on snapdragon platforms from being saved to flash memory. 2017-04-20 09:06:13 +02:00
Nate Weibley 6a99281501 Incorporate @bkueng's feedback, inhibit bogus output on first pass 2017-04-19 17:24:55 +02:00
Nate Weibley 56f4f2b41f Fix top output, indentation for #7020
Previously load stats were stored outside of the printloop, but
with the refactoring to save memory state was reset and used in
the first loop before the actual load calculations were valid.

Fixed by moving the summary info to the bottom of the top printout
after everything is computed. Also restructured the callback to
not depend on a line counter and fixed astyle glitches.
2017-04-19 17:24:55 +02:00
crashmatt 304aeddf03 TinyBson - Compatibility with cpp compiler
Changed "private" keyword used for argument to "priv"
2017-04-19 08:29:23 +02:00
Daniel Agar 83cf4fb16e cmake multi_tables.py dependency 2017-04-10 23:31:56 +02:00
Beat Küng 044a767235 param: add PARAM_NO_AUTOSAVE: if defined, do not depend on LP work queue
Some NuttX configs do not have the work queues enabled.
2017-04-06 11:49:03 +02:00
Beat Küng dffba3e03b param: move variable definitions to the top of the file 2017-04-06 11:49:03 +02:00
Beat Küng a0e2b0c5a2 param: add param_control_autosave to enable/disable autosave 2017-04-06 11:49:03 +02:00
Beat Küng f3e9739ab0 param export: use writer lock
to protect against concurrent writes to the same file
2017-04-06 11:49:03 +02:00
Beat Küng a5cdff06d5 param: implement rate-limited autosave
- add a saving delay of 300ms
- save at most once every 2 seconds
2017-04-06 11:49:03 +02:00
Beat Küng e75f5a4642 perf_counter: add perf_print_counter_buffer & perf_iterate_all
These can be used to print the perf counters to a buffer.
2017-04-01 20:19:52 +02:00
Beat Küng 446c734edc perf_counter: use a mutex to protect concurrent access to the perf_counters linked list
perf_counters is read from and written to by different threads and thus
requires synchronization. Without it we risk accessing invalid memory.

There are still remaining issues (see comment in code), they will not lead
to a crash however.
2017-04-01 20:19:52 +02:00
Beat Küng 4b01e5b6b6 printload: add print_load_buffer() method
Instead of printing to an fd, this prints to a buffer and calls a callback
for each line. To avoid code duplication, the print_load has been refactored
to print to a buffer first, then print to an fd. The overhead is not
noticable, and the behavior of print_load is unchanged.
2017-04-01 20:19:52 +02:00
Beat Küng 9f3043f9ca printload: store total_runtime in a separate loop
Because during the printf, the total_runtime could be changed by another
task. This is still not entirely race-free though.
2017-04-01 20:19:52 +02:00
Beat Küng 23d0355979 printload: reduce memory usage of print_load_s
assuming CONFIG_MAX_TASKS = 32, this saves 256B of RAM
2017-04-01 20:19:52 +02:00
Beat Küng c46274043f printload: use sched_lock to protect access to tcb
what could have gone wrong before? A scheduling switch during the printload
could have led to a task exit, rendering the tcb invalid. After switching
back, printload would access invalid memory.

This keeps the sched_lock() section as small as possible, just grabbing the
tcb variables we need.
2017-04-01 20:19:52 +02:00
Beat Küng 4a7e02c640 systemlib/visibility.h: remove this file
This is duplicated in src/include/visibility and is directly included via
compiler flag '-include'
2017-03-29 23:02:09 +02:00