From db1cd344cb78c4e30136baddae88ab662f90260b Mon Sep 17 00:00:00 2001 From: Pawel Spychalski Date: Tue, 10 Apr 2018 08:53:15 +0200 Subject: [PATCH] some config optimizations --- .vscode/arduino.json | 2 +- .vscode/c_cpp_properties.json | 3 ++- crossbow/config.h | 22 ++++++++++++++++++++-- crossbow/configurations/config_tx_sbus.h | 2 +- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/.vscode/arduino.json b/.vscode/arduino.json index 072b852..470c2cf 100644 --- a/.vscode/arduino.json +++ b/.vscode/arduino.json @@ -1,6 +1,6 @@ { "board": "bsfrance:avr:lora32u4", - "sketch": "crossbow\\crossbow.ino", + "sketch": "crossbow/crossbow.ino", "port": "COM3", "output": "../build" } \ No newline at end of file diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 145d73a..cfa69c7 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -13,7 +13,8 @@ }, "intelliSenseMode": "msvc-x64", "cStandard": "c11", - "cppStandard": "c++17" + "cppStandard": "c++17", + "compilerPath": "/usr/bin/clang" }, { "name": "Mac", diff --git a/crossbow/config.h b/crossbow/config.h index d971c50..0b540aa 100644 --- a/crossbow/config.h +++ b/crossbow/config.h @@ -1,12 +1,30 @@ #ifndef CONFIG_H #define CONFIG_H +/* + * Hardware type. Available types: + * ARDUINO_AVR_FEATHER32U4 + * ARDUINO_SAMD_FEATHER_M0 + */ +#define ARDUINO_AVR_FEATHER32U4 + +/* + * TX or RX mode for hardware. Available types: + * DEVICE_MODE_TX + * DEVICE_MODE_RX + */ #define DEVICE_MODE_TX // #define DEVICE_MODE_RX -#define FEATURE_TX_OLED +// #define FEATURE_TX_OLED // #define FORCE_TX_WITHOUT_INPUT -// #define FEATURE_TX_INPUT_PPM + +/* + * Default mode of TX data input: SBUS + * Possible values: + * FEATURE_TX_INPUT_PPM + * FEATURE_TX_INPUT_SBUS + */ #define FEATURE_TX_INPUT_SBUS // #define DEBUG_SERIAL diff --git a/crossbow/configurations/config_tx_sbus.h b/crossbow/configurations/config_tx_sbus.h index 123676a..b515b8b 100644 --- a/crossbow/configurations/config_tx_sbus.h +++ b/crossbow/configurations/config_tx_sbus.h @@ -1,7 +1,7 @@ #ifndef CONFIG_H #define CONFIG_H -#define DEVICE_MODE_TX +#define DEVICE_MODE TX #define FEATURE_TX_OLED #define FEATURE_TX_INPUT_SBUS