AP_Soaring: Use 64 bit variable for time to avoid overflow.

This commit is contained in:
Samuel Tabor 2019-08-07 15:33:06 -07:00 committed by Andrew Tridgell
parent 528dcc3f6b
commit 5ac801b2ac
2 changed files with 4 additions and 4 deletions

View File

@ -34,16 +34,16 @@ class SoaringController {
Vector3f _prev_update_location; Vector3f _prev_update_location;
// store time thermal was entered for hysteresis // store time thermal was entered for hysteresis
unsigned long _thermal_start_time_us; uint64_t _thermal_start_time_us;
// store position thermal was entered as a backup check // store position thermal was entered as a backup check
Vector3f _thermal_start_pos; Vector3f _thermal_start_pos;
// store time cruise was entered for hysteresis // store time cruise was entered for hysteresis
unsigned long _cruise_start_time_us; uint64_t _cruise_start_time_us;
// store time of last update // store time of last update
unsigned long _prev_update_time; uint64_t _prev_update_time;
bool _throttle_suppressed; bool _throttle_suppressed;

View File

@ -20,7 +20,7 @@ class Variometer {
const AP_Vehicle::FixedWing &_aparm; const AP_Vehicle::FixedWing &_aparm;
// store time of last update // store time of last update
unsigned long _prev_update_time; uint64_t _prev_update_time;
float _last_alt; float _last_alt;