add a firmware type to display

This commit is contained in:
wellenvogel 2021-12-14 19:09:43 +01:00
parent 5fc6ceffac
commit 01662d43fa
3 changed files with 11 additions and 0 deletions

View File

@ -39,6 +39,8 @@ extra_scripts =
post:post.py
lib_ldf_mode = chain+
monitor_speed = 115200
build_flags =
-D PIO_ENV_BUILD=$PIOENV
[env:m5stack-atom]
board = m5stack-atom

View File

@ -87,7 +87,11 @@ const unsigned long HEAP_REPORT_TIME=2000; //set to 0 to disable heap reporting
#define MAX_NMEA2000_MESSAGE_SEASMART_SIZE 500
#define MAX_NMEA0183_MESSAGE_SIZE 150 // For AIS
#ifndef FIRMWARE_TYPE
#define FIRMWARE_TYPE PIO_ENV_BUILD
#endif
String firmwareType(GWSTRINGIFY(FIRMWARE_TYPE));
typedef std::map<String,String> StringMap;
@ -474,6 +478,7 @@ protected:
char buffer[bsize];
toHex(base,buffer,bsize);
status["salt"] = buffer;
status["fwtype"]= firmwareType;
//nmea0183Converter->toJson(status);
countNMEA2KIn.toJson(status);
countNMEA2KOut.toJson(status);

View File

@ -76,6 +76,10 @@
</div>
<div class="tabPage hidden" id="updatePage">
<div class="row">
<span class="label">firmware type</span>
<span class="value status-fwtype">---</span>
</div>
<div class="row">
<span class="label">currentVersion</span>
<span class="value status-version">---</span>