Added some ifdefs

This commit is contained in:
CommanderRedYT
2022-01-09 16:50:57 +01:00
parent eed2ee4b23
commit 5d4bd322dc
3 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -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