Use correct actions for buttons.
This commit is contained in:
parent
b5c29eaa38
commit
7695e6196c
@ -134,13 +134,13 @@ void Controller::_check_buttons() {
|
|||||||
Serial.printf("Buttons: %d %d %d %d\n", _mcp->digitalRead(1), _mcp->digitalRead(2), _mcp->digitalRead(3), _mcp->digitalRead(4));
|
Serial.printf("Buttons: %d %d %d %d\n", _mcp->digitalRead(1), _mcp->digitalRead(2), _mcp->digitalRead(3), _mcp->digitalRead(4));
|
||||||
}*/
|
}*/
|
||||||
if (_check_button(0)) {
|
if (_check_button(0)) {
|
||||||
_player->play_album("23f5762e");
|
_player->track_prev();
|
||||||
} else if (_check_button(1)) {
|
} else if (_check_button(1)) {
|
||||||
_player->vol_up();
|
_player->vol_up();
|
||||||
} else if (_check_button(2)) {
|
} else if (_check_button(2)) {
|
||||||
_player->vol_down();
|
_player->vol_down();
|
||||||
} else if (_check_button(3)) {
|
} else if (_check_button(3)) {
|
||||||
_player->track_prev();
|
_player->track_next();
|
||||||
}
|
}
|
||||||
SPI.endTransaction();
|
SPI.endTransaction();
|
||||||
SPIMaster::disable();
|
SPIMaster::disable();
|
||||||
|
Loading…
Reference in New Issue
Block a user