Unified MusicStatus enum constant capitalization with others
This commit is contained in:
parent
d4531d7bf3
commit
6f45c0f669
|
@ -66,8 +66,8 @@ namespace Pinetime {
|
|||
static const char EVENT_MUSIC_VOLDOWN = 0x06;
|
||||
|
||||
enum MusicStatus {
|
||||
NOT_PLAYING = 0x00,
|
||||
PLAYING = 0x01
|
||||
NotPlaying = 0x00,
|
||||
Playing = 0x01
|
||||
};
|
||||
private:
|
||||
static constexpr uint8_t msId[2] = {0x00, 0x01};
|
||||
|
|
|
@ -174,7 +174,7 @@ bool Music::Refresh() {
|
|||
UpdateLength();
|
||||
}
|
||||
|
||||
if (playing == Pinetime::Controllers::MusicService::MusicStatus::PLAYING) {
|
||||
if (playing == Pinetime::Controllers::MusicService::MusicStatus::Playing) {
|
||||
lv_label_set_text(txtPlayPause, "||");
|
||||
if (xTaskGetTickCount() - 1024 >= lastIncrement) {
|
||||
|
||||
|
@ -238,17 +238,17 @@ void Music::OnObjectEvent(lv_obj_t *obj, lv_event_t event) {
|
|||
} else if (obj == btnPrev) {
|
||||
musicService.event(Controllers::MusicService::EVENT_MUSIC_PREV);
|
||||
} else if (obj == btnPlayPause) {
|
||||
if (playing == Pinetime::Controllers::MusicService::MusicStatus::PLAYING) {
|
||||
if (playing == Pinetime::Controllers::MusicService::MusicStatus::Playing) {
|
||||
musicService.event(Controllers::MusicService::EVENT_MUSIC_PAUSE);
|
||||
|
||||
// Let's assume it stops playing instantly
|
||||
playing = Controllers::MusicService::NOT_PLAYING;
|
||||
playing = Controllers::MusicService::NotPlaying;
|
||||
} else {
|
||||
musicService.event(Controllers::MusicService::EVENT_MUSIC_PLAY);
|
||||
|
||||
// Let's assume it starts playing instantly
|
||||
// TODO: In the future should check for BT connection for better UX
|
||||
playing = Controllers::MusicService::PLAYING;
|
||||
playing = Controllers::MusicService::Playing;
|
||||
}
|
||||
} else if (obj == btnNext) {
|
||||
musicService.event(Controllers::MusicService::EVENT_MUSIC_NEXT);
|
||||
|
|
Loading…
Reference in New Issue
Block a user