| 299 | } |
| 300 | |
| 301 | void OSModule::updatePingStatusValues() |
| 302 | { |
| 303 | pingThread.stopThread(2000); |
| 304 | var data = pingStatusCC.getJSONData(); |
| 305 | pingStatusCC.clear(); |
| 306 | |
| 307 | for (auto& c : pingIPsCC.controllables) |
| 308 | { |
| 309 | String s = ((StringParameter*)c)->niceName; |
| 310 | BoolParameter* b = pingStatusCC.addBoolParameter(s.isNotEmpty() ? s : "[noip]", "Status for this IP", false); |
| 311 | b->saveValueOnly = false; |
| 312 | } |
| 313 | |
| 314 | pingStatusCC.loadJSONData(data, false); //force reload styles |
| 315 | for (auto& c : pingIPsCC.controllables) |
| 316 | { |
| 317 | if (BoolParameter* p = dynamic_cast<BoolParameter*>(c)) p->setValue(false); |
| 318 | } |
| 319 | |
| 320 | if (enabled->boolValue() && pingIPsCC.controllables.size() > 0) pingThread.startThread(); |
| 321 | } |
| 322 | |
| 323 | var OSModule::launchProcessFromScript(const var::NativeFunctionArgs& args) |
| 324 | { |
nothing calls this directly
no test coverage detected