Fixes for normal bobbycars
This commit is contained in:
@ -121,7 +121,7 @@ void update()
|
|||||||
|
|
||||||
const auto now = espchrono::millis_clock::now();
|
const auto now = espchrono::millis_clock::now();
|
||||||
|
|
||||||
const std::chrono::milliseconds dpadDebounce{configs.dpadDebounce.value};
|
const std::chrono::milliseconds dpadDebounce{configs.dpadDebounce.value()};
|
||||||
|
|
||||||
for (auto i = 0; i < 10; i++)
|
for (auto i = 0; i < 10; i++)
|
||||||
if (lastState[i] != newState[i] && now - debounce[i] > dpadDebounce)
|
if (lastState[i] != newState[i] && now - debounce[i] > dpadDebounce)
|
||||||
|
@ -68,11 +68,11 @@ void readPotis()
|
|||||||
|
|
||||||
#ifndef FEATURE_JOYSTICK
|
#ifndef FEATURE_JOYSTICK
|
||||||
if (raw_gas)
|
if (raw_gas)
|
||||||
gas = cpputils::mapValueClamped<float>(*raw_gas, configs.gasMin.value, configs.gasMax.value, 0., 1000.);
|
gas = cpputils::mapValueClamped<float>(*raw_gas, configs.gasMin.value(), configs.gasMax.value(), 0., 1000.);
|
||||||
else
|
else
|
||||||
gas = std::nullopt;
|
gas = std::nullopt;
|
||||||
if (raw_brems)
|
if (raw_brems)
|
||||||
brems = cpputils::mapValueClamped<float>(*raw_brems, configs.bremsMin.value, configs.bremsMax.value, 0., 1000.);
|
brems = cpputils::mapValueClamped<float>(*raw_brems, configs.bremsMin.value(), configs.bremsMax.value(), 0., 1000.);
|
||||||
else
|
else
|
||||||
brems = std::nullopt;
|
brems = std::nullopt;
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user