#ifndef VESC_COMM_H #define VESC_COMM_H /* * VESC Communication Interface — Dual FSESC 6.7 Pro (FW 6.6) * * Motor1: connected directly to USART6 (PC6=TX, PC7=RX) @ 115200 * Motor2: bridged via COMM_FORWARD_CAN (cmd 34) to CAN ID 68 on motor1 * * Transport implementations: * src/vesc_uart.c — USART6 UART (active) * src/vesc_can.c — STM32 CAN + SN65HVD230 (phase 2, stub) */ /* Initialise the VESC transport (USART6 GPIO + peripheral) */ void vesc_comm_init(void); /* * Send a current command to both VESCs. * current_motor1/2 in Amperes (positive = forward, negative = reverse). * Range limited by VESC motor configuration; typical max ±30 A for FSESC 6.7 Pro. */ void vesc_comm_send_current(float current_motor1, float current_motor2); /* * Send a duty-cycle command to both VESCs. * duty_motor1/2 in range -1.0 .. +1.0 (full reverse / full forward). */ void vesc_comm_send_duty(float duty_motor1, float duty_motor2); #endif /* VESC_COMM_H */