MCPcopy Create free account
hub / github.com/DanielOgorchock/ST_Anything / beSmart

Method beSmart

Arduino/libraries/ST_Anything/PS_Water.cpp:62–81  ·  view source on GitHub ↗

SmartThings Shield data handler (receives configuration data from ST - polling interval, and adjusts on the fly)

Source from the content-addressed store, hash-verified

60
61 //SmartThings Shield data handler (receives configuration data from ST - polling interval, and adjusts on the fly)
62 void PS_Water::beSmart(const String &str)
63 {
64 String s = str.substring(str.indexOf(' ') + 1);
65
66 if (s.toInt() != 0) {
67 st::PollingSensor::setInterval(s.toInt() * 1000);
68 if (st::PollingSensor::debug) {
69 Serial.print(F("PS_Water::beSmart set polling interval to "));
70 Serial.println(s.toInt());
71 }
72 }
73 else {
74 if (st::PollingSensor::debug)
75 {
76 Serial.print(F("PS_Water::beSmart cannot convert "));
77 Serial.print(s);
78 Serial.println(F(" to an Integer."));
79 }
80 }
81 }
82
83 //function to get data from sensor and queue results for transfer to ST Cloud
84 void PS_Water::getData()

Callers

nothing calls this directly

Calls 2

printMethod · 0.80
printlnMethod · 0.80

Tested by

no test coverage detected