@@ -119,16 +119,16 @@ class Mode
119119 // true if mode can have terrain following disabled by switch
120120 virtual bool allows_terrain_disable () const { return false ; }
121121
122- // true if automatic switch to thermal mode is supported.
123- virtual bool does_automatic_thermal_switch () const {return false ; }
124-
125122 // subclasses override this if they require navigation.
126123 virtual void navigate () { return ; }
127124
128125 // this allows certain flight modes to mix RC input with throttle
129126 // depending on airspeed_nudge_cm
130127 virtual bool allows_throttle_nudging () const { return false ; }
131128
129+ // true if automatic switch to thermal mode is supported.
130+ virtual bool does_automatic_thermal_switch () const { return false ; }
131+
132132 // true if the mode sets the vehicle destination, which controls
133133 // whether control input is ignored with STICK_MIXING=0
134134 virtual bool does_auto_navigation () const { return false ; }
@@ -261,15 +261,15 @@ class ModeAuto : public Mode
261261 const char *name () const override { return " Auto" ; }
262262 const char *name4 () const override { return " AUTO" ; }
263263
264- bool does_automatic_thermal_switch () const override { return true ; }
265-
266264 // methods that affect movement of the vehicle in this mode
267265 void update () override ;
268266
269267 void navigate () override ;
270268
271269 bool allows_throttle_nudging () const override { return true ; }
272270
271+ bool does_automatic_thermal_switch () const override { return true ; }
272+
273273 bool does_auto_navigation () const override ;
274274
275275 bool does_auto_throttle () const override ;
@@ -368,6 +368,8 @@ class ModeGuided : public Mode
368368
369369 bool allows_throttle_nudging () const override { return true ; }
370370
371+ bool does_automatic_thermal_switch () const override { return true ; }
372+
371373 bool does_auto_navigation () const override { return true ; }
372374
373375 bool does_auto_throttle () const override { return true ; }
@@ -445,6 +447,8 @@ class ModeLoiter : public Mode
445447
446448 bool allows_throttle_nudging () const override { return true ; }
447449
450+ bool does_automatic_thermal_switch () const override { return true ; }
451+
448452 bool does_auto_navigation () const override { return true ; }
449453
450454 bool does_auto_throttle () const override { return true ; }
@@ -646,11 +650,11 @@ class ModeFBWB : public Mode
646650
647651 bool allows_terrain_disable () const override { return true ; }
648652
649- bool does_automatic_thermal_switch () const override { return true ; }
650-
651653 // methods that affect movement of the vehicle in this mode
652654 void update () override ;
653655
656+ bool does_automatic_thermal_switch () const override { return true ; }
657+
654658 bool does_auto_throttle () const override { return true ; }
655659
656660 bool mode_allows_autotuning () const override { return true ; }
@@ -672,15 +676,15 @@ class ModeCruise : public Mode
672676
673677 bool allows_terrain_disable () const override { return true ; }
674678
675- bool does_automatic_thermal_switch () const override { return true ; }
676-
677679 // methods that affect movement of the vehicle in this mode
678680 void update () override ;
679681
680682 void navigate () override ;
681683
682684 bool get_target_heading_cd (int32_t &target_heading) const ;
683685
686+ bool does_automatic_thermal_switch () const override { return true ; }
687+
684688 bool does_auto_throttle () const override { return true ; }
685689
686690 void update_target_altitude () override {};
0 commit comments