update config for hoverbrett
This commit is contained in:
parent
83453e21e3
commit
dc07f8564f
15
Inc/config.h
15
Inc/config.h
|
@ -13,10 +13,15 @@ pio run -t upload
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//Select the calibration values for the different pcbs
|
//Select the calibration values for the different pcbs
|
||||||
//#define BOBBYCAR_PCB_FRONT //Green PCB. black programming cable. outer 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 BOBBYCAR_PCB_REAR //Blue PCB. with XT60-U, beige programming cable. inner power button
|
||||||
//#define HOVERBRETT //Green PCB in Hoverbrett
|
//#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"
|
#include "stm32f1xx_hal.h"
|
||||||
|
|
||||||
// ############################### VARIANT SELECTION ###############################
|
// ############################### VARIANT SELECTION ###############################
|
||||||
|
@ -47,7 +52,7 @@ pio run -t upload
|
||||||
#else
|
#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.
|
#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
|
#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 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!
|
// #define PRINTF_FLOAT_SUPPORT // [-] Uncomment this for printf to support float on Serial Debug. It will increase code size! Better to avoid it!
|
||||||
|
|
||||||
|
@ -685,8 +690,12 @@ pio run -t upload
|
||||||
defined(FEEDBACK_SERIAL_USART3) || defined(CONTROL_SERIAL_USART3) || defined(DEBUG_SERIAL_USART3) || defined(SIDEBOARD_SERIAL_USART3)
|
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_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
|
#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
|
#define SERIAL_TIMEOUT 160 // [-] Serial timeout duration for the received data. 160 ~= 0.8 sec. Calculation: 0.8 sec / 0.005 sec
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#if defined(FEEDBACK_SERIAL_USART2) || defined(CONTROL_SERIAL_USART2) || defined(DEBUG_SERIAL_USART2) || defined(SIDEBOARD_SERIAL_USART2)
|
#if defined(FEEDBACK_SERIAL_USART2) || defined(CONTROL_SERIAL_USART2) || defined(DEBUG_SERIAL_USART2) || defined(SIDEBOARD_SERIAL_USART2)
|
||||||
#ifndef USART2_BAUD
|
#ifndef USART2_BAUD
|
||||||
#define USART2_BAUD 115200 // UART2 baud rate (long wired cable)
|
#define USART2_BAUD 115200 // UART2 baud rate (long wired cable)
|
||||||
|
|
Loading…
Reference in New Issue