update config for hoverbrett

This commit is contained in:
interfisch 2022-03-27 11:58:06 +02:00
parent 83453e21e3
commit dc07f8564f
1 changed files with 13 additions and 4 deletions

View File

@ -13,10 +13,15 @@ pio run -t upload
*/
//Select the calibration values for the different pcbs
//#define BOBBYCAR_PCB_FRONT //Green PCB. black programming cable. outer power button
#define BOBBYCAR_PCB_REAR //Blue PCB. with XT60-U, beige programming cable. inner power button
#define BOBBYCAR_PCB_FRONT //Green PCB. black programming cable. outer power button
//#define BOBBYCAR_PCB_REAR //Blue PCB. with XT60-U, beige programming cable. inner power button
//#define HOVERBRETT //Green PCB in Hoverbrett
#if defined(HOVERBRETT)
#define INVERT_R_DIRECTION // Invert right motor
#define INVERT_L_DIRECTION // Invert left motor
#endif
#include "stm32f1xx_hal.h"
// ############################### VARIANT SELECTION ###############################
@ -47,7 +52,7 @@ pio run -t upload
#else
#define DELAY_IN_MAIN_LOOP 5 // in ms. default 5. it is independent of all the timing critical stuff. do not touch if you do not know what you are doing.
#endif
#define TIMEOUT 20 // number of wrong / missing input commands before emergency off
#define TIMEOUT 20 // number of wrong / missing input commands before emergency off (not for serial)
#define A2BIT_CONV 50 // A to bit for current conversion on ADC. Example: 1 A = 50, 2 A = 100, etc
// #define PRINTF_FLOAT_SUPPORT // [-] Uncomment this for printf to support float on Serial Debug. It will increase code size! Better to avoid it!
@ -685,7 +690,11 @@ pio run -t upload
defined(FEEDBACK_SERIAL_USART3) || defined(CONTROL_SERIAL_USART3) || defined(DEBUG_SERIAL_USART3) || defined(SIDEBOARD_SERIAL_USART3)
#define SERIAL_START_FRAME 0xABCD // [-] Start frame definition for serial commands
#define SERIAL_BUFFER_SIZE 64 // [bytes] Size of Serial Rx buffer. Make sure it is always larger than the structure size
#if defined(HOVERBRETT)
#define SERIAL_TIMEOUT 20 // 20 = 0.1s = 100ms = 5*20ms
#elif
#define SERIAL_TIMEOUT 160 // [-] Serial timeout duration for the received data. 160 ~= 0.8 sec. Calculation: 0.8 sec / 0.005 sec
#endif
#endif
#if defined(FEEDBACK_SERIAL_USART2) || defined(CONTROL_SERIAL_USART2) || defined(DEBUG_SERIAL_USART2) || defined(SIDEBOARD_SERIAL_USART2)
#ifndef USART2_BAUD