mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-06-08 10:54:55 +08:00
* motors * can * cleanup unused stuff * initial clean * more clean * remove integral and derivative clamps, revert pwm driver to original * remove integral and derivative clamps, revert pwm driver to original * remove integral and derivative clamps, revert pwm driver to original * dont need this for now * clean * fix can rx and can version error * ignore body for misra mutation test * fix bus recovery, remove body rx hook
22 lines
512 B
C
22 lines
512 B
C
#include "board/body/motor_control.h"
|
|
|
|
void board_body_init(void) {
|
|
motor_init();
|
|
motor_encoder_init();
|
|
motor_speed_controller_init();
|
|
motor_encoder_reset(1);
|
|
motor_encoder_reset(2);
|
|
|
|
// Initialize CAN pins
|
|
set_gpio_pullup(GPIOD, 0, PULL_NONE);
|
|
set_gpio_alternate(GPIOD, 0, GPIO_AF9_FDCAN1);
|
|
set_gpio_pullup(GPIOD, 1, PULL_NONE);
|
|
set_gpio_alternate(GPIOD, 1, GPIO_AF9_FDCAN1);
|
|
}
|
|
|
|
board board_body = {
|
|
.led_GPIO = {GPIOC, GPIOC, GPIOC},
|
|
.led_pin = {7, 7, 7},
|
|
.init = board_body_init,
|
|
};
|