diff --git a/main/modes/wheelchairmode.cpp b/main/modes/wheelchairmode.cpp index beff612..1f4320d 100644 --- a/main/modes/wheelchairmode.cpp +++ b/main/modes/wheelchairmode.cpp @@ -1,5 +1,6 @@ #include "wheelchairmode.h" +#ifdef FEATURE_JOYSTICK using namespace std::chrono_literals; namespace modes { @@ -266,3 +267,4 @@ void WheelchairMode::update() } sendCommands(); } +#endif diff --git a/main/modes/wheelchairmode.h b/main/modes/wheelchairmode.h index c8d7622..5162b0b 100644 --- a/main/modes/wheelchairmode.h +++ b/main/modes/wheelchairmode.h @@ -12,6 +12,7 @@ #include "globals.h" #include "utils.h" +#ifdef FEATURE_JOYSTICK class WheelchairMode : public ModeInterface { using Base = ModeInterface; @@ -38,3 +39,4 @@ private: namespace modes { extern WheelchairMode wheelchairMode; } // namespace modes +#endif \ No newline at end of file diff --git a/main/presets.h b/main/presets.h index c8cc9b0..ecc7f97 100644 --- a/main/presets.h +++ b/main/presets.h @@ -122,11 +122,12 @@ constexpr ProfileSettings::MotortestMode defaultMotortestMode { .maxPwm = 400 }; - +#ifdef FEATURE_JOYSTICK constexpr ProfileSettings::WheelchairMode defaultWheelChairMode { .sensitivity0Kmh = 100, .sensitivity50Kmh = 10, }; +#endif constexpr ProfileSettings defaultProfileSettings { .limits = defaultLimits, @@ -135,6 +136,8 @@ constexpr ProfileSettings defaultProfileSettings { .tempomatMode = defaultTempomatMode, .larsmMode = defaultLarsmMode, .motortestMode = defaultMotortestMode, +#ifdef FEATURE_JOYSTICK .wheelchairMode = defaultWheelChairMode +#endif }; } // namespace presets