Commit Graph

60 Commits

Author SHA1 Message Date
bresch f3990c84fc Parameter update - Rename variables in modules/navigator
using parameter_update.py script
2019-04-03 15:38:50 +02:00
Daniel Agar cf74166801 double promotion warning fix or ignore per module 2018-07-01 09:36:55 +00:00
Daniel Agar 3b5b12e1d1 move baro and magnetometer data out of sensor_combined 2018-04-11 23:26:58 -04:00
Daniel Agar 29b3950747 move geo and geo_lookup to PX4/ecl 2018-03-26 23:16:55 -04:00
Beat Küng f2dddc65a5 navigator: use new Param class 2018-03-13 17:35:15 +01:00
acfloria fd0be3c412 Remove MavLink dependency in navigator 2018-03-09 21:16:28 +01:00
Daniel Agar b524c8a20f navigator silence geofence update PX4_INFO 2018-01-14 12:53:53 +01:00
Daniel Agar f87402b16c navigator remove redundant param updates 2018-01-04 09:21:17 +01:00
Beat Küng 6d85a3c4e4 geofence: lock geofence items during a write transfers
- avoids race conditions when geofence data is updated in flight. During
  a transfer, the geofence module will not check for violations, which
  is done with the new dm_trylock method.
- there is an update counter stored in dataman, and for each write
  transaction this is increased, so that the geofence module can reload
  the data upon data change (after it's unlocked).
- single dm item updates are atomic already, so resetting the polygons
  to 0 does not need locking.
2017-08-04 18:08:51 +02:00
Beat Küng ed478f40fd geofence: implement circular areas 2017-08-04 18:08:51 +02:00
Beat Küng 401d6a1a6f navigator status: print how many polygons there are currently loaded 2017-08-04 18:08:51 +02:00
Beat Küng 4c1328483d geofence: disable altitude check if not configured
It currently cannot be configured via mavlink mission protocol.
2017-08-04 18:08:51 +02:00
Beat Küng 2981ece921 geofence: do not show an error for MAV_FRAME_GLOBAL_RELATIVE_ALT{,_INT} items
Since the altitude is not used, we can ignore this as well.
2017-08-04 18:08:51 +02:00
Beat Küng e52491c023 geofence: there is no altitude for geofence vertices, remove the TODO 2017-08-04 18:08:51 +02:00
Beat Küng 328e84117e navigator geofence: switch to new dataman data structure, support multiple polygons
This also removes the 'navigator fence <lon> <lat>' command to simplify
code (I don't think there's still use for that anymore). However the
file loading is still supported.

If goefence.txt does not exist, navigator will not clear the geofence
anymore on startup.
2017-08-04 18:08:51 +02:00
Beat Küng 52ca49c682 geofence: remove fence & fence_vertex messages
- this was never read
- it was implemented wrong, leading to memory access violations in
  publishFence (an integer was passed instead of the fence_s struct)
2017-08-04 18:08:51 +02:00
Daniel Agar ed1b442065 mission require valid landing after DO_LAND_START 2017-04-20 14:41:01 -04:00
Daniel Agar e927f3e040 clang-tidy modernize-use-nullptr 2017-02-01 22:15:50 -05:00
Daniel Agar 17990cf5dc geofence fix combined simple and polygon logic
- require being inside both fences, not either
2016-12-14 08:49:13 +01:00
Daniel Agar 6cdd188158 geofence max horz/vertical better messages 2016-11-19 15:16:00 +01:00
Daniel Agar c701085ed4 geofence fix code style 2016-11-19 15:16:00 +01:00
Michal Stasiak 9180268a17 Geofence: Param update fix (#5812) 2016-11-06 14:31:59 -05:00
Michal Stasiak 2bfac7ff4f Mission feasibility: Geofence check fix
Current implementation checks against geofence only if it is in polygon form.
When it's created via params, it accepts all the waypoints as the number of vertices = 0.
Thus, changed the function to the one that is used to check whether geofence is breached in flight.
2016-11-05 11:07:23 +01:00
Beat Küng ce0d31b7d9 mavlink log: ensure all critical & emergency msgs are also logged to console & ulog
Critical messages that the user sees should also go to the log file, so
that the exact error (with time) can later be analyzed from the log file.
2016-09-30 13:50:51 +02: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
Daniel Agar 1d0a667826 Geofence defaults (#5534)
* geofence messages too frequent

* geofence horz/vert disable with 0 instead of -1

-closes #5430
2016-09-26 22:50:36 +02:00
Nate Weibley 686fd5b125 Convert geofence distance params to float (#5435) 2016-09-02 11:49:53 -04: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
Daniel Agar a2ba34d1ae geofence violation actions 2015-10-27 09:28:30 +01:00
Simon Wilks 4eef65f313 Enable ms5611 driver and fix build errors. 2015-08-18 23:01:52 +02:00
Lorenz Meier 4565f57468 Merged release_v1.0.0 into master 2015-05-27 15:28:41 -07:00
Lorenz Meier c9e8af8e9b Update navigator to reflect topic updates. 2015-05-27 15:21:31 -07: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
Mark Charlebois 9758112e31 Use px4_config.h instead of nuttx/config.h
Modified code to use OS independent header file for config settings.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:55:41 -07:00
Daniel Agar 230c0b95e3 GF range warning limit mavlink critical messages
-only send a mavlink critical message every 3 seconds
2015-04-17 20:15:43 -04:00
Lorenz Meier 4b34221614 navigator: Get rid of audio tag in strings and use appropriate priority to get audio out when needed in the GCS 2015-04-14 13:25:49 +02:00
Daniel Agar 25dfd84b40 Geofence max horizontal and vertical distance
-changes GF_ON to GF_MODE
-adds GF_MAX_HOR_DIST and GF_MAX_VER_DIST params
2015-04-13 22:22:19 -04:00
Daniel Agar ce11cc9f32 geofence.cpp format 2015-01-22 15:02:43 +01:00
Daniel Agar 20a8b26ac8 Fixed coverity CID #12538 2015-01-22 15:02:43 +01:00
Ban Siesta 82383533c1 geofence: be more verbose if import fails 2014-12-21 14:09:30 +00:00
Ban Siesta b1f462a266 geofence: don't fall over lines containing just a LF 2014-12-21 14:09:04 +00:00
Thomas Gubler c7966d56f5 geofence: better usefeedback if loaded 2014-09-22 10:54:51 +02:00
Thomas Gubler bdccd69030 geofence: make some functions private, correctly update params 2014-08-24 15:27:31 +02:00
Thomas Gubler 81adc52671 geofence: add counter threshold for subsequent detections 2014-08-24 11:30:02 +02:00
Thomas Gubler 8262739b62 geofence: can select gps instead of global position 2014-08-24 11:14:15 +02:00
Thomas Gubler 5832948371 geofence: lat/lon is double
types changed but the geofence implentation was not updated, this was forgotten in 58792c5ca6
2014-08-17 12:37:14 +02:00
Thomas Gubler b100884220 geofence: support AMSL mode 2014-08-17 12:07:02 +02:00
Julian Oes 9bfae10b73 geofence: fixed warnings 2014-06-06 17:17:06 +02:00
Lorenz Meier 23fe9e6dc0 navigator: comment only changes / code style fixes 2014-05-15 07:22:36 +02:00