1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2026-02-11 15:13:06 +01:00

correctly set the mode/type for serial channels

This commit is contained in:
wellenvogel
2025-09-17 17:40:28 +02:00
parent 7ebd582ca0
commit 3d131c7d98
12 changed files with 38 additions and 16 deletions

View File

@@ -79,6 +79,9 @@ String GwSerial::getMode(){
}
return "UNKNOWN";
}
int GwSerial::getType() {
return type;
}
bool GwSerial::isInitialized() { return initialized; }
size_t GwSerial::enqueue(const uint8_t *data, size_t len, bool partial)

View File

@@ -43,6 +43,7 @@ class GwSerial : public GwChannelInterface{
bool getAvailableWrite(){return availableWrite;}
virtual void begin(unsigned long baud, uint32_t config=SERIAL_8N1, int8_t rxPin=-1, int8_t txPin=-1)=0;
virtual String getMode() override;
virtual int getType() override;
friend GwSerialStream;
};
@@ -122,6 +123,7 @@ template<typename T>
setError(serial,logger);
};
};