Hi Bob
You will need to modify the code. Grab a separate copy of mpd_oled. The screen selection code is in main.cc
Change this to
After building, change the name of the executable mpd_oled to mpd_oled_clock. Rename mpd_oled.service to mpd_oled_clock.service and edit it to call mpd_oled_clock (you may need to create a dummy fifo for the audio input, e.g. mkfifo /tmp/dummy) . Now make an install_clock.sh script for mpd_oled_clock
Review the install_clock.sh contents, printed by the second command above, then install with
For your other display, you may be able to amend the draw display funcion to look like
This would hopefully now show an emply spectrum display when stopped, which might be preferable to having two clocks.
This is all untested! (Sorry, I am short of time). The approach seems reasonable, but there may be issues or some extra steps needed.
Good luck!
Adrian.
You will need to modify the code. Grab a separate copy of mpd_oled. The screen selection code is in main.cc
Code:
void draw_display(ArduiPi_OLED &display, const display_info &disp_info)
{
if (disp_info.status.get_state() == MPD_STATE_UNKNOWN ||
disp_info.status.get_state() == MPD_STATE_STOP)
draw_clock(display, disp_info);
else
draw_spect_display(display, disp_info);
}
Change this to
Code:
void draw_display(ArduiPi_OLED &display, const display_info &disp_info)
{
draw_clock(display, disp_info);
}
After building, change the name of the executable mpd_oled to mpd_oled_clock. Rename mpd_oled.service to mpd_oled_clock.service and edit it to call mpd_oled_clock (you may need to create a dummy fifo for the audio input, e.g. mkfifo /tmp/dummy) . Now make an install_clock.sh script for mpd_oled_clock
Code:
sed 's/mpd_oled/mpd_oled_clock/g' install.sh > install_clock.sh
cat install_clock.sh
Review the install_clock.sh contents, printed by the second command above, then install with
Code:
sudo bash install_clock.sh
For your other display, you may be able to amend the draw display funcion to look like
Code:
void draw_display(ArduiPi_OLED &display, const display_info &disp_info)
{
draw_spect_display(display, disp_info);
}
This would hopefully now show an emply spectrum display when stopped, which might be preferable to having two clocks.
This is all untested! (Sorry, I am short of time). The approach seems reasonable, but there may be issues or some extra steps needed.
Good luck!
Adrian.