Added Windows symbolic links so an Arduino project can parasite off the superior PlatformIO paths :-)
Adjusted JSON ThermostatOvertemp to be 0,2,3,4 etc.
This commit is contained in:
parent
a435aed47d
commit
8d143c03a5
|
@ -15,3 +15,5 @@ __vm
|
|||
.vscode/launch.json
|
||||
/.vscode/settings.json
|
||||
/.vscode/extensions.json
|
||||
Arduino/Afterburner/data/*
|
||||
Arduino/Afterburner/src/*
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,12 @@
|
|||
|
||||
EVERYTHING IN THIS FOLDER IS FAKE!
|
||||
|
||||
They are symbolic links to the real locations in repo\src\Afterburner.
|
||||
The directories must be soft links so thay can be added to git!
|
||||
|
||||
This is becasue Arduino insists upon .ino for their projects, and
|
||||
that file has to match the directory name.
|
||||
|
||||
If .ino and .cpp live in same directory - double trouble at link time!
|
||||
|
||||
Ugggh.
|
|
@ -0,0 +1 @@
|
|||
../../src/Afterburner/data
|
|
@ -0,0 +1 @@
|
|||
../../src/Afterburner/src
|
|
@ -0,0 +1,16 @@
|
|||
This directory structure includes an Arduino path, and a src path.
|
||||
|
||||
The Arduino path is only to support builing with the restrictive Arduino IDE.
|
||||
The src path is for the awesome PlatformIO under VScode.
|
||||
Use it, you will not regret it.
|
||||
|
||||
Arduino builds are sloooooowwwww.
|
||||
Do it that way if you must, but seriously don't!
|
||||
PlatformIO rocks - just load the root repo directory with PIO in VScode
|
||||
and away you go.
|
||||
|
||||
The Arduino\Afterburner\Afterburner.ino file is a hard symbolic link to the
|
||||
proper src\Afterburner\Afterburner.cpp file.
|
||||
|
||||
Likewise the Arduino\Afterburner\src and Arduino\Afterburner\data paths are
|
||||
hard junctions to the src\Afterburner\src and src\Afterburner\data files.
|
|
@ -90,8 +90,8 @@
|
|||
#include "src/cfg/pins.h"
|
||||
#include "src/RTC/Timers.h"
|
||||
#include "src/RTC/Clock.h"
|
||||
#include "src/Wifi/BTCWebServer.h"
|
||||
#include "src/Wifi/BTCota.h"
|
||||
#include "src/WiFi/BTCWebServer.h"
|
||||
#include "src/WiFi/BTCota.h"
|
||||
#include "src/Protocol/Protocol.h"
|
||||
#include "src/Protocol/TxManage.h"
|
||||
#include "src/Protocol/SmartError.h"
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
|
||||
When building with Platform IO, base file must be "Afterburner.CPP"
|
||||
|
||||
When building with ArduinoIDE, base file must be "Afterburner.INO"
|
||||
|
||||
ie use a .CPP or .INO extension as appropriate.
|
||||
Arduino is lame is the reality :-(
|
|
@ -24,7 +24,7 @@
|
|||
#include "fonts/Icons.h"
|
||||
#include "../Bluetooth/BluetoothAbstract.h"
|
||||
#include "DetailedScreen.h"
|
||||
#include "../Wifi/BTCWifi.h"
|
||||
#include "../WiFi/BTCWifi.h"
|
||||
#include "KeyPad.h"
|
||||
#include "../Utility/helpers.h"
|
||||
#include "../Protocol/Protocol.h"
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
#include "FuelMixtureScreen.h"
|
||||
#include "KeyPad.h"
|
||||
#include "../Utility/helpers.h"
|
||||
#include "../Wifi/BTCWifi.h"
|
||||
#include "../utility/debugPort.h"
|
||||
#include "../WiFi/BTCWifi.h"
|
||||
#include "../Utility/debugPort.h"
|
||||
#include "../Utility/macros.h"
|
||||
#include "../Protocol/Protocol.h"
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include "PasswordScreen.h"
|
||||
#include "KeyPad.h"
|
||||
#include "../Wifi/BTCWifi.h"
|
||||
#include "../WiFi/BTCWifi.h"
|
||||
#include "fonts/Arial.h"
|
||||
#include "../Utility/macros.h"
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "ScreenHeader.h"
|
||||
#include "../Protocol/Protocol.h"
|
||||
#include "../Utility/helpers.h"
|
||||
#include "../Wifi/BTCWifi.h"
|
||||
#include "../WiFi/BTCWifi.h"
|
||||
#include "../Bluetooth/BluetoothAbstract.h"
|
||||
#include "../Utility/NVStorage.h"
|
||||
#include "../RTC/Clock.h"
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "SettingsScreen.h"
|
||||
#include "KeyPad.h"
|
||||
#include "../Utility/helpers.h"
|
||||
#include "../Wifi/BTCWifi.h"
|
||||
#include "../WiFi/BTCWifi.h"
|
||||
#include "../Utility/macros.h"
|
||||
#include "../Protocol/Protocol.h"
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "WiFiScreen.h"
|
||||
#include "KeyPad.h"
|
||||
#include "../Utility/helpers.h"
|
||||
#include "../Wifi/BTCWifi.h"
|
||||
#include "../WiFi/BTCWifi.h"
|
||||
#include "../Utility/NVstorage.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -88,6 +88,7 @@ void interpretJsonCommand(char* pLine)
|
|||
else if(strcmp("ThermostatOvertemp", it->key) == 0) {
|
||||
sCyclicThermostat cyclic = NVstore.getCyclicMode();
|
||||
cyclic.Stop = it->value.as<char>();
|
||||
if(cyclic.Stop > 1) cyclic.Stop--; // internal uses a 1 offset
|
||||
NVstore.setCyclicMode(cyclic);
|
||||
}
|
||||
else if(strcmp("ThermostatUndertemp", it->key) == 0) {
|
||||
|
@ -294,7 +295,9 @@ bool makeJSONStringEx(CModerator& moderator, char* opStr, int len)
|
|||
|
||||
bSend |= moderator.addJson("ThermostatMethod", NVstore.getUserSettings().ThermostatMethod, root);
|
||||
bSend |= moderator.addJson("ThermostatWindow", NVstore.getUserSettings().ThermostatWindow, root);
|
||||
bSend |= moderator.addJson("ThermostatOvertemp", NVstore.getCyclicMode().Stop, root);
|
||||
int stop = NVstore.getCyclicMode().Stop;
|
||||
if(stop) stop++; // deliver effective threshold, not internal working value
|
||||
bSend |= moderator.addJson("ThermostatOvertemp", stop, root);
|
||||
bSend |= moderator.addJson("ThermostatUndertemp", NVstore.getCyclicMode().Start, root);
|
||||
|
||||
if(bSend) {
|
||||
|
|
|
@ -134,11 +134,11 @@ void handleSpiffs()
|
|||
String report;
|
||||
String message;
|
||||
listDir(SPIFFS, "/", 2, report, true);
|
||||
message += "<h1>Current SPIFFS contents:</h1>";
|
||||
char usage[128];
|
||||
sprintf(usage, "Usage: %d/%d <p>", SPIFFS.usedBytes(), SPIFFS.totalBytes());
|
||||
message += usage;
|
||||
sprintf(usage, "<p>Usage: %d/%d <p>", SPIFFS.usedBytes(), SPIFFS.totalBytes());
|
||||
message += "<h1>Current SPIFFS contents:</h1>";
|
||||
message += report;
|
||||
message += usage;
|
||||
message += "<p><a href=\"/update\">Add more files</a><br>";
|
||||
message += "<p><a href=\"/index.html\">Home</a>";
|
||||
|
||||
|
@ -165,13 +165,13 @@ void handleBTCNotFound()
|
|||
message += "<p><b>Use:<br><i><a href=\"/update\">" + Updatepath + "</a></b></i> to upload the web content.<br>";
|
||||
message += "<p><b>Please ensure you unzip the web page content, then upload all the contained files.</b>";
|
||||
|
||||
char usage[128];
|
||||
sprintf(usage, "<p>Usage: %d/%d<p>", SPIFFS.usedBytes(), SPIFFS.totalBytes());
|
||||
String report;
|
||||
listDir(SPIFFS, "/", 2, report);
|
||||
message += "<hr><h3>Current SPIFFS contents:</h3>";
|
||||
char usage[128];
|
||||
sprintf(usage, "Usage: %d/%d<p>", SPIFFS.usedBytes(), SPIFFS.totalBytes());
|
||||
message += usage;
|
||||
message += report;
|
||||
message += usage;
|
||||
|
||||
server.send(404, "text/html", message);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue