@@ -64,7 +64,7 @@ class Mode
64
64
virtual bool init (bool ignore_checks) { return true ; }
65
65
virtual void run () = 0;
66
66
virtual bool requires_GPS () const = 0;
67
- virtual bool has_manual_throttle () const = 0;
67
+ virtual bool requires_altitude () const = 0;
68
68
virtual bool allows_arming (bool from_gcs) const = 0;
69
69
virtual bool is_autopilot () const { return false ; }
70
70
virtual bool in_guided_mode () const { return false ; }
@@ -198,7 +198,7 @@ class ModeManual : public Mode
198
198
virtual void run () override ;
199
199
bool init (bool ignore_checks) override ;
200
200
bool requires_GPS () const override { return false ; }
201
- bool has_manual_throttle () const override { return true ; }
201
+ bool requires_altitude () const override { return false ; }
202
202
bool allows_arming (bool from_gcs) const override { return true ; }
203
203
bool is_autopilot () const override { return false ; }
204
204
@@ -221,7 +221,7 @@ class ModeAcro : public Mode
221
221
222
222
bool init (bool ignore_checks) override ;
223
223
bool requires_GPS () const override { return false ; }
224
- bool has_manual_throttle () const override { return true ; }
224
+ bool requires_altitude () const override { return false ; }
225
225
bool allows_arming (bool from_gcs) const override { return true ; }
226
226
bool is_autopilot () const override { return false ; }
227
227
@@ -244,7 +244,7 @@ class ModeStabilize : public Mode
244
244
245
245
bool init (bool ignore_checks) override ;
246
246
bool requires_GPS () const override { return false ; }
247
- bool has_manual_throttle () const override { return true ; }
247
+ bool requires_altitude () const override { return false ; }
248
248
bool allows_arming (bool from_gcs) const override { return true ; }
249
249
bool is_autopilot () const override { return false ; }
250
250
@@ -267,7 +267,7 @@ class ModeAlthold : public Mode
267
267
268
268
bool init (bool ignore_checks) override ;
269
269
bool requires_GPS () const override { return false ; }
270
- bool has_manual_throttle () const override { return false ; }
270
+ bool requires_altitude () const override { return true ; }
271
271
bool allows_arming (bool from_gcs) const override { return true ; }
272
272
bool is_autopilot () const override { return false ; }
273
273
void control_depth ();
@@ -326,7 +326,7 @@ class ModeGuided : public Mode
326
326
327
327
bool init (bool ignore_checks) override ;
328
328
bool requires_GPS () const override { return true ; }
329
- bool has_manual_throttle () const override { return false ; }
329
+ bool requires_altitude () const override { return true ; }
330
330
bool allows_arming (bool from_gcs) const override { return true ; }
331
331
bool is_autopilot () const override { return true ; }
332
332
bool in_guided_mode () const override { return true ; }
@@ -380,7 +380,7 @@ class ModeAuto : public ModeGuided
380
380
381
381
bool init (bool ignore_checks) override ;
382
382
bool requires_GPS () const override { return true ; }
383
- bool has_manual_throttle () const override { return false ; }
383
+ bool requires_altitude () const override { return true ; }
384
384
bool allows_arming (bool from_gcs) const override { return true ; }
385
385
bool is_autopilot () const override { return true ; }
386
386
bool auto_loiter_start ();
@@ -421,7 +421,7 @@ class ModePoshold : public ModeAlthold
421
421
bool init (bool ignore_checks) override ;
422
422
423
423
bool requires_GPS () const override { return true ; }
424
- bool has_manual_throttle () const override { return false ; }
424
+ bool requires_altitude () const override { return true ; }
425
425
bool allows_arming (bool from_gcs) const override { return true ; }
426
426
bool is_autopilot () const override { return true ; }
427
427
@@ -448,7 +448,7 @@ class ModeCircle : public Mode
448
448
449
449
bool init (bool ignore_checks) override ;
450
450
bool requires_GPS () const override { return true ; }
451
- bool has_manual_throttle () const override { return false ; }
451
+ bool requires_altitude () const override { return true ; }
452
452
bool allows_arming (bool from_gcs) const override { return true ; }
453
453
bool is_autopilot () const override { return true ; }
454
454
@@ -470,15 +470,15 @@ class ModeSurface : public Mode
470
470
471
471
bool init (bool ignore_checks) override ;
472
472
bool requires_GPS () const override { return false ; }
473
- bool has_manual_throttle () const override { return false ; }
473
+ bool requires_altitude () const override { return false ; }
474
474
bool allows_arming (bool from_gcs) const override { return true ; }
475
475
bool is_autopilot () const override { return true ; }
476
476
477
477
protected:
478
478
const char *name () const override { return " SURFACE" ; }
479
479
const char *name4 () const override { return " SURF" ; }
480
480
Mode::Number number () const override { return Mode::Number::SURFACE; }
481
- bool sensorless_mode ;
481
+ bool nobaro_mode ;
482
482
};
483
483
484
484
@@ -493,7 +493,7 @@ class ModeMotordetect : public Mode
493
493
494
494
bool init (bool ignore_checks) override ;
495
495
bool requires_GPS () const override { return false ; }
496
- bool has_manual_throttle () const override { return false ; }
496
+ bool requires_altitude () const override { return false ; }
497
497
bool allows_arming (bool from_gcs) const override { return true ; }
498
498
bool is_autopilot () const override { return true ; }
499
499
0 commit comments