From 04fc584f0a90b622c316c3169704bf6b29d36fdc Mon Sep 17 00:00:00 2001 From: kai Date: Sat, 18 Jan 2020 01:08:47 +0100 Subject: [PATCH] renamed USART3 to USART because you can also use USART2 not only USART3 --- Inc/config.h | 6 +++--- README.md | 2 +- platformio.ini | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Inc/config.h b/Inc/config.h index 05df47c..0f738db 100644 --- a/Inc/config.h +++ b/Inc/config.h @@ -7,7 +7,7 @@ #if !defined(PLATFORMIO) //#define VARIANT_ADC // Variant for control via ADC input - //#define VARIANT_USART3 // Variant for Serial control via USART3 input + //#define VARIANT_USART // Variant for Serial control via USART3 input //#define VARIANT_ NUNCHUK // Variant for Nunchuk controlled vehicle build //#define VARIANT_PPM // Variant for RC-Remote with PPM-Sum Signal //#define VARIANT_IBUS // Variant for RC-Remotes with FLYSKY IBUS @@ -124,7 +124,7 @@ // #define CONTROL_SERIAL_USART3 // right sensor board cable, disable if I2C (nunchuk or lcd) is used! For Arduino control check the hoverSerial.ino // #define FEEDBACK_SERIAL_USART3 // right sensor board cable, disable if I2C (nunchuk or lcd) is used! #define DEBUG_SERIAL_USART3 // right sensor board cable, disable if I2C (nunchuk or lcd) is used! -#elif defined(VARIANT_USART3) +#elif defined(VARIANT_USART) // #define CONTROL_SERIAL_USART2 // left sensor board cable, disable if ADC or PPM is used! For Arduino control check the hoverSerial.ino // #define FEEDBACK_SERIAL_USART2 // left sensor board cable, disable if ADC or PPM is used! // #define DEBUG_SERIAL_USART2 // left sensor board cable, disable if ADC or PPM is used! @@ -333,7 +333,7 @@ // ############################### VALIDATE SETTINGS ############################### -#if !defined(VARIANT_ADC) && !defined(VARIANT_USART3) && !defined(VARIANT_HOVERCAR) && !defined(VARIANT_TRANSPOTTER) && !defined(VARIANT_ NUNCHUK) && !defined(VARIANT_PPM)&& !defined(VARIANT_IBUS) +#if !defined(VARIANT_ADC) && !defined(VARIANT_USART) && !defined(VARIANT_HOVERCAR) && !defined(VARIANT_TRANSPOTTER) && !defined(VARIANT_ NUNCHUK) && !defined(VARIANT_PPM)&& !defined(VARIANT_IBUS) #error Variant not defined! Please check platformio.ini or Inc/config.h for available variants. #endif diff --git a/README.md b/README.md index 3941477..6c2eaa0 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,7 @@ Most robust way for input is to use the ADC and potis. It works well even on 1m This firmware offers currently these variants (selectable in [platformio.ini](/platformio.ini) and / or [/Inc/config.h](/Inc/config.h)): - **VARIANT_ADC**: In this variant the motors are controlled by two potentiometers connected to the Left sensor cable (long wired) -- **VARIANT_USART3**: In this variant the motors are controlled via serial protocol on USART3 right sensor cable (short wired). The commands can be sent from an Arduino. Check out the [hoverserial.ino](/02_Arduino/hoverserial) as an example sketch. +- **VARIANT_USART**: In this variant the motors are controlled via serial protocol on USART3 right sensor cable (short wired). The commands can be sent from an Arduino. Check out the [hoverserial.ino](/02_Arduino/hoverserial) as an example sketch. - **VARIANT_ NUNCHUK**: Wii Nunchuk offers one hand control for throttle, braking and steering. This was one of the first input device used for electric armchairs or bottle crates. - **VARIANT_PPM**: This is when you want to use a RC remote control with PPM Sum signal - **VARIANT_IBUS**: This is when you want to use a RC remote control with Flysky IBUS protocol connected to the Left sensor cable. diff --git a/platformio.ini b/platformio.ini index 8f45e2b..ce6f229 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,7 +10,7 @@ src_dir = Src ; Choose one or all variants get built ; ;default_envs = VARIANT_ADC ; Variant for control via ADC input -;default_envs = VARIANT_USART3 ; Variant for Serial control via USART3 input +;default_envs = VARIANT_USART ; Variant for Serial control via USART3 input ;default_envs = VARIANT_ NUNCHUK ; Variant for Nunchuk controlled vehicle build ;default_envs = VARIANT_PPM ; Variant for RC-Remotes with PPM-Sum signal ;default_envs = VARIANT_IBUS ; Variant for RC-Remotes with FLYSKY IBUS @@ -45,7 +45,7 @@ build_flags = ;================================================================ -[env:VARIANT_USART3] +[env:VARIANT_USART] platform = ststm32 framework = stm32cube board = genericSTM32F103RC @@ -65,7 +65,7 @@ build_flags = -Wl,-lm -g -ggdb ; to generate correctly the 'firmware.elf' for STM STUDIO vizualization # -Wl,-lnosys - -D VARIANT_USART3 + -D VARIANT_USART -D PLATFORMIO ;================================================================