re-scaling CAN setDUTY CYCLE to -1 to 1 instead of 0 to 1
Forums:
Hi everyone,
I just started using Vesc tool few days ago, and I would like to drive the motor in both senses with same duty cycle CAN frame, so for a 0 payload frame I would like a "-1" duty cycle.
I tried to re-load a custom firmware after modifing the code line in "comm_can":
buffer_append_int32(buffer, (int32_t)(duty * 100000.0), &send_index);
by: buffer_append_int32(buffer, (int32_t)((duty+1) * 50000.0), &send_index);