type to c_str()
This commit is contained in:
@@ -142,21 +142,21 @@ script:
|
||||
type: string
|
||||
then:
|
||||
- lambda: |-
|
||||
if (strcmp(type, "volume_up") == 0) { // button "volume_up"
|
||||
if (strcmp(type.c_str(), "volume_up") == 0) { // button "volume_up"
|
||||
id(main_display).image(80, 2, id(icon_music_vol_up), ImageAlign::TOP_CENTER, id(music_card_icon_bar_color));
|
||||
} else if (strcmp(type, "volume_down") == 0) { // button "volume_down"
|
||||
} else if (strcmp(type.c_str(), "volume_down") == 0) { // button "volume_down"
|
||||
id(main_display).image(80, 2, id(icon_music_vol_down), ImageAlign::TOP_CENTER, id(music_card_icon_bar_color));
|
||||
} else if (strcmp(type, "next") == 0) { // button "next"
|
||||
} else if (strcmp(type.c_str(), "next") == 0) { // button "next"
|
||||
id(main_display).image(80, 2, id(icon_music_next), ImageAlign::TOP_CENTER, id(music_card_icon_bar_color));
|
||||
} else if (strcmp(type, "prev") == 0) { // button "prev"
|
||||
} else if (strcmp(type.c_str(), "prev") == 0) { // button "prev"
|
||||
id(main_display).image(80, 2, id(icon_music_prev), ImageAlign::TOP_CENTER, id(music_card_icon_bar_color));
|
||||
} else if (strcmp(type, "playpause") == 0) { // button "playpause"
|
||||
} else if (strcmp(type.c_str(), "playpause") == 0) { // button "playpause"
|
||||
if (strcmp(id(music_playerstate).state.c_str(), "playing") == 0) {
|
||||
id(main_display).image(80, 2, id(icon_music_pause), ImageAlign::TOP_CENTER, id(music_card_icon_bar_color));
|
||||
} else {
|
||||
id(main_display).image(80, 2, id(icon_music_play), ImageAlign::TOP_CENTER, id(music_card_icon_bar_color));
|
||||
}
|
||||
} else if (strcmp(type, "power") == 0) { // button "power"
|
||||
} else if (strcmp(type.c_str(), "power") == 0) { // button "power"
|
||||
if (strcmp(id(music_playerstate).state.c_str(), "off") == 0) {
|
||||
id(main_display).image(80, 2, id(icon_music_off), ImageAlign::TOP_CENTER, id(music_card_icon_bar_color));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user