enable channel if only seasmart or actisense is configured
This commit is contained in:
parent
a8a0df4b70
commit
f73390c9ae
|
@ -369,17 +369,20 @@ static GwChannel * createChannel(GwLog *logger, GwConfigHandler *config, int id,
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
GwChannel *channel = new GwChannel(logger, param->name,param->id,param->maxId);
|
GwChannel *channel = new GwChannel(logger, param->name,param->id,param->maxId);
|
||||||
|
bool sendSeaSmart=config->getBool(param->sendSeasmart);
|
||||||
|
bool readAct=config->getBool(param->readAct);
|
||||||
|
bool writeAct=config->getBool(param->writeAct);
|
||||||
channel->setImpl(impl);
|
channel->setImpl(impl);
|
||||||
channel->begin(
|
channel->begin(
|
||||||
canRead || canWrite,
|
canRead || canWrite || readAct || writeAct|| sendSeaSmart,
|
||||||
canWrite,
|
canWrite,
|
||||||
canRead,
|
canRead,
|
||||||
config->getString(param->readF),
|
config->getString(param->readF),
|
||||||
config->getString(param->writeF),
|
config->getString(param->writeF),
|
||||||
config->getBool(param->sendSeasmart),
|
sendSeaSmart,
|
||||||
config->getBool(param->toN2K),
|
config->getBool(param->toN2K),
|
||||||
config->getBool(param->readAct),
|
readAct,
|
||||||
config->getBool(param->writeAct));
|
writeAct);
|
||||||
LOG_INFO("created channel %s",channel->toString().c_str());
|
LOG_INFO("created channel %s",channel->toString().c_str());
|
||||||
return channel;
|
return channel;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue