mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-16 07:23:07 +01:00
intermediate,untested: reorganize channel handling
This commit is contained in:
@@ -50,7 +50,7 @@ class GwChannel{
|
||||
);
|
||||
|
||||
void setImpl(GwChannelInterface *impl);
|
||||
bool isOwnSource(int id);
|
||||
bool overlaps(const GwChannel *) const;
|
||||
void enable(bool enabled){
|
||||
this->enabled=enabled;
|
||||
}
|
||||
@@ -73,5 +73,10 @@ class GwChannel{
|
||||
void sendActisense(const tN2kMsg &msg, int sourceId);
|
||||
unsigned long countRx();
|
||||
unsigned long countTx();
|
||||
bool isOwnSource(int source){
|
||||
if (maxSourceId < 0) return source == sourceId;
|
||||
return (source >= sourceId && source <= maxSourceId);
|
||||
}
|
||||
String getMode(){return impl->getMode();}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user