spark: also show menu texts on LED display

Even though this is hard to read, it might still allow
to navigate blind in case e.g. videosettings are wrong.


Origin commit data
------------------
Branch: ni/coolstream
Commit: 8a5b2241f5
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-04-01 (Sun, 01 Apr 2012)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2012-04-01 14:30:33 +02:00
parent b5e99aca2e
commit 5acdd48d0f

View File

@@ -55,13 +55,20 @@ static inline int dev_open()
static void display(const char *s, bool update_timestamp = true)
{
int fd = dev_open();
int len = strlen(s);
if (fd < 0)
return;
printf("spark_led:%s '%s'\n", __func__, s);
write(fd, s, strlen(s));
write(fd, s, len);
close(fd);
if (update_timestamp)
{
last_display = time(NULL);
/* increase timeout to ensure that everything is displayed
* the driver displays 5 characters per second */
if (len > 4)
last_display += (len - 4) / 5;
}
}
CLCD::CLCD()
@@ -203,11 +210,11 @@ void CLCD::showPercentOver(const unsigned char perc, const bool /*perform_update
{
}
void CLCD::showMenuText(const int, const char *, const int, const bool)
void CLCD::showMenuText(const int, const char *text, const int, const bool)
{
if (mode != MODE_MENU_UTF8)
return;
// ShowText(ptext);
display(text);
}
void CLCD::showAudioTrack(const std::string &, const std::string & title, const std::string &)