Skip to main content
Firmware Stable

Commissioning Control — the gen command

The gen shell command provides temporary control of the engine and the generation limit for commissioning and bench testing — without an external host and without touching the configuration.

gen is not a separate control path: it builds a real CAN control message (0x560) and broadcasts it on the bus, so both controllers of a pair act on it exactly as on a message from an external host — same latch, same timeout, same states. Anything documented for the control message applies to gen unchanged, and a real host frame simply supersedes it.

Usage

CommandResult
genStart, 100 % generation limit, until ctrl+c
gen 0.4Start, 40 % generation limit, until ctrl+c
gen 0Start with zero generation — the engine idles unloaded, until ctrl+c
gen sStop request (latched until it times out or the next command) — returns immediately

A start request is blocking: gen [0..1] repeats the request every 100 ms for as long as the command runs — exactly as an external host does — and returns only on ctrl+c, at which point it requests a stop. A start request cannot outlive the operator's attention: the explicit stop covers a clean exit, and the /can/can_ctrl_tim timeout covers a terminal that dies without one.

Preconditions

  • gen works through the CAN control input, so CAN must be a selected start source: start_sel = 1 or 3 (see Enabling). With 3 the GPIO input must also agree — on a bench without the switch wired, use 1. The command reports this precondition instead of overriding the configuration.
  • A fresh start is granted only when the driver is ready (no error, no active protection, motor steady); the command reports the reason when it refuses.
  • gen clears a pending driver-level shell override (run/stop), which would otherwise block the application. Note that the driver stop command stops the local controller only — use gen s to stop the whole system.
tip

Nothing here is test-only firmware — gen exercises the production control path. Any CAN tool on the bus can do the same by sending 0x560 frames.