From 5715eb0d91be920225df548de2056d9470383ff2 Mon Sep 17 00:00:00 2001 From: sh Date: Fri, 20 Nov 2020 21:06:06 +0100 Subject: [PATCH] integrat platformio without breaking changes --- .gitignore | 3 +++ RX_FSK/RX_FSK.ino | 9 ++++++- libraries/SondeLib/library.json | 11 ++++++++ platformio.ini | 47 +++++++++++++++++++++++++++++++++ 4 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 libraries/SondeLib/library.json create mode 100644 platformio.ini diff --git a/.gitignore b/.gitignore index 259148f..3d7668a 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,6 @@ *.exe *.out *.app + +.pio +.vscode diff --git a/RX_FSK/RX_FSK.ino b/RX_FSK/RX_FSK.ino index 917b807..6fb9e2d 100644 --- a/RX_FSK/RX_FSK.ino +++ b/RX_FSK/RX_FSK.ino @@ -3,7 +3,7 @@ #include #include #include - +#include #include //#include //#include @@ -22,6 +22,13 @@ #include "geteph.h" #include "rs92gps.h" +#ifdef TTGO_V2 +// platformio currently fails to build with board v2 so ve override v1 pins instead +#define OLED_SDA 4 +#define OLED_SCL 15 +#define OLED_RST 16 +#endif + int e; enum MainState { ST_DECODER, ST_SPECTRUM, ST_WIFISCAN, ST_UPDATE, ST_TOUCHCALIB }; diff --git a/libraries/SondeLib/library.json b/libraries/SondeLib/library.json new file mode 100644 index 0000000..7e25074 --- /dev/null +++ b/libraries/SondeLib/library.json @@ -0,0 +1,11 @@ +{ + + "dependencies": +[ + { + "owner": "olikraus", + "name": "U8g2", + "version": "^2.28.8" + } +] +} \ No newline at end of file diff --git a/platformio.ini b/platformio.ini new file mode 100644 index 0000000..fcdde08 --- /dev/null +++ b/platformio.ini @@ -0,0 +1,47 @@ +; PlatformIO Project Configuration File +; +; Build options: build flags, source filter +; Upload options: custom upload port, speed and extra flags +; Library options: dependencies, extra library storages +; Advanced options: extra scripting +; +; Please visit documentation for the other options and examples +; https://docs.platformio.org/page/projectconf.html + +[platformio] +src_dir = RX_FSK +lib_dir = libraries +data_dir = RX_FSK/data + +[extra] +lib_deps_builtin = + SondeLib + SX1278FSK + fonts +lib_deps_external = + olikraus/U8g2 @ ^2.28.8 + AXP202X_Library + links2004/WebSockets @ ^2.3.1 + stevemarple/MicroNMEA @ ^2.0.3 + nkawu/TFT 22 ILI9225 @ ^1.4.4 + me-no-dev/ESP Async WebServer @ ^1.2.3 + +[env:ttgo-lora32-v1] +platform = espressif32 +board = ttgo-lora32-v1 +framework = arduino +monitor_speed = 115200 +lib_deps = + ${extra.lib_deps_builtin} + ${extra.lib_deps_external} + +[env:ttgo-lora32-v2] +platform = espressif32 +# platformio currently fails to build with board v2 so ve override v1 pins instead +build_flags = -D TTGO_V2 +board = ttgo-lora32-v1 +framework = arduino +monitor_speed = 115200 +lib_deps = + ${extra.lib_deps_builtin} + ${extra.lib_deps_external}