74 Commits

Author SHA1 Message Date
Daniel Agar
e3e8c55e82 accel & gyro calibration helpers 2020-08-21 10:12:13 -04:00
Michal Stasiak
4f82f028e7 airspeed_calibration: Fix FD leak 2020-05-19 13:48:43 +02:00
Todd Colten
7c533e5a53
commander: Clarify airspeed calibration failure warning msg 2020-04-18 13:02:29 -04:00
Daniel Agar
de4f594937 DriverFramework purge
The bulk of this change was tightly coupled and needed to be deleted in one pass. Some of the smaller changes were things that broke as a result of the initial purge and subsequently fixed by further eradicating unnecessary platform differences. Finally, I deleted any dead code I came across in the related files I touched while going through everything.

 - DriverFramework (src/lib/DriverFramework submodule) completely removed
 - added dspal submodule in qurt platform (was brought in via DriverFramework)
 - all df wrapper drivers removed
 - all boards using df wrapper drivers updated to use in tree equivalents
 - unused empty arch/board.h on posix and qurt removed
 - unused IOCTLs removed (pub block, priv, etc)
 - Integrator delete methods only used from df wrapper drivers
 - commander: sensor calibration use "NuttX version" everywhere for now
 - sensors: update to px4_{open, read, close} instead of DevMgr wrapper (adc open for analog differential pressure)
 - battery_status: update to px4_{open, read, close} instead of DevMgr wrapper (adc open for analog differential pressure)
 - cdev cleanup conflicting typedefs and names with actual OS (pollevent_t, etc)
 - load_mon and top remove from linux boards (unused)
 - delete unused PX4_MAIN_FUNCTION
 - delete unused getreg32 macro
 - delete unused SIOCDEVPRIVATE define
 - named each platform tasks consistently
 - posix list_devices and list_topics removed (list_files now shows all virtual files)
2020-01-13 14:07:03 -05:00
Beat Küng
f30e01ec02 calibration: shorten too long messages 2019-11-29 14:14:00 -05:00
Daniel Agar
a8ea55d9b6
remove all <cmath> usage
* the NuttX c++ library is incomplete, let's avoid including it until we have a real standard library in place
2019-11-25 10:04:04 -05:00
Beat Küng
3198610f85 src/platforms: move all headers to platforms/common/include/px4_platform_common
and remove the px4_ prefix, except for px4_config.h.

command to update includes:
for k in app.h atomic.h cli.h console_buffer.h defines.h getopt.h i2c.h init.h log.h micro_hal.h module.h module_params.h param.h param_macros.h posix.h sem.h sem.hpp shmem.h shutdown.h tasks.h time.h workqueue.h; do for i in $(grep -rl 'include <px4_'$k src platforms boards); do sed -i 's/#include <px4_'$k'/#include <px4_platform_common\/'$k/ $i; done; done
for in $(grep -rl 'include <px4_config.h' src platforms boards); do sed -i 's/#include <px4_config.h/#include <px4_platform_common\/px4_config.h'/ $i; done

Transitional headers for submodules are added (px4_{defines,log,time}.h)
2019-10-30 11:48:47 +01:00
Daniel Agar
a5895e5a99
Revert "commander: update parameter strings to class enum"
This reverts commit c322f1d1568b73327916ce2363c80375e3b5485b.
2019-10-03 11:28:44 -04:00
Daniel Agar
c322f1d156 commander: update parameter strings to class enum 2019-10-02 19:43:32 -04:00
Julian Oes
d70b0f1c8c Replace sleep with px4_sleep
This is another step to isolate time from the system.
2018-12-22 10:32:18 +01:00
Julian Oes
5b9dea5604 Replacing usleep with px4_usleep
This is a step towards isolating time from the system.
2018-12-22 10:32:18 +01:00
Daniel Agar
48d9484ceb commander fix and enforce code style 2018-11-28 20:42:03 -05:00
Mara Bos
10c20b38ad Fix many format strings.
Fixes these invalid format strings:
- A `%d` for a pointer (replaced it by `%p`)
- A 0x%08x (and a 0x%0x8!) for a pointer (replaced by %p)
- 2 cases of `%d` for a `ssize_t` (replaced it by `%zi`)
- 1 case of a %u for an `int` (replaced by %i)
- 3 cases of %d for a `long` (replaced by %ld)
- 19 cases of `%d`, `%i`, `%u` or `%lu` for a `size_t` (replaced it by `%zu`)
- An unused formatting argument (removed it)
- A missing `%d` (added it)
- A missing `%s` (added it)
- 2 cases of `%llu` for a `uint64_t` (replaced it by `"%" PRIu64`)
- 6 cases of giving a string directly as format string (replaced it by `("%s", string)`)
- 2 cases of %*-s, which should probably have been %-*s.
  (Looks like NuttX accepts (the invalid) %*-s, but other platforms don't.)
- A %04x for a `uint32_t` (replaced by "%04" PRIx32)
2018-10-27 12:44:51 +02:00
Daniel Agar
20aabd3566 move systemlib/airspeed to standalone lib 2018-06-12 09:06:30 +02:00
Daniel Agar
ac55a0de58 airspeed calibration log critical when ports are swapped 2018-05-22 21:02:33 -04:00
Daniel Agar
ea3acb7121 cmake remove circular linking and reorganize
- px4_add_module now requires MAIN
 - px4_add_library doesn't automatically link
2018-04-29 21:48:54 -04:00
Lorenz Meier
ddf0ecfc38 Airspeed calibration: Ensure that the calibration state is stored correctly
This is necessary due to sensors that are so accurate that they have no offset at all.
2017-12-31 16:37:02 +01:00
Robbie Sharma
ab51a41793 Removed [cal] references from calibration_log_critical() routines. 2017-11-24 08:12:37 +01:00
Daniel Agar
b804616ad0 preflight check airspeed use differential_pressure 2017-07-08 21:54:04 +02:00
Daniel Agar
1c7833e3b1 airspeed calibration simplify logic 2017-07-06 10:05:07 -04:00
Daniel Agar
c45d369004 ms5525 use int64 for calculation 2017-07-06 10:05:07 -04:00
Daniel Agar
936f92fd0b airspeed verify using filtered differential pressure 2017-07-06 10:05:07 -04:00
Daniel Agar
72969f00d7 airspeed calibration error_count is uint64_t 2017-07-06 10:05:07 -04:00
Daniel Agar
7029be87c0 MS5525 differential pressure driver 2017-07-06 10:05:07 -04:00
Beat Küng
43afb8d41e sensor calibration: remove param_save_default() calls 2017-04-06 11:49:03 +02:00
Jonathan Lee
1d681b0356 Update URL in airspeed calibration error message
When a FW/VTOL system detects a missing airspeed sensor, it produces an error message.
This patch uses the new relevant URLs in the PX4 documentation.

Fixes #4549
2017-04-03 00:25:24 +02:00
Daniel Agar
df5d0ba8b9 airspeed cal more descriptive error message (#6324) 2017-01-13 17:26:27 -05:00
Andreas Antener
ef495d26b8 Airspeed calibration: wait on filter before preflight check 2016-12-02 22:56:48 +01:00
Daniel Agar
9e589cef48 airspeed calibration fail with any errors 2016-11-19 15:15:36 +01:00
Beat Küng
241fd629ce ERROR macro: get rid of the many 'oddly, ERROR is not defined for c++', use PX4_ERROR 2016-09-30 13:50:51 +02:00
Beat Küng
ddc4d70d51 airspeed_calibration: remove unused include 2016-07-07 11:35:50 +02:00
Lorenz Meier
3f169d9b78 Fix instructions for airspeed calibration 2016-05-07 14:37:55 +02:00
Julian Oes
8707cfe9f2 commander: use macro with wait in all calibrations 2016-04-05 15:36:03 -07:00
Julian Oes
bba0d0384d drivers/modules: changes after mavlink_log change
The mavlink_log API changes lead to changes in all drivers/modules using
it.
2016-03-24 13:10:02 +01:00
Lorenz Meier
092a51426f Build fix and airspeed console cal 2015-11-17 12:59:45 +01:00
Lorenz Meier
ea7ae7d019 Merged beta into master 2015-08-01 16:58:02 +02:00
Lorenz Meier
006dfbb14f Commander: Speed up airspeed calibration 2015-07-20 10:43:12 +02:00
Mark Charlebois
190814bc97 Merge remote-tracking branch 'upstream/master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	src/drivers/rgbled/rgbled.cpp
	src/modules/commander/PreflightCheck.cpp
	src/modules/commander/airspeed_calibration.cpp
	src/modules/commander/calibration_routines.cpp
	src/modules/commander/gyro_calibration.cpp
	src/modules/commander/mag_calibration.cpp
	src/modules/mc_att_control/mc_att_control_main.cpp
2015-04-28 11:48:26 -07:00
Don Gagne
a7f88d97b8 Sensor cal rework
- cancel support
- versioned cal messages
- better still detection
- better messaging
2015-04-26 14:34:19 +02:00
Mark Charlebois
c802beb3d7 QuRT and POSIX changes - part 3
More staged changes to support QuRT and related POSIX changes

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 01:13:08 -07:00
Mark Charlebois
694427e4ba Converted commander to use px4_posix calls
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Mark Charlebois
bba26c3430 Linux: enabled commander module
The commander module now compiles for Linux.

state_machine_helper_linux.cpp iterates over the virtual devices vs
all devices under /dev as per NuttX when disabling publishing.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Lorenz Meier
807cf7bd16 Commander: Implement calibration routines for multi-sensor setups 2015-02-09 22:56:23 +01:00
Lorenz Meier
b51c669344 Commander: Improve calibration routines to produce more conscise and better sequenced instructions 2014-11-02 21:24:50 +01:00
Julian Oes
a1b4d72d1f airspeed_calibration: stop talking about Pa and and hashtags (now the correct files) 2014-08-23 18:52:56 +02:00
Julian Oes
6480747c69 Revert "airspeed_calibration: stop talking about Pa and and hashtags"
This reverts commit c6fb75f66fa94444d07056f271980e3f05008f94.
2014-08-23 18:49:00 +02:00
Julian Oes
c6fb75f66f airspeed_calibration: stop talking about Pa and and hashtags 2014-08-23 18:44:09 +02:00
Lorenz Meier
e91a4217ad Fix warning 2014-07-15 07:54:12 +02:00
Lorenz Meier
9ce7820e41 Make instructions in commander more obvious for airspeed calibration 2014-07-14 08:32:51 +02:00
Lorenz Meier
ec8d395a2d build fix 2014-07-14 08:07:30 +02:00