Commit Graph

26 Commits

Author SHA1 Message Date
Dennis Mannhart
2f164602b4 LandDetector:
- constructor initalization fix
- set trigger time for ground contact hysteresis
- updated ground_contact_state logic
MulticopterLandDetector:
- added hysteresis for ground_contact
VtolLandDetector:
- get_ground_contact_state function that return the one form MultcopterLandDetector
FixedWingLandDetector:
- get_ground_contact_state with a return false: requires implementation
2017-01-28 16:23:04 +01:00
Julian Oes
21bc5d1716 land_detector: remove leftover printf (#5178) 2016-07-31 07:49:11 -07:00
Julian Oes
50cac88e5b land_detector: big refactor, share update function
This is a big refactor and general cleanup of the land detector. The
main functional change is to share the hysteresis lib across all land
detectors.
2016-07-30 12:26:56 +02:00
tumbili
8026273cb0 land_detector: do not publish if landing or freefall state has not changed
Signed-off-by: tumbili <roman@px4.io> and bkueng <beat-kueng@gmx.net>
2016-06-23 15:56:51 +02:00
Julian Oes
b2719cf439 land_detector: publish when there is proper data
Instead of publishing before even having done update(), let's wait for a
result and then advertise.
2016-06-07 12:34:54 +02:00
Julian Oes
49ae3e17d5 land_detector: fix wrong astyle formatting (#4399) 2016-04-29 15:36:18 +02:00
Lorenz Meier
1b11049e42 Land detector: fix code style 2016-04-29 15:01:39 +02:00
Lorenz Meier
5c1d2c1cee Land-detector: Better granularity for manual and auto flight modes 2016-04-29 14:50:45 +02:00
Lorenz Meier
3ccd9988d3 Multicopter land detector: Enforce sync between system and detector 2016-04-29 12:34:58 +02:00
Emmanuel Roussel
e6b3cf3ac9 Fix code style
(Ran AStyle)
2016-04-18 22:27:11 +02:00
Emmanuel Roussel
35110a52f9 Added room in land_detector code for free-fall detection 2016-04-18 22:27:11 +02:00
Lorenz Meier
f02dc3c95f Fixed wing land detector: Use control state, use horizontal acceleration for takeoff detect 2015-11-17 14:15:41 +01:00
Lorenz Meier
fc29fed260 Land detector: Fix code style 2015-10-19 13:47:57 +02:00
Lorenz Meier
0318c1b330 Land detector: Run in work queue 2015-10-10 22:23:34 +02:00
Lorenz Meier
88bb98379e Land detector: Add required POSIX header 2015-09-20 10:58:18 +02:00
Lorenz Meier
ea7ae7d019 Merged beta into master 2015-08-01 16:58:02 +02:00
Lorenz Meier
9f322a395e Make land detector more robust during initial spool-up 2015-07-19 18:30:52 +02:00
Mark Charlebois
1ca05aaa64 orb_advert_t changed to void * and checks changed to nullptr
The existing orb_advert_t use thoughout the code sometimes tries
to treat it as a file descriptor and there are checks for < 0
and ::close calls on orb_advert_t types which is an invalid use
of an object pointer, which is what orb_advert_t really is.

Initially I had changed the -1 initializations to 0 but it was
suggested that this should be nullptr. That was a good recommendation
but the definition of orb_advert_t had to change to void * because
you cannot initialize a uintptr_t as nullptr.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:42:49 -07:00
Mark Charlebois
a734fc96d1 extensive orb_advert_t fixes
The calls to orb_advertise were being mishandled throughout the code.
There were ::close() calls on memory pointers, there were checks
against < 0 when it is a pointer to a object and values larger than
0x7ffffffff are valid. Some places orb_advert_t variables were
being initialized as 0 other places as -1.

The orb_advert_t type was changed to uintptr_t so the pointer value
would not be wrapped as a negative number. This was causing a failure
on ARM.

Tests for < 0 were changed to == 0 since a null pointer is the valid
representation for error, or uninitialized.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:41:33 -07:00
Daniel Agar
8aae66b893 trivial code style cleanup round 2 2015-03-27 23:38:58 -04:00
Lorenz Meier
378dcc53d6 Code style: minor comment styling 2015-01-17 23:32:00 +01:00
Lorenz Meier
b1127315b4 Fixed land detector param names 2015-01-17 23:26:43 +01:00
Johan Jansen
e40d207311 AStyle: Fixed file formatting 2015-01-15 14:37:51 +01:00
Johan Jansen
1356c44f0e LandDetector: Fix land detection algorithm not being initialized 2015-01-15 14:37:51 +01:00
Johan Jansen
9ea086bf2d Astyle: Run astyle to fix code formatting 2015-01-15 14:37:51 +01:00
Johan Jansen
10a2dd8a34 LandDetector: Merged fixedwing and multicopter into one module handling both algorithms 2015-01-15 14:37:51 +01:00