bug fixes
This commit is contained in:
@@ -49,6 +49,19 @@ void PIProtocol::init() {
|
||||
}
|
||||
|
||||
|
||||
void PIProtocol::setDevice(const string & dev_ip, int speed_port) {
|
||||
if (type == PIProtocol::Serial) {
|
||||
serial->setDevice(dev_ip);
|
||||
serial->setSpeed(speed_port);
|
||||
devName = dev_ip;
|
||||
}
|
||||
if (type == PIProtocol::Ethernet) {
|
||||
ether->setReadAddress(dev_ip, speed_port);
|
||||
devName = dev_ip + ":" + itos(speed_port);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void PIProtocol::setExpectedFrequency(float frequency)
|
||||
{
|
||||
exp_freq = frequency;
|
||||
|
||||
Reference in New Issue
Block a user