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;
|
static const char EVENT_MUSIC_VOLDOWN = 0x06;
|
||||||
|
|
||||||
enum MusicStatus {
|
enum MusicStatus {
|
||||||
NOT_PLAYING = 0x00,
|
NotPlaying = 0x00,
|
||||||
PLAYING = 0x01
|
Playing = 0x01
|
||||||
};
|
};
|
||||||
private:
|
private:
|
||||||
static constexpr uint8_t msId[2] = {0x00, 0x01};
|
static constexpr uint8_t msId[2] = {0x00, 0x01};
|
||||||
|
|
|
@ -174,10 +174,10 @@ bool Music::Refresh() {
|
||||||
UpdateLength();
|
UpdateLength();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playing == Pinetime::Controllers::MusicService::MusicStatus::PLAYING) {
|
if (playing == Pinetime::Controllers::MusicService::MusicStatus::Playing) {
|
||||||
lv_label_set_text(txtPlayPause, "||");
|
lv_label_set_text(txtPlayPause, "||");
|
||||||
if (xTaskGetTickCount() - 1024 >= lastIncrement) {
|
if (xTaskGetTickCount() - 1024 >= lastIncrement) {
|
||||||
|
|
||||||
if (frameB) {
|
if (frameB) {
|
||||||
lv_img_set_src(imgDiscAnim, &disc_f_1);
|
lv_img_set_src(imgDiscAnim, &disc_f_1);
|
||||||
} else {
|
} else {
|
||||||
|
@ -238,17 +238,17 @@ void Music::OnObjectEvent(lv_obj_t *obj, lv_event_t event) {
|
||||||
} else if (obj == btnPrev) {
|
} else if (obj == btnPrev) {
|
||||||
musicService.event(Controllers::MusicService::EVENT_MUSIC_PREV);
|
musicService.event(Controllers::MusicService::EVENT_MUSIC_PREV);
|
||||||
} else if (obj == btnPlayPause) {
|
} 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);
|
musicService.event(Controllers::MusicService::EVENT_MUSIC_PAUSE);
|
||||||
|
|
||||||
// Let's assume it stops playing instantly
|
// Let's assume it stops playing instantly
|
||||||
playing = Controllers::MusicService::NOT_PLAYING;
|
playing = Controllers::MusicService::NotPlaying;
|
||||||
} else {
|
} else {
|
||||||
musicService.event(Controllers::MusicService::EVENT_MUSIC_PLAY);
|
musicService.event(Controllers::MusicService::EVENT_MUSIC_PLAY);
|
||||||
|
|
||||||
// Let's assume it starts playing instantly
|
// Let's assume it starts playing instantly
|
||||||
// TODO: In the future should check for BT connection for better UX
|
// TODO: In the future should check for BT connection for better UX
|
||||||
playing = Controllers::MusicService::PLAYING;
|
playing = Controllers::MusicService::Playing;
|
||||||
}
|
}
|
||||||
} else if (obj == btnNext) {
|
} else if (obj == btnNext) {
|
||||||
musicService.event(Controllers::MusicService::EVENT_MUSIC_NEXT);
|
musicService.event(Controllers::MusicService::EVENT_MUSIC_NEXT);
|
||||||
|
|
Loading…
Reference in a new issue