Fix cppcheck issues (#1036)

Fixes the following cppcheck issues:
examples/SecretKnockSensor/SecretKnockSensor.ino
305	variableScope	398	style
The scope of the variable 'timeDiff' can be reduced.

examples/SensebenderGatewaySerial/SensebenderGatewaySerial.ino
127	variableScope	398	style
The scope of the variable 'led_state' can be reduced.
This commit is contained in:
Mikael Falkvidd
2018-01-28 09:31:19 +01:00
committed by tekka
parent 52ac498eda
commit 06269dd949
2 changed files with 2 additions and 3 deletions
@@ -124,8 +124,8 @@ void preHwInit()
for (int i=0; i< num_of_leds; i++) {
pinMode(leds[i], OUTPUT);
}
uint8_t led_state = 0;
if (digitalRead(MY_SWC1)) {
uint8_t led_state = 0;
while (!Serial) {
digitalWrite(LED_BLUE, led_state);
led_state ^= 0x01;