Repo restyled using astyle (#683)
The rules are in .tools/astyle/config/style.cfg and can also be reviewed at https://www.mysensors.org/view/260#coding-guidelines-core-library
This commit is contained in:
@@ -42,37 +42,39 @@ MyMessage msg(0, V_PH);
|
||||
|
||||
void setup()
|
||||
{
|
||||
//Setup your PH sensor here (I2C,Serial,Phidget...)
|
||||
//Setup your PH sensor here (I2C,Serial,Phidget...)
|
||||
}
|
||||
|
||||
float getPH() {
|
||||
//query your PH sensor here (I2C,Serial,Phidget...)
|
||||
float dummy = 7;
|
||||
return dummy;
|
||||
float getPH()
|
||||
{
|
||||
//query your PH sensor here (I2C,Serial,Phidget...)
|
||||
float dummy = 7;
|
||||
return dummy;
|
||||
}
|
||||
|
||||
void presentation() {
|
||||
// Send the sketch version information to the gateway and Controller
|
||||
sendSketchInfo("PH Sensor", "1.1");
|
||||
present(0, S_WATER_QUALITY);
|
||||
void presentation()
|
||||
{
|
||||
// Send the sketch version information to the gateway and Controller
|
||||
sendSketchInfo("PH Sensor", "1.1");
|
||||
present(0, S_WATER_QUALITY);
|
||||
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
float ph = getPH();
|
||||
float ph = getPH();
|
||||
|
||||
#if COMPARE_PH == 1
|
||||
if (lastPH != ph) {
|
||||
if (lastPH != ph) {
|
||||
#endif
|
||||
|
||||
// Send in the new PH value
|
||||
send(msg.set(ph, 1));
|
||||
// Save new PH value for next compare
|
||||
lastPH = ph;
|
||||
// Send in the new PH value
|
||||
send(msg.set(ph, 1));
|
||||
// Save new PH value for next compare
|
||||
lastPH = ph;
|
||||
|
||||
#if COMPARE_PH == 1
|
||||
}
|
||||
}
|
||||
#endif
|
||||
sleep(SLEEP_TIME);
|
||||
sleep(SLEEP_TIME);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user