Update to new ztd
This commit is contained in:
parent
df123ef150
commit
9e984f6d38
2 changed files with 8 additions and 8 deletions
|
|
@ -286,7 +286,7 @@ void Device::run_signal(char* buff)
|
||||||
{
|
{
|
||||||
std::string command="code=" + strval + ";";
|
std::string command="code=" + strval + ";";
|
||||||
command += dequote(it.shell);
|
command += dequote(it.shell);
|
||||||
std::thread(ztd::sh, command, true).detach();
|
std::thread(ztd::shr, command).detach();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -363,7 +363,7 @@ void Device::run_signal(char* buff)
|
||||||
+ ";channel=" + std::to_string(channel)
|
+ ";channel=" + std::to_string(channel)
|
||||||
+ ";velocity=" + std::to_string(value) + ";";
|
+ ";velocity=" + std::to_string(value) + ";";
|
||||||
command += dequote(it.shell);
|
command += dequote(it.shell);
|
||||||
std::thread(ztd::sh, command, true).detach();
|
std::thread(ztd::shr, command).detach();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -390,7 +390,7 @@ void Device::run_signal(char* buff)
|
||||||
else
|
else
|
||||||
command += std::to_string((long int) result);
|
command += std::to_string((long int) result);
|
||||||
command += ";" + dequote(it.shell);
|
command += ";" + dequote(it.shell);
|
||||||
std::thread(ztd::sh, command, true).detach();
|
std::thread(ztd::shr, command).detach();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -416,7 +416,7 @@ void Device::run_signal(char* buff)
|
||||||
else
|
else
|
||||||
command += std::to_string((long int) result);
|
command += std::to_string((long int) result);
|
||||||
command += ";" + dequote(it.shell);
|
command += ";" + dequote(it.shell);
|
||||||
std::thread(ztd::sh, command, true).detach();
|
std::thread(ztd::shr, command).detach();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // if type
|
} // if type
|
||||||
|
|
@ -438,7 +438,7 @@ void Device::loop(Device* dev)
|
||||||
|
|
||||||
for( auto it : dev->connectCommands )
|
for( auto it : dev->connectCommands )
|
||||||
{
|
{
|
||||||
std::thread(ztd::sh, dequote(it.shell), true).detach();
|
std::thread(ztd::shr, dequote(it.shell)).detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
while (getline(&buff, &buff_size, stream) > 0)
|
while (getline(&buff, &buff_size, stream) > 0)
|
||||||
|
|
@ -448,7 +448,7 @@ void Device::loop(Device* dev)
|
||||||
|
|
||||||
for( auto it : dev->disconnectCommands )
|
for( auto it : dev->disconnectCommands )
|
||||||
{
|
{
|
||||||
std::thread(ztd::sh, dequote(it.shell), true).detach();
|
std::thread(ztd::shr, dequote(it.shell)).detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
log("Device '" + dev->name + "' disconnected\n");
|
log("Device '" + dev->name + "' disconnected\n");
|
||||||
|
|
|
||||||
|
|
@ -214,12 +214,12 @@ int main(int argc, char* argv[])
|
||||||
}
|
}
|
||||||
if( options.find('L')->activated )
|
if( options.find('L')->activated )
|
||||||
{
|
{
|
||||||
ztd::sh("aseqdump -l", true);
|
ztd::shr("aseqdump -l");
|
||||||
stop(0);
|
stop(0);
|
||||||
}
|
}
|
||||||
if( options.find('l')->activated )
|
if( options.find('l')->activated )
|
||||||
{
|
{
|
||||||
ztd::sh(LIST_COMMAND, true);
|
ztd::shr(LIST_COMMAND);
|
||||||
stop(0);
|
stop(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue