Fixed indentation of rainbow example

pull/194/head
ZodiusInfuser 2021-08-24 14:16:27 +01:00
rodzic a46ea3b097
commit a347eb468f
1 zmienionych plików z 37 dodań i 37 usunięć

Wyświetl plik

@ -55,17 +55,17 @@ int main() {
float offset = 0.0f;
uint count = 0;
while (true) {
bool sw = user_sw.read();
bool a = button_a.read();
bool b = button_b.read();
while(true) {
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));