From 7b3484721a39611f4baf3ccb0c4daba0c1445c75 Mon Sep 17 00:00:00 2001 From: Gediminas Jakutis Date: Thu, 8 Feb 2018 23:43:35 +0200 Subject: tempmodule: indentation fixes, comments. --- src/tempmodule/main.ino | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/tempmodule/main.ino b/src/tempmodule/main.ino index 58f749a..f76ee20 100644 --- a/src/tempmodule/main.ino +++ b/src/tempmodule/main.ino @@ -83,6 +83,11 @@ void loop(void) udp_push(&data, sizeof(data)); udp_push(&ticker, sizeof(ticker)); + /* + * We need to do all seven reads each time. + * We also have to work hard for the compiler + * to not optimize the load out. + */ for (i = 0; i < 7; ++i) { dataptr[1] = Wire.read(); dataptr[0] = Wire.read(); @@ -151,10 +156,10 @@ static void wifi_connect(const char * const ssid, const char * const password, c static void blink_led(const int pin, const int ontime, const int offtime) { - digitalWrite(pin, HIGH); - delay(ontime); - digitalWrite(pin, LOW); - delay(offtime); + digitalWrite(pin, HIGH); + delay(ontime); + digitalWrite(pin, LOW); + delay(offtime); } static void discover_client(void) -- cgit v1.2.3