mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 01:41:12 +02:00
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:
@@ -55,13 +55,20 @@ static inline int dev_open()
|
|||||||
static void display(const char *s, bool update_timestamp = true)
|
static void display(const char *s, bool update_timestamp = true)
|
||||||
{
|
{
|
||||||
int fd = dev_open();
|
int fd = dev_open();
|
||||||
|
int len = strlen(s);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return;
|
return;
|
||||||
printf("spark_led:%s '%s'\n", __func__, s);
|
printf("spark_led:%s '%s'\n", __func__, s);
|
||||||
write(fd, s, strlen(s));
|
write(fd, s, len);
|
||||||
close(fd);
|
close(fd);
|
||||||
if (update_timestamp)
|
if (update_timestamp)
|
||||||
|
{
|
||||||
last_display = time(NULL);
|
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()
|
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)
|
if (mode != MODE_MENU_UTF8)
|
||||||
return;
|
return;
|
||||||
// ShowText(ptext);
|
display(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CLCD::showAudioTrack(const std::string &, const std::string & title, const std::string &)
|
void CLCD::showAudioTrack(const std::string &, const std::string & title, const std::string &)
|
||||||
|
Reference in New Issue
Block a user