diff --git a/.gitignore b/.gitignore index e469197f..bd2fb15d 100644 --- a/.gitignore +++ b/.gitignore @@ -379,4 +379,10 @@ ASALocalRun/ *.nvuser # MFractors (Xamarin productivity tool) working folder -.mfractor/ \ No newline at end of file +.mfractor/ + +.pio +.vscode/.browse.c_cpp.db* +.vscode/c_cpp_properties.json +.vscode/launch.json +.vscode/ipch \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..080e70d0 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,10 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + "platformio.platformio-ide" + ], + "unwantedRecommendations": [ + "ms-vscode.cpptools-extension-pack" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 4e5d2510..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "gitdoc.enabled": false -} \ No newline at end of file diff --git a/gbs-control.ino b/gbs-control.ino index 07405621..f9e090b6 100644 --- a/gbs-control.ino +++ b/gbs-control.ino @@ -22,6 +22,10 @@ #include "SSD1306Wire.h" #include "fonts.h" #include "images.h" + +static inline void writeBytes(uint8_t slaveRegister, uint8_t *values, uint8_t numValues); +const uint8_t *loadPresetFromSPIFFS(byte forVideoMode); + SSD1306Wire display(0x3c, D2, D1); //inits I2C address & pins for OLED const int pin_clk = 14; //D5 = GPIO14 (input of one direction for encoder) const int pin_data = 13; //D7 = GPIO13 (input of one direction for encoder) @@ -85,7 +89,7 @@ typedef TV5725 GBS; static unsigned long lastVsyncLock = millis(); // Si5351mcu library by Pavel Milanes -// https ://github.com/pavelmc/Si5351mcu +// https://github.com/pavelmc/Si5351mcu // included in project root folder to allow modifications within limitations of the Arduino framework // See 3rdparty/Si5351mcu for unmodified source and license #include "src/si5351mcu.h" diff --git a/platformio.ini b/platformio.ini new file mode 100644 index 00000000..af2d8744 --- /dev/null +++ b/platformio.ini @@ -0,0 +1,33 @@ +; 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] +lib_dir = ./src/ +src_dir = ./ + +[env:d1_mini] +platform = espressif8266@2.6.3 +board = d1_mini +framework = arduino +board_build.f_cpu = 160000000L +board_build.ldscript = eagle.flash.4m1m.ld +upload_speed = 921600 +monitor_speed = 115200 +lib_deps = + me-no-dev/ESPAsyncTCP@^1.2.2 + me-no-dev/ESP Async WebServer@^1.2.3 + thingpulse/ESP8266 and ESP32 OLED driver for SSD1306 displays@4.4.0 + bluemurder/ESP8266-ping@^2.0.1 + ;r-downing/PersWiFiManager@^3.0.1 + ;links2004/WebSockets@^2.1.4 +build_src_filter = + +<**/*.c> + +<**/*.cpp> + +<**/*.ino> + -<./3rdparty/*> \ No newline at end of file diff --git a/public/scripts/html2h.sh b/public/scripts/html2h.sh index 929f80dc..922c351f 100755 --- a/public/scripts/html2h.sh +++ b/public/scripts/html2h.sh @@ -2,6 +2,6 @@ cd ../.. gzip -c9 webui.html > webui_html && xxd -i webui_html > webui_html.h && rm webui_html && sed -i -e 's/unsigned char webui_html\[]/const uint8_t webui_html[] PROGMEM/' webui_html.h && sed -i -e 's/unsigned int webui_html_len/const unsigned int webui_html_len/' webui_html.h -rm webui_html.h-e +rm -fv webui_html.h-e echo "webui_html.h GENERATED"; \ No newline at end of file