1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-14 22:43:07 +01:00

intermediate, untested: second serial channel

This commit is contained in:
andreas
2023-08-30 21:10:00 +02:00
parent 17615adca5
commit 019fb8ff6a
4 changed files with 206 additions and 51 deletions

View File

@@ -427,7 +427,7 @@ class CapabilitiesRequest : public GwRequestMessage{
protected:
virtual void processRequest(){
int numCapabilities=userCodeHandler.getCapabilities()->size();
GwJsonDocument json(JSON_OBJECT_SIZE(numCapabilities*3+6));
GwJsonDocument json(JSON_OBJECT_SIZE(numCapabilities*3+8));
for (auto it=userCodeHandler.getCapabilities()->begin();
it != userCodeHandler.getCapabilities()->end();it++){
json[it->first]=it->second;
@@ -438,6 +438,12 @@ class CapabilitiesRequest : public GwRequestMessage{
String serial(F("NONE"));
#endif
json["serialmode"]=serial;
#ifdef GWSERIAL2_MODE
String serial2(F(GWSERIAL2_MODE));
#else
String serial2(F("NONE"));
#endif
json["serial2mode"]=serial2;
#ifdef GWBUTTON_PIN
json["hardwareReset"]="true";
#endif