Programmable firmware
Edit loop(input)
LOADED JavaScript · 100 Hz · output: motorPwmUs[]
Put PID state, mixing, and control decisions inside this function. It receives sampled sensors, vehicle data, setpoints, and optional flyer parameters. The simulator accepts only one 1,000–2,000 µs pulse per registered motor as actuator output.
Firmware code runs on the simulation thread. Run only code you trust; an infinite loop can freeze this tab.