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:
Patrick Fallberg
2016-12-07 23:44:29 +01:00
committed by GitHub
parent d4c4ab82ea
commit 8e1ef13804
167 changed files with 16103 additions and 15168 deletions
+19 -17
View File
@@ -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);
}