HomePos: check corresponding validity before using data

This commit is contained in:
bresch
2020-10-23 16:12:36 +02:00
committed by Daniel Agar
parent 711bd2ce87
commit 3276916df9
3 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -162,7 +162,7 @@ public:
void reset_vroi() { _vroi = {}; }
bool home_alt_valid() { return (_home_pos.timestamp > 0 && _home_pos.valid_alt); }
bool home_position_valid() { return (_home_pos.timestamp > 0 && _home_pos.valid_alt && _home_pos.valid_hpos); }
bool home_position_valid() { return (_home_pos.timestamp > 0 && _home_pos.valid_alt && _home_pos.valid_hpos && _home_pos.valid_lpos); }
Geofence &get_geofence() { return _geofence; }