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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user