Skip to content
Merged
47 changes: 47 additions & 0 deletions Json Models/GSheets JSON.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# GSheets JSON

```
{
"Beer":"xxxxxxxxxxxxxxxxxxxxxxxxx",
"Temp":"xxxxx",
"SG":"xxxxxxx",
"Color":"xxxxxxx",
"Comment":"",
"Email":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"tzOffset":-12
}
```

## Serialize:

```
StaticJsonDocument<512> doc;

doc["Beer"] = "xxxxxxxxxxxxxxxxxxxxxxxxx";
doc["Temp"] = "xxxxx";
doc["SG"] = "xxxxxxx";
doc["Color"] = "xxxxxxx";
doc["Comment"] = "";
doc["Email"] = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
doc["tzOffset"] = -12;

String output;
serializeJson(doc, output);
```

## Deserialize:

```
// String input;

StaticJsonDocument<512> doc;
deserializeJson(doc, input);

const char* Beer = doc["Beer"]; // "xxxxxxxxxxxxxxxxxxxxxxxxx"
const char* Temp = doc["Temp"]; // "xxxxx"
const char* SG = doc["SG"]; // "xxxxxxx"
const char* Color = doc["Color"]; // "xxxxxxx"
const char* Comment = doc["Comment"]; // ""
const char* Email = doc["Email"];
int tzOffset = doc["tzOffset"]; // -12
```
30 changes: 18 additions & 12 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,24 @@
; Added this here to "hard code" the environment for macro debugging/visuals
; default_envs = lcd_ssd1306
; default_envs = d32_pro_tft
; default_envs = tft_espi
default_envs = tft_espi

[common]
platform = espressif32
platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git
framework = arduino
; As the framework has grown, min_spiffs no longer has enough space. We're now
; requiring 16MB of flash space for most builds (which comes standard with the
; recommended D32 Pro)
board_build.partitions = large_spiffs_16MB.csv
upload_speed = 460800
upload_speed = 921600 ; TODO: 460800
monitor_speed = 115200
monitor_filters =
esp32_exception_decoder
; log2file
; Ths can/will be set in tools/get_port.py
; upload_port =
; monitor_port =
; This can/will be set in tools/get_port.py
; upload_port =
; monitor_port =
monitor_dtr = 0
monitor_rts = 0
; -D_GLIBCXX_USE_C99 is to fix an issue with the xtensa toolchain that precludes the use of std::to_string
Expand Down Expand Up @@ -57,9 +58,11 @@ lib_deps =
https://github.com/lbussy/esptelnet.git
https://github.com/h2zero/NimBLE-Arduino.git
https://github.com/256dpi/arduino-mqtt.git
https://github.com/BlueAndi/ESPAsyncWebServer.git#master
https://github.com/lbussy/AsyncWiFiManager.git#development
https://github.com/me-no-dev/ESPAsyncWebServer
;https://github.com/BlueAndi/ESPAsyncWebServer.git#master
https://github.com/tzapu/WiFiManager.git
https://github.com/lbussy/LCBUrl.git#devel
https://github.com/bblanchon/ArduinoStreamUtils.git ; This is used to allow stream processing, can be turned off later.
build_type = debug ; release

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand All @@ -69,14 +72,15 @@ build_type = debug ; release
[env:lcd_ssd1306] ; Small OLED Board
board = lolin_d32
platform = ${common.platform}
platform_packages = ${common.platform_packages}
framework = ${common.framework}
; For the "OLED" variant, we can't guarantee we have more than 4MB of flash. Use
; huge_app to get us the space - but at the cost of being able to update OTA.
board_build.partitions = huge_app.csv
upload_speed = ${common.upload_speed}
monitor_speed = ${common.monitor_speed}
monitor_filters = ${common.monitor_filters}
; Ths can/will be set in tools/get_port.py
; This can/will be set in tools/get_port.py
; upload_port = ${common.upload_port}
; monitor_port = ${common.monitor_port}
monitor_dtr = ${common.monitor_dtr}
Expand All @@ -93,12 +97,13 @@ build_type = ${common.build_type}
[env:d32_pro_tft] ; Lolin ESP32 + ILI TFT
board = lolin_d32_pro
platform = ${common.platform}
platform_packages = ${common.platform_packages}
framework = ${common.framework}
board_build.partitions = ${common.board_build.partitions}
upload_speed = ${common.upload_speed}
monitor_speed = ${common.monitor_speed}
monitor_filters = ${common.monitor_filters}
; Ths can/will be set in tools/get_port.py
; This can/will be set in tools/get_port.py
; upload_port = {common.upload_port}
; monitor_port = ${common.monitor_port}
monitor_dtr = ${common.monitor_dtr}
Expand All @@ -119,7 +124,7 @@ build_flags =
-DTFT_RST=33
-DSPI_FREQUENCY=40000000
-DSPI_READ_FREQUENCY=20000000
-DSPI_TOUCH_FREQUENCY=2500000
-DSPI_TOUCH_FREQUENCY=2500000
-DSMOOTH_FONT=1
-DTFT_BL=32
-DTFT_BACKLIGHT_ON=1
Expand All @@ -138,14 +143,15 @@ build_type = ${common.build_type}
; https://github.com/Bodmer/TFT_eSPI
board = esp32dev
platform = ${common.platform}
platform_packages = ${common.platform_packages}
framework = ${common.framework}
; The T-Display has 4MB of flash. Use huge_app to get us the space - but
; at the cost of being able to update OTA.
board_build.partitions = huge_app.csv
upload_speed = ${common.upload_speed}
monitor_speed = ${common.monitor_speed}
monitor_filters = ${common.monitor_filters}
; Ths can/will be set in tools/get_port.py
; This can/will be set in tools/get_port.py
; upload_port = -DUSBC
; monitor_port = -DUSBC
monitor_dtr = ${common.monitor_dtr}
Expand All @@ -170,4 +176,4 @@ build_flags =
lib_deps =
${common.lib_deps}
TFT_eSPI
build_type = ${common.build_type}
build_type = ${common.build_type}
133 changes: 0 additions & 133 deletions src/SecureWithRedirects.cpp

This file was deleted.

40 changes: 0 additions & 40 deletions src/SecureWithRedirects.h

This file was deleted.

2 changes: 1 addition & 1 deletion src/bridge_lcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void bridge_lcd::display_logo()
(64 - oled_logo_height) / 2,
oled_logo_width,
oled_logo_height,
tiltbridge_logo_bits);
oled_logo_bits);
display();
#endif

Expand Down
5 changes: 2 additions & 3 deletions src/http_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ bool processTiltBridgeSettings(AsyncWebServerRequest *request)
{ // We reset hostname, process
hostnamechanged = false;
http_server.name_reset_requested = true;
Log.verbose(F("POSTed new mDNSid, queued network reset." CR));
Log.notice(F("POSTed new mDNSid, queued network reset." CR));
}
return true;
}
Expand Down Expand Up @@ -1250,6 +1250,5 @@ void httpServer::init()
DefaultHeaders::Instance().addHeader("Access-Control-Allow-Origin", "*");

server.begin();
Log.notice(F("Async HTTP server started." CR));
Log.verbose(F("Open: http://%s.local/ to view application." CR), WiFi.getHostname());
Log.notice(F("HTTP server started. Open: http://%s.local/ to view application." CR), WiFi.getHostname());
}
Loading