diff --git a/Software/ChainLube/data/index.htm b/Software/ChainLube/data/index.htm index 48e9237..9b81571 100644 --- a/Software/ChainLube/data/index.htm +++ b/Software/ChainLube/data/index.htm @@ -341,6 +341,20 @@ <div id="tab_sysinfo" class="tab-pane fade"> <h3>Systeminfo</h3> <hr> + <h4>Firmware-Info</h4> + <p> + <table class="table"> + <tbody> + <tr> + <th class="col-md-8" scope="col">Parameter</td> + <th class="col-md-4" scope="col">Value</td> + </tr> + <tr> + <td>Version</td> + <td>%SW_VERSION%</td> + </tr> + </table> + </p> <h4>Einstellungen</h4> <p> <table class="table"> @@ -424,6 +438,10 @@ <td>writeCycleCounter</td> <td>%WRITE_CYCLE_COUNT%</td> </tr> + <tr> + <td>PersistenceMarker</td> + <td>%PERSISTENCE_MARKER%</td> + </tr> <tr> <td>tankRemain_µl</td> <td>%TANK_REMAIN_UL%</td> diff --git a/Software/ChainLube/src/common.h b/Software/ChainLube/src/common.h index a57e072..c6bbf72 100644 --- a/Software/ChainLube/src/common.h +++ b/Software/ChainLube/src/common.h @@ -14,6 +14,9 @@ #define HOST_NAME "ChainLube_%06X" // Use printf-Formatting - Chip-ID (uin32_t) will be added #endif +#define SW_VERSION_MAJOR 1 +#define SW_VERSION_MINOR 0 + #ifndef OTA_DELAY #define OTA_DELAY 50 // ticks -> 10ms / tick #endif diff --git a/Software/ChainLube/src/webui.cpp b/Software/ChainLube/src/webui.cpp index 18a5df1..ac42c37 100644 --- a/Software/ChainLube/src/webui.cpp +++ b/Software/ChainLube/src/webui.cpp @@ -71,6 +71,8 @@ String processor(const String &var) } if (var == "WRITE_CYCLE_COUNT") return String(PersistenceData.writeCycleCounter); + if (var == "PERSISTENCE_MARKER") + return String(getPersistanceAddress()); if (var == "TANK_REMAIN_UL") return String(PersistenceData.tankRemain_µl); if (var == "TRAVEL_DISTANCE_HIGHRES") @@ -168,6 +170,12 @@ String processor(const String &var) if (var == "SYSTEM_STATUS") return String(globals.systemStatustxt); + if (var == "SW_VERSION") + { + char buffer[7]; + sprintf(buffer, "%d.%02d", SW_VERSION_MAJOR, SW_VERSION_MINOR); + return String(buffer); + } if (var == "PLACEHOLDER") return "placeholder"; diff --git a/Software/ChainLube/src/webui.h b/Software/ChainLube/src/webui.h index af82387..55d57a5 100644 --- a/Software/ChainLube/src/webui.h +++ b/Software/ChainLube/src/webui.h @@ -9,6 +9,7 @@ #include "config.h" #include "globals.h" #include "dtc.h" +#include "common.h" void initWebUI();