Cruise and walk
To use these functions it is necessary to have a button connected to the GPIO. Check the input mapping, it is necessary to map the cruise input (in_cruise
) to the GPIO.
- It is possible to use the same physical input for
in_cruise
(long press) andin_mapswitch
(short press) - Changing maps will always disable cruise
Cruise function
If the cruise is enabled, the controller will keep the speed at the current level. The cruise is activated by long pressing the cruise button. The cruise is deactivated by using the brake or throttle (if enabled in crsopts
).
The cruise can be enabled only if the relative speed is above the value walklvl
. Full motor speed is 1. By setting the walklvl
to 0.1, the cruise can be activated only if the speed is above 10% of the full speed.
Assisted walk function
It is a special mode of cruise. This feature can be helpful for pushing a bike up a hill. The walk is activated by pressing and holding the cruise button and is working until the button is released. Below speed walklvl
the assist, above the value, the cruise is activated.
Parameters
The mentioned variables are located in the folder /cruise
.
crsopts
Configuration options for cruise and walk.
Bit | Description |
---|---|
0 | Walk function enabled |
1 | Cruise function enabled |
2 | Cruise can be deactivated by throttle |
3 | Cruise can be deactivated by pressing the cruise button |
4 | Cruise is activaded by shortpress (instead of longpress) |
walklvl
[0-1]
The speed level for the walk function. The walk function is activated if the speed is below this value. The value is in range 0-1, where 1 is full speed. (i.e. 0.1 is 10% of the full speed)