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

These functions require a GPIO-connected button. The cruise input (in_cruise) must be mapped to GPIO through input mapping.
- One physical input can serve both
in_cruise(long press) andin_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
All parameters are located in the /cruise folder.
| Parameter | Description |
|---|---|
cruise_pid | Parameters for tuning the PID controler |
setpoint | Shows the desired motor RPM calculated from vehicle speed when cruise is set |
maxacc | Maximum 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.
| Parameter | Description |
|---|---|
walk speed | Speed of the walk function |
cr min speed | Cruise will activate above this speed. This speed will be set if step for PID incrsopts is enabled |
cr max speed | If vehicle speed exceeds this value, setpoint will be limited to this value. |