Lock
If the controller is locked, the drive is disabled. The controller can be locked using GPIO or IOT protocol
The lock feature is optional and it is not available in all mods. If you are not sure if your mod supports the lock feature, check the terminal output after the boot. If the lock feature is supported, you will see the following message: - Lock
or - Lock lite
.
Lock lite
support means that only lock over IOT is supported and the lock allows only freewheeling mode.Lock
support means that lock over GPIO and IOT is supported.
GPIO lock
The controller can be locked using a button or switch connected to the GPIO. Check the input mapping, it is necessary to map the lock input (in_lock
) to the GPIO.
The lock can be activated by short press, long press or by level (switch). The lock can be configured in the /lock/lockopts
parameter.
IOT lock
The controller can be locked using the IOT protocol. The lock can be activated by sending the lock
command.
This approach is also used by siliXcon VDS display.
Enable lock at startup, if you want to use lock with the display. Otherwise, the device will be unlocked after the startup.
Parameters
The mentioned variables are located in the folder /lock
.
With Lock lite
only lockopts
parameter is available. Other parameters are available only with lock
(full) support.
lockopts
Using this parameter, the behavior of the lock can be configured. The parameter is a bitwise parameter.
Bit | Description |
---|---|
0 | Lock is activated by short press |
1 | Lock is activated by long press |
2 | Lock is activated by level (switch) |
3 | Controller start in lock state. (ie. lock the device at startup) |
If you want to use the lock with the display, enable the lock at startup.
locktim
[s]
After this timeout, the device is automatically locked. The timeout is counted only if the throttle and brake are idle.
lock_lpf
If the lockmode
is other than freewheeling, the lock is activated using the low-pass filter..
lockmode
By default, if controller is locked, the device is in freewheeling mode. This behavior can be changed by this parameter.
Value | Description |
---|---|
0 | Freewheeling mode |
4 | Voltage brake mode |
8 | Brake mode |
15 | Phase short brake mode |
The lockmode
corresponds to driver mode. But only listed above values are allowed.