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

intermediate: channel config 1st tests

This commit is contained in:
wellenvogel
2021-12-29 20:19:07 +01:00
parent 01dae66459
commit 298b6c1640
3 changed files with 14 additions and 10 deletions

View File

@@ -136,7 +136,7 @@ GwCounter<unsigned long> countNMEA2KOut("count2Kout");
GwChannelConfig usbChannel(&logger,"USB");
GwChannelConfig actisenseChannel(&logger,"USB");
GwChannelConfig tcpChannel(&logger,"TCPServer");
GwChannelConfig serialChannel(&logger,"TCPClient");
GwChannelConfig serialChannel(&logger,"SER");
GwChannelConfig tclChannel(&logger,"TCPClient");
GwChannelConfig * channelFromSource(int source){
@@ -205,7 +205,7 @@ GwSerial *usbSerial = new GwSerial(NULL, 0, USB_CHANNEL_ID);
GwSerial *serial1=NULL;
void sendBufferToChannels(const char * buffer, int sourceId){
if (sourceId < MIN_TCP_CHANNEL_ID && tcpChannel.canSendOut(buffer)){
if (tcpChannel.canSendOut(buffer)){
socketServer.sendToClients(buffer,sourceId);
}
if (sourceId != USB_CHANNEL_ID && usbChannel.canSendOut(buffer)){