Is it possible to change control types on the fly? I am using simplefoc for my rovers hoverboard wheels and i want to use velocity, torque and angle depending on what my rover is doing, torque is most efficient, velocity is ideal for going in a straight line i want to use angle mode for move a specific distance, so can it change between them on the fly without reprogramming?
I seen something about the commander interface but i cant use the serial ports as im using mavlink for control so what would i have to set to change it do i just run this again " motor.controller = MotionControlType::torque;" ?
Both foc loops are on core zero with their own tasks with no delays and watchdog disabled so it runs at full speed.
PWM RC input is handled by a task on core 1
mavlink telemetry is in the main loop.
The rover can drive using mavlink servo output packets or RC PWM inputs, PWM is faster so its recommended for anything moving quickly.