From 8bc13d75f0ea390db98725f98b99e1199f74e6e2 Mon Sep 17 00:00:00 2001 From: kikoqiu Date: Tue, 17 Oct 2023 09:06:34 +0800 Subject: [PATCH] adjust serial 4 way pass-through order to match with profile --- src/driver/serial_4way.c | 3 ++- src/io/quic.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/driver/serial_4way.c b/src/driver/serial_4way.c index 9e5534afd..0c4f13982 100644 --- a/src/driver/serial_4way.c +++ b/src/driver/serial_4way.c @@ -3,6 +3,7 @@ #include #include "core/debug.h" +#include "core/profile.h" #include "driver/gpio.h" #include "driver/motor.h" #include "driver/serial_4way.h" @@ -132,7 +133,7 @@ uint8_t serial_4way_init() { time_delay_ms(250); for (uint32_t i = 0; i < MOTOR_PIN_MAX; i++) { - const gpio_pins_t pin = target.motor_pins[i]; + const gpio_pins_t pin = target.motor_pins[profile.motor.motor_pins[i]]; esc_pins[i] = pin; avr_bl_init_pin(pin); } diff --git a/src/io/quic.h b/src/io/quic.h index b8d7ddb16..beed421be 100644 --- a/src/io/quic.h +++ b/src/io/quic.h @@ -8,7 +8,7 @@ #define QUIC_MAGIC '#' #define QUIC_HEADER_LEN 4 -#define QUIC_PROTOCOL_VERSION MAKE_SEMVER(0, 2, 1) +#define QUIC_PROTOCOL_VERSION MAKE_SEMVER(0, 2, 2) typedef enum { QUIC_CMD_INVALID,