mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +02:00
simple_display: unify and clearify console output
Origin commit data
------------------
Branch: ni/coolstream
Commit: c4e17ca00e
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-10-30 (Mon, 30 Oct 2017)
Origin message was:
------------------
- simple_display: unify and clearify console output
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -142,7 +142,7 @@ static void display(const char *s, bool update_timestamp = true)
|
|||||||
int len = strlen(s);
|
int len = strlen(s);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return;
|
return;
|
||||||
printf("%s '%s'\n", __func__, s);
|
printf("%s '%s'\n", __func__, s);
|
||||||
write(fd, s, len);
|
write(fd, s, len);
|
||||||
close(fd);
|
close(fd);
|
||||||
if (update_timestamp)
|
if (update_timestamp)
|
||||||
@@ -238,7 +238,7 @@ void CLCD::init(const char *, const char *, const char *, const char *, const ch
|
|||||||
setMode(MODE_TVRADIO);
|
setMode(MODE_TVRADIO);
|
||||||
thread_running = true;
|
thread_running = true;
|
||||||
if (pthread_create (&thrTime, NULL, TimeThread, NULL) != 0 ) {
|
if (pthread_create (&thrTime, NULL, TimeThread, NULL) != 0 ) {
|
||||||
perror("[neutino] CLCD::init pthread_create(TimeThread)");
|
perror("[neutino] CLCD::init() pthread_create(TimeThread)");
|
||||||
thread_running = false;
|
thread_running = false;
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
@@ -279,7 +279,7 @@ void CLCD::setled(int red, int green)
|
|||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
printf("%s red:%d green:%d\n", __func__, red, green);
|
printf("CLCD::%s red:%d green:%d\n", __func__, red, green);
|
||||||
|
|
||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
@@ -288,7 +288,7 @@ printf("%s red:%d green:%d\n", __func__, red, green);
|
|||||||
d.u.led.led_nr = i;
|
d.u.led.led_nr = i;
|
||||||
d.u.led.on = leds[i];
|
d.u.led.on = leds[i];
|
||||||
if (ioctl(fd, VFDSETLED, &d) < 0)
|
if (ioctl(fd, VFDSETLED, &d) < 0)
|
||||||
fprintf(stderr, "[neutrino] %s setled VFDSETLED: %m\n", __func__);
|
fprintf(stderr, "[neutrino] CLCD::%s VFDSETLED: %m\n", __func__);
|
||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
@@ -313,7 +313,7 @@ void CLCD::setled(int red, int green)
|
|||||||
sprintf(s, "%c\n", col);
|
sprintf(s, "%c\n", col);
|
||||||
write(fd, s, 3);
|
write(fd, s, 3);
|
||||||
close(fd);
|
close(fd);
|
||||||
//printf("%s(%d, %d): %c\n", __func__, red, green, col);
|
//printf("CLCD::%s(%d, %d): %c\n", __func__, red, green, col);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void CLCD::setled(int /*red*/, int /*green*/)
|
void CLCD::setled(int /*red*/, int /*green*/)
|
||||||
@@ -554,7 +554,7 @@ void CLCD::setBrightness(int dimm)
|
|||||||
d.u.brightness.level = dimm;
|
d.u.brightness.level = dimm;
|
||||||
|
|
||||||
if (ioctl(fd, VFDBRIGHTNESS, &d) < 0)
|
if (ioctl(fd, VFDBRIGHTNESS, &d) < 0)
|
||||||
fprintf(stderr, "[neutrino] %s set brightness VFDBRIGHTNESS: %m\n", __func__);
|
fprintf(stderr, "[neutrino] CLCD::%s VFDBRIGHTNESS: %m\n", __func__);
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
@@ -623,7 +623,7 @@ void CLCD::togglePower(void)
|
|||||||
|
|
||||||
void CLCD::setMuted(bool mu)
|
void CLCD::setMuted(bool mu)
|
||||||
{
|
{
|
||||||
printf("spark_led:%s %d\n", __func__, mu);
|
printf("CLCD::%s %d\n", __func__, mu);
|
||||||
muted = mu;
|
muted = mu;
|
||||||
showVolume(volume, false);
|
showVolume(volume, false);
|
||||||
}
|
}
|
||||||
@@ -652,14 +652,14 @@ void CLCD::Clear()
|
|||||||
return;
|
return;
|
||||||
int ret = ioctl(fd, VFDDISPLAYCLR);
|
int ret = ioctl(fd, VFDDISPLAYCLR);
|
||||||
if(ret < 0)
|
if(ret < 0)
|
||||||
perror("[neutrino] spark_led Clear() VFDDISPLAYCLR");
|
perror("[neutrino] CLCD::clear() VFDDISPLAYCLR");
|
||||||
close(fd);
|
close(fd);
|
||||||
if (g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT) {
|
if (g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT) {
|
||||||
SetIcons(SPARK_ALL, false);
|
SetIcons(SPARK_ALL, false);
|
||||||
SetIcons(SPARK_CLOCK, timer_icon);
|
SetIcons(SPARK_CLOCK, timer_icon);
|
||||||
}
|
}
|
||||||
servicename.clear();
|
servicename.clear();
|
||||||
printf("spark_led:%s\n", __func__);
|
printf("CLCD::%s\n", __func__);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void CLCD::Clear()
|
void CLCD::Clear()
|
||||||
@@ -707,7 +707,7 @@ void CLCD::setlcdparameter(int dimm, const int power)
|
|||||||
|
|
||||||
brightness = dimm;
|
brightness = dimm;
|
||||||
|
|
||||||
printf("CLCD::setlcdparameter dimm %d power %d\n", dimm, power);
|
printf("CLCD::%s(dimm %d power %d)\n", __func__, dimm, power);
|
||||||
setBrightness(dimm);
|
setBrightness(dimm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -725,7 +725,7 @@ void CLCD::SetIcons(int icon, bool on)
|
|||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return;
|
return;
|
||||||
if (ioctl(fd, VFDICONDISPLAYONOFF, &d) <0)
|
if (ioctl(fd, VFDICONDISPLAYONOFF, &d) <0)
|
||||||
perror("[neutrino] SetIcons() VFDICONDISPLAYONOFF");
|
perror("[neutrino] CLCD::SetIcons() VFDICONDISPLAYONOFF");
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user