Fixed indentation of rainbow example
@@ -56,16 +56,16 @@ int main() {
uint count = 0;
while(true) {
- bool sw = user_sw.read();
- bool a = button_a.read();
- bool b = button_b.read();
+ bool sw_pressed = user_sw.read();
+ bool a_pressed = button_a.read();
+ bool b_pressed = button_b.read();
- if(sw) {
+ if(sw_pressed) {
speed = DEFAULT_SPEED;
}
else {
- if(a) speed--;
- if(b) speed++;
+ if(a_pressed) speed--;
+ if(b_pressed) speed++;
}
speed = std::min((int)255, std::max((int)1, speed));
