Skip to main content
Firmware Stable

Cruise and Walk

The speed is maintained using PID control, its parameters can be tuned in the cruise_pid folder.

cruise.png

These functions require a GPIO-connected button. The cruise input (in_cruise) must be mapped to GPIO through input mapping.

tip
  • One physical input can serve both in_cruise (long press) and in_mapswitch (short press)
  • Map changes automatically disable cruise mode

Behaviour

When cruise is activated by long-pressing the cruise button set in Input mapping (/io/IN_cruise), cruise control maintains the current speed level read by the wheel sensor. Brake always deactivates cruise. Deactivation by accelerator or by pressing the button again can be enabled in crsopts.

Cruise activation requires the speed from the wheel to be higher than limits - cr min speed. Below this value, the walk function will activate.

Walk mode helps when pushing a bike uphill. Activate walk assist by pressing and holding the cruise button, this will hold the speed at limits - walk speed until release.

Parameters

info

All parameters are located in the /cruise folder.

ParameterDescription
cruise_pidParameters for tuning the PID controler
setpointShows the desired motor RPM calculated from vehicle speed when cruise is set
maxaccMaximum current for acceleration (0-1)

crsopts

Configuration options for cruise and walk functionality.

limits [km/h]

This is an aray containing various speed limits for cruise and walk. For proper operation these must be set from lowest to highest.

ParameterDescription
walk speedSpeed of the walk function
cr min speedCruise will activate above this speed. This speed will be set if step for PID incrsopts is enabled
cr max speedIf vehicle speed exceeds this value, setpoint will be limited to this value.