mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
Merge branch 'neutrino-apollo' of coolstreamtech.de:cst-private-neutrino into neutrino-apollo
Conflicts: src/timerd/timermanager.cpp
This commit is contained in:
@@ -169,9 +169,9 @@ void CVFD::setlcdparameter(int dimm, const int power)
|
||||
brightness = dimm;
|
||||
|
||||
printf("CVFD::setlcdparameter dimm %d power %d\n", dimm, power);
|
||||
int ret = ioctl(fd, IOC_VFD_SET_BRIGHT, dimm);
|
||||
int ret = ioctl(fd, IOC_FP_SET_BRIGHT, dimm);
|
||||
if(ret < 0)
|
||||
perror("IOC_VFD_SET_BRIGHT");
|
||||
perror("IOC_FP_SET_BRIGHT");
|
||||
}
|
||||
|
||||
void CVFD::setlcdparameter(void)
|
||||
@@ -186,14 +186,14 @@ void CVFD::setled(int led1, int led2){
|
||||
int ret = -1;
|
||||
|
||||
if(led1 != -1){
|
||||
ret = ioctl(fd, IOC_VFD_LED_CTRL, led1);
|
||||
ret = ioctl(fd, IOC_FP_LED_CTRL, led1);
|
||||
if(ret < 0)
|
||||
perror("IOC_VFD_LED_CTRL");
|
||||
perror("IOC_FP_LED_CTRL");
|
||||
}
|
||||
if(led2 != -1){
|
||||
ret = ioctl(fd, IOC_VFD_LED_CTRL, led2);
|
||||
ret = ioctl(fd, IOC_FP_LED_CTRL, led2);
|
||||
if(ret < 0)
|
||||
perror("IOC_VFD_LED_CTRL");
|
||||
perror("IOC_FP_LED_CTRL");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,13 +206,13 @@ void CVFD::setled(bool on_off)
|
||||
if(on_off){//on
|
||||
switch(g_settings.led_rec_mode){
|
||||
case 1:
|
||||
led1 = VFD_LED_1_ON; led2 = VFD_LED_2_ON;
|
||||
led1 = FP_LED_1_ON; led2 = FP_LED_2_ON;
|
||||
break;
|
||||
case 2:
|
||||
led1 = VFD_LED_1_ON;
|
||||
led1 = FP_LED_1_ON;
|
||||
break;
|
||||
case 3:
|
||||
led2 = VFD_LED_2_ON;
|
||||
led2 = FP_LED_2_ON;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -222,13 +222,13 @@ void CVFD::setled(bool on_off)
|
||||
switch(g_settings.led_rec_mode){
|
||||
break;
|
||||
case 2:
|
||||
led1 = VFD_LED_1_OFF;
|
||||
led1 = FP_LED_1_OFF;
|
||||
break;
|
||||
case 3:
|
||||
led2 = VFD_LED_2_OFF;
|
||||
led2 = FP_LED_2_OFF;
|
||||
break;
|
||||
default:
|
||||
led1 = VFD_LED_1_OFF; led2 = VFD_LED_2_OFF;
|
||||
led1 = FP_LED_1_OFF; led2 = FP_LED_2_OFF;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -249,16 +249,16 @@ void CVFD::setled(void)
|
||||
|
||||
switch(select){
|
||||
case 0:
|
||||
led1 = VFD_LED_1_OFF; led2 = VFD_LED_2_OFF;
|
||||
led1 = FP_LED_1_OFF; led2 = FP_LED_2_OFF;
|
||||
break;
|
||||
case 1:
|
||||
led1 = VFD_LED_1_ON; led2 = VFD_LED_2_ON;
|
||||
led1 = FP_LED_1_ON; led2 = FP_LED_2_ON;
|
||||
break;
|
||||
case 2:
|
||||
led1 = VFD_LED_1_ON; led2 = VFD_LED_2_OFF;
|
||||
led1 = FP_LED_1_ON; led2 = FP_LED_2_OFF;
|
||||
break;
|
||||
case 3:
|
||||
led1 = VFD_LED_1_OFF; led2 = VFD_LED_2_ON;
|
||||
led1 = FP_LED_1_OFF; led2 = FP_LED_2_ON;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -288,7 +288,7 @@ void CVFD::showTime(bool force)
|
||||
return;
|
||||
#endif
|
||||
if(has_lcd && mode == MODE_SHUTDOWN) {
|
||||
ShowIcon(VFD_ICON_CAM1, false);
|
||||
ShowIcon(FP_ICON_CAM1, false);
|
||||
return;
|
||||
}
|
||||
if (has_lcd && showclock) {
|
||||
@@ -314,18 +314,18 @@ void CVFD::showTime(bool force)
|
||||
if(clearClock) {
|
||||
clearClock = 0;
|
||||
if(has_lcd)
|
||||
ShowIcon(VFD_ICON_CAM1, false);
|
||||
ShowIcon(FP_ICON_CAM1, false);
|
||||
setled(false);//off
|
||||
} else {
|
||||
clearClock = 1;
|
||||
if(has_lcd)
|
||||
ShowIcon(VFD_ICON_CAM1, true);
|
||||
ShowIcon(FP_ICON_CAM1, true);
|
||||
setled(true);//on
|
||||
}
|
||||
} else if(clearClock || (recstatus != tmp_recstatus)) { // in case icon ON after record stopped
|
||||
clearClock = 0;
|
||||
if(has_lcd)
|
||||
ShowIcon(VFD_ICON_CAM1, false);
|
||||
ShowIcon(FP_ICON_CAM1, false);
|
||||
setled();
|
||||
}
|
||||
recstatus = tmp_recstatus;
|
||||
@@ -340,13 +340,13 @@ void CVFD::showVolume(const char vol, const bool /*perform_update*/)
|
||||
static int oldpp = 0;
|
||||
if(!has_lcd) return;
|
||||
|
||||
ShowIcon(VFD_ICON_MUTE, muted);
|
||||
ShowIcon(FP_ICON_MUTE, muted);
|
||||
if(vol == volume)
|
||||
return;
|
||||
|
||||
volume = vol;
|
||||
wake_up();
|
||||
ShowIcon(VFD_ICON_FRAME, true);
|
||||
ShowIcon(FP_ICON_FRAME, true);
|
||||
|
||||
if ((mode == MODE_TVRADIO) && g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME]) {
|
||||
int pp = (int) round((double) vol * (double) 8 / (double) 100);
|
||||
@@ -357,11 +357,11 @@ printf("CVFD::showVolume: %d, bar %d\n", (int) vol, pp);
|
||||
int i;
|
||||
int j = 0x00000200;
|
||||
for(i = 0; i < pp; i++) {
|
||||
ShowIcon((vfd_icon) j, true);
|
||||
ShowIcon((fp_icon) j, true);
|
||||
j /= 2;
|
||||
}
|
||||
for(;i < 8; i++) {
|
||||
ShowIcon((vfd_icon) j, false);
|
||||
ShowIcon((fp_icon) j, false);
|
||||
j /= 2;
|
||||
}
|
||||
oldpp = pp;
|
||||
@@ -376,7 +376,7 @@ void CVFD::showPercentOver(const unsigned char perc, const bool /*perform_update
|
||||
if ((mode == MODE_TVRADIO) && !(g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME])) {
|
||||
//if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] == 0)
|
||||
{
|
||||
ShowIcon(VFD_ICON_FRAME, true);
|
||||
ShowIcon(FP_ICON_FRAME, true);
|
||||
int pp;
|
||||
if(perc == 255)
|
||||
pp = 0;
|
||||
@@ -388,11 +388,11 @@ void CVFD::showPercentOver(const unsigned char perc, const bool /*perform_update
|
||||
int i;
|
||||
int j = 0x00000200;
|
||||
for(i = 0; i < pp; i++) {
|
||||
ShowIcon((vfd_icon) j, true);
|
||||
ShowIcon((fp_icon) j, true);
|
||||
j /= 2;
|
||||
}
|
||||
for(;i < 8; i++) {
|
||||
ShowIcon((vfd_icon) j, false);
|
||||
ShowIcon((fp_icon) j, false);
|
||||
j /= 2;
|
||||
}
|
||||
percentOver = pp;
|
||||
@@ -432,16 +432,16 @@ void CVFD::showAudioPlayMode(AUDIOMODES m)
|
||||
if(!has_lcd) return;
|
||||
switch(m) {
|
||||
case AUDIO_MODE_PLAY:
|
||||
ShowIcon(VFD_ICON_PLAY, true);
|
||||
ShowIcon(VFD_ICON_PAUSE, false);
|
||||
ShowIcon(FP_ICON_PLAY, true);
|
||||
ShowIcon(FP_ICON_PAUSE, false);
|
||||
break;
|
||||
case AUDIO_MODE_STOP:
|
||||
ShowIcon(VFD_ICON_PLAY, false);
|
||||
ShowIcon(VFD_ICON_PAUSE, false);
|
||||
ShowIcon(FP_ICON_PLAY, false);
|
||||
ShowIcon(FP_ICON_PAUSE, false);
|
||||
break;
|
||||
case AUDIO_MODE_PAUSE:
|
||||
ShowIcon(VFD_ICON_PLAY, false);
|
||||
ShowIcon(VFD_ICON_PAUSE, true);
|
||||
ShowIcon(FP_ICON_PLAY, false);
|
||||
ShowIcon(FP_ICON_PAUSE, true);
|
||||
break;
|
||||
case AUDIO_MODE_FF:
|
||||
break;
|
||||
@@ -474,11 +474,11 @@ void CVFD::setMode(const MODES m, const char * const title)
|
||||
if(!has_lcd) return;
|
||||
|
||||
if(mode == MODE_AUDIO)
|
||||
ShowIcon(VFD_ICON_MP3, false);
|
||||
ShowIcon(FP_ICON_MP3, false);
|
||||
#if 0
|
||||
else if(mode == MODE_STANDBY) {
|
||||
ShowIcon(VFD_ICON_COL1, false);
|
||||
ShowIcon(VFD_ICON_COL2, false);
|
||||
ShowIcon(FP_ICON_COL1, false);
|
||||
ShowIcon(FP_ICON_COL2, false);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -511,7 +511,7 @@ void CVFD::setMode(const MODES m, const char * const title)
|
||||
break;
|
||||
case MODE_AUDIO:
|
||||
{
|
||||
ShowIcon(VFD_ICON_MP3, true);
|
||||
ShowIcon(FP_ICON_MP3, true);
|
||||
showAudioPlayMode(AUDIO_MODE_STOP);
|
||||
showVolume(volume, false);
|
||||
showclock = true;
|
||||
@@ -533,8 +533,8 @@ void CVFD::setMode(const MODES m, const char * const title)
|
||||
break;
|
||||
case MODE_STANDBY:
|
||||
#if 0
|
||||
ShowIcon(VFD_ICON_COL1, true);
|
||||
ShowIcon(VFD_ICON_COL2, true);
|
||||
ShowIcon(FP_ICON_COL1, true);
|
||||
ShowIcon(FP_ICON_COL2, true);
|
||||
#endif
|
||||
showclock = true;
|
||||
showTime(true); /* "showclock = true;" implies that "showTime();" does a "displayUpdate();" */
|
||||
@@ -669,20 +669,20 @@ void CVFD::Unlock()
|
||||
void CVFD::Clear()
|
||||
{
|
||||
if(!has_lcd) return;
|
||||
int ret = ioctl(fd, IOC_VFD_CLEAR_ALL, 0);
|
||||
int ret = ioctl(fd, IOC_FP_CLEAR_ALL, 0);
|
||||
if(ret < 0)
|
||||
perror("IOC_VFD_SET_TEXT");
|
||||
perror("IOC_FP_SET_TEXT");
|
||||
else
|
||||
text[0] = 0;
|
||||
}
|
||||
|
||||
void CVFD::ShowIcon(vfd_icon icon, bool show)
|
||||
void CVFD::ShowIcon(fp_icon icon, bool show)
|
||||
{
|
||||
if(!has_lcd) return;
|
||||
//printf("CVFD::ShowIcon %s %x\n", show ? "show" : "hide", (int) icon);
|
||||
int ret = ioctl(fd, show ? IOC_VFD_SET_ICON : IOC_VFD_CLEAR_ICON, icon);
|
||||
int ret = ioctl(fd, show ? IOC_FP_SET_ICON : IOC_FP_CLEAR_ICON, icon);
|
||||
if(ret < 0)
|
||||
perror(show ? "IOC_VFD_SET_ICON" : "IOC_VFD_CLEAR_ICON");
|
||||
perror(show ? "IOC_FP_SET_ICON" : "IOC_FP_CLEAR_ICON");
|
||||
}
|
||||
|
||||
void CVFD::ShowText(const char *str)
|
||||
@@ -707,9 +707,9 @@ printf("CVFD::ShowText: [%s]\n", str);
|
||||
|
||||
//printf("****************************** CVFD::ShowText: %s\n", str);
|
||||
//FIXME !!
|
||||
ret = ioctl(fd, IOC_VFD_SET_TEXT, len ? str : NULL);
|
||||
ret = ioctl(fd, IOC_FP_SET_TEXT, len ? str : NULL);
|
||||
if(ret < 0)
|
||||
perror("IOC_VFD_SET_TEXT");
|
||||
perror("IOC_FP_SET_TEXT");
|
||||
}
|
||||
|
||||
#ifdef VFD_UPDATE
|
||||
|
Reference in New Issue
Block a user