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

move serial channel mode to serial channel type (integer)

This commit is contained in:
andreas
2023-08-31 22:03:23 +02:00
parent f36dd37b8b
commit 8c7540d956
4 changed files with 59 additions and 25 deletions

View File

@@ -1,6 +1,7 @@
#pragma once
#include <functional>
#include <vector>
#include <map>
#include <WString.h>
#include "GwChannel.h"
#include "GwLog.h"
@@ -26,10 +27,11 @@ class GwChannelList{
GwConfigHandler *config;
typedef std::vector<GwChannel *> ChannelList;
ChannelList theChannels;
std::map<int,String> modes;
GwSocketServer *sockets;
GwTcpClient *client;
void addSerial(HardwareSerial *stream,int id,const String &mode,int rx,int tx);
void addSerial(HardwareSerial *stream,int id,int type,int rx,int tx);
public:
GwChannelList(GwLog *logger, GwConfigHandler *config);
typedef std::function<void(GwChannel *)> ChannelAction;
@@ -42,6 +44,6 @@ class GwChannelList{
//single channel
GwChannel *getChannelById(int sourceId);
void fillStatus(GwApi::Status &status);
String getMode(int id);
};