Geofence: rework messaging and notification

- do reporting of breaching in-air only in geofenceCheck
- remove geofence_violation_reason_t
- replace geofence_breached field in GeofenceResult.msg with 3 fields
(one for each GF type: max dist, max alt, custom geofence)
- the warning message after breaching a GF is only done by Commander,
and it's specific to the GF type failure

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2023-11-22 21:45:02 -05:00
committed by Daniel Agar
parent 3c194d552a
commit 2865bbb8ab
10 changed files with 127 additions and 123 deletions
+8 -8
View File
@@ -76,12 +76,11 @@ PARAM_DEFINE_INT32(GF_ACTION, 2);
*/
PARAM_DEFINE_INT32(GF_SOURCE, 0);
/**
* Max horizontal distance in meters.
* Max horizontal distance from Home
*
* Maximum horizontal distance in meters the vehicle can be from home before triggering a geofence action. Disabled if 0.
* Maximum horizontal distance in meters the vehicle can be from Home before triggering a geofence action.
* Disabled if 0.
*
* @unit m
* @min 0
@@ -89,12 +88,13 @@ PARAM_DEFINE_INT32(GF_SOURCE, 0);
* @increment 1
* @group Geofence
*/
PARAM_DEFINE_FLOAT(GF_MAX_HOR_DIST, 0);
PARAM_DEFINE_FLOAT(GF_MAX_HOR_DIST, 0.0f);
/**
* Max vertical distance in meters.
* Max vertical distance from Home
*
* Maximum vertical distance in meters the vehicle can be from home before triggering a geofence action. Disabled if 0.
* Maximum vertical distance in meters the vehicle can be from Home before triggering a geofence action.
* Disabled if 0.
*
* @unit m
* @min 0
@@ -102,7 +102,7 @@ PARAM_DEFINE_FLOAT(GF_MAX_HOR_DIST, 0);
* @increment 1
* @group Geofence
*/
PARAM_DEFINE_FLOAT(GF_MAX_VER_DIST, 0);
PARAM_DEFINE_FLOAT(GF_MAX_VER_DIST, 0.0f);
/**
* [EXPERIMENTAL] Use Pre-emptive geofence triggering