mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
Show tuner locked or not using green or red radar, experimental
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@503 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -17,7 +17,7 @@ install_DATA = \
|
|||||||
mounted.png movie.png \
|
mounted.png movie.png \
|
||||||
mp3.png mute.png mute_small.png mute_zap_gray.png mute_zap_green.png \
|
mp3.png mute.png mute_small.png mute_zap_gray.png mute_zap_green.png \
|
||||||
network.png not_mounted.png notyet.png numericpad.png ok.png power.png \
|
network.png not_mounted.png notyet.png numericpad.png ok.png power.png \
|
||||||
radar.pal radar0.raw radar1.raw radar2.raw radar3.raw radar4.raw \
|
radar_red.pal radar.pal radar0.raw radar1.raw radar2.raw radar3.raw radar4.raw \
|
||||||
radar5.raw radar6.raw radar7.raw radar8.raw radar9.raw movieplayer.raw \
|
radar5.raw radar6.raw radar7.raw radar8.raw radar9.raw movieplayer.raw \
|
||||||
recording.png settings.png shell.png softupdate.png streaming.png \
|
recording.png settings.png shell.png softupdate.png streaming.png \
|
||||||
subt.png subt_gray.png timer.png video.png \
|
subt.png subt_gray.png timer.png video.png \
|
||||||
|
BIN
data/icons/radar_red.pal
Normal file
BIN
data/icons/radar_red.pal
Normal file
Binary file not shown.
@@ -914,14 +914,15 @@ void CInfoViewer::showFailure ()
|
|||||||
void CInfoViewer::showMotorMoving (int duration)
|
void CInfoViewer::showMotorMoving (int duration)
|
||||||
{
|
{
|
||||||
char text[256];
|
char text[256];
|
||||||
|
#if 0
|
||||||
char buffer[10];
|
char buffer[10];
|
||||||
|
|
||||||
sprintf (buffer, "%d", duration);
|
sprintf (buffer, "%d", duration);
|
||||||
strcpy (text, g_Locale->getText (LOCALE_INFOVIEWER_MOTOR_MOVING));
|
strcpy (text, g_Locale->getText (LOCALE_INFOVIEWER_MOTOR_MOVING));
|
||||||
strcat (text, " (");
|
strcat (text, " (");
|
||||||
strcat (text, buffer);
|
strcat (text, buffer);
|
||||||
strcat (text, " s)");
|
strcat (text, " s)");
|
||||||
|
#endif
|
||||||
|
sprintf(text, "%s (%ds)", g_Locale->getText (LOCALE_INFOVIEWER_MOTOR_MOVING), duration);
|
||||||
ShowHintUTF (LOCALE_MESSAGEBOX_INFO, text, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth (text, true) + 10, duration); // UTF-8
|
ShowHintUTF (LOCALE_MESSAGEBOX_INFO, text, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth (text, true) + 10, duration); // UTF-8
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -800,7 +800,7 @@ void CMoviePlayerGui::PlayFile(void)
|
|||||||
case 6: /*DTS*/
|
case 6: /*DTS*/
|
||||||
apidtitle.append(" (DTS)");
|
apidtitle.append(" (DTS)");
|
||||||
enabled = false;
|
enabled = false;
|
||||||
break;
|
break;
|
||||||
case 7: /*MLP*/
|
case 7: /*MLP*/
|
||||||
apidtitle.append(" (MLP)");
|
apidtitle.append(" (MLP)");
|
||||||
break;
|
break;
|
||||||
@@ -1231,6 +1231,7 @@ void CMoviePlayerGui::PlayFile(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (exit) {
|
if (exit) {
|
||||||
|
printf("Exit, isMovieBrowser %d p_movie_info %x\n", isMovieBrowser, p_movie_info);
|
||||||
if (isMovieBrowser == true && p_movie_info != NULL) {
|
if (isMovieBrowser == true && p_movie_info != NULL) {
|
||||||
// if we have a movie information, try to save the stop position
|
// if we have a movie information, try to save the stop position
|
||||||
ftime(¤t_time);
|
ftime(¤t_time);
|
||||||
|
@@ -193,6 +193,7 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
|
|||||||
/* send scantype to zapit */
|
/* send scantype to zapit */
|
||||||
g_Zapit->setScanType((CZapitClient::scanType) CNeutrinoApp::getInstance()->getScanSettings().scanType );
|
g_Zapit->setScanType((CZapitClient::scanType) CNeutrinoApp::getInstance()->getScanSettings().scanType );
|
||||||
|
|
||||||
|
tuned = frontend->getStatus();
|
||||||
paint(test);
|
paint(test);
|
||||||
/* go */
|
/* go */
|
||||||
if(test) {
|
if(test) {
|
||||||
@@ -310,6 +311,7 @@ int CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data)
|
|||||||
sprintf(buffer, "%u", data);
|
sprintf(buffer, "%u", data);
|
||||||
xpos_frequency = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(buffer, true);
|
xpos_frequency = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(buffer, true);
|
||||||
paintLine(xpos2, ypos_frequency, xpos_frequency, buffer);
|
paintLine(xpos2, ypos_frequency, xpos_frequency, buffer);
|
||||||
|
paintRadar();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NeutrinoMessages::EVT_SCAN_REPORT_FREQUENCYP:
|
case NeutrinoMessages::EVT_SCAN_REPORT_FREQUENCYP:
|
||||||
@@ -377,6 +379,11 @@ void CScanTs::paintRadar(void)
|
|||||||
{
|
{
|
||||||
char filename[30];
|
char filename[30];
|
||||||
|
|
||||||
|
if(tuned != frontend->getStatus()) {
|
||||||
|
tuned = frontend->getStatus();
|
||||||
|
frameBuffer->loadPal(tuned ? "radar.pal" : "radar_red.pal", 18, 38);
|
||||||
|
}
|
||||||
|
|
||||||
sprintf(filename, "radar%d.raw", radar);
|
sprintf(filename, "radar%d.raw", radar);
|
||||||
radar = (radar + 1) % 10;
|
radar = (radar + 1) % 10;
|
||||||
frameBuffer->paintIcon8(filename, xpos_radar, ypos_radar, 18);
|
frameBuffer->paintIcon8(filename, xpos_radar, ypos_radar, 18);
|
||||||
@@ -416,7 +423,7 @@ void CScanTs::paint(bool fortest)
|
|||||||
//frameBuffer->paintBoxRel(x, ypos + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0);
|
//frameBuffer->paintBoxRel(x, ypos + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0);
|
||||||
frameBuffer->paintBoxRel(x, ypos + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
|
frameBuffer->paintBoxRel(x, ypos + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
|
||||||
|
|
||||||
frameBuffer->loadPal("radar.pal", 18, 38);
|
frameBuffer->loadPal(tuned ? "radar.pal" : "radar_red.pal", 18, 38);
|
||||||
|
|
||||||
ypos = y + hheight + (mheight >> 1);
|
ypos = y + hheight + (mheight >> 1);
|
||||||
|
|
||||||
@@ -479,7 +486,6 @@ void CScanTs::showSNR ()
|
|||||||
|
|
||||||
ssig = frontend->getSignalStrength();
|
ssig = frontend->getSignalStrength();
|
||||||
ssnr = frontend->getSignalNoiseRatio();
|
ssnr = frontend->getSignalNoiseRatio();
|
||||||
|
|
||||||
snr = (ssnr & 0xFFFF) * 100 / 65535;
|
snr = (ssnr & 0xFFFF) * 100 / 65535;
|
||||||
sig = (ssig & 0xFFFF) * 100 / 65535;
|
sig = (ssig & 0xFFFF) * 100 / 65535;
|
||||||
|
|
||||||
|
@@ -65,6 +65,7 @@ class CScanTs : public CMenuTarget
|
|||||||
uint32_t total;
|
uint32_t total;
|
||||||
uint32_t done;
|
uint32_t done;
|
||||||
int lastsnr, lastsig;
|
int lastsnr, lastsig;
|
||||||
|
int tuned;
|
||||||
CProgressBar *snrscale, *sigscale;
|
CProgressBar *snrscale, *sigscale;
|
||||||
|
|
||||||
void paint(bool fortest = false);
|
void paint(bool fortest = false);
|
||||||
|
@@ -345,7 +345,12 @@ uint32_t CFrontend::getRate()
|
|||||||
|
|
||||||
fe_status_t CFrontend::getStatus(void) const
|
fe_status_t CFrontend::getStatus(void) const
|
||||||
{
|
{
|
||||||
fe_status_t status = (fe_status_t) 0;
|
#if 0 // FIXME FE_READ_STATUS should be fixed in drivers !
|
||||||
|
struct dvb_frontend_event event;
|
||||||
|
fop(ioctl, FE_READ_STATUS, &event.status);
|
||||||
|
printf("CFrontend::getStatus: %d\n", event.status);
|
||||||
|
#endif
|
||||||
|
fe_status_t status = (fe_status_t) tuned;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -567,6 +572,8 @@ int CFrontend::setFrontend(const struct dvb_frontend_parameters *feparams, bool
|
|||||||
int fec;
|
int fec;
|
||||||
fe_code_rate_t fec_inner;
|
fe_code_rate_t fec_inner;
|
||||||
|
|
||||||
|
tuned = false;
|
||||||
|
|
||||||
/* Decode the needed settings */
|
/* Decode the needed settings */
|
||||||
switch (info.type) {
|
switch (info.type) {
|
||||||
case FE_QPSK:
|
case FE_QPSK:
|
||||||
@@ -717,8 +724,6 @@ int CFrontend::setFrontend(const struct dvb_frontend_parameters *feparams, bool
|
|||||||
}
|
}
|
||||||
printf("[fe0] DEMOD: FEC %s system %s modulation %s pilot %s\n", f, s, m, pilot == PILOT_ON ? "on" : "off");
|
printf("[fe0] DEMOD: FEC %s system %s modulation %s pilot %s\n", f, s, m, pilot == PILOT_ON ? "on" : "off");
|
||||||
|
|
||||||
tuned = false;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
TIMER_INIT();
|
TIMER_INIT();
|
||||||
TIMER_START();
|
TIMER_START();
|
||||||
@@ -732,7 +737,6 @@ int CFrontend::setFrontend(const struct dvb_frontend_parameters *feparams, bool
|
|||||||
TIMER_INIT();
|
TIMER_INIT();
|
||||||
TIMER_START();
|
TIMER_START();
|
||||||
|
|
||||||
//tuned = true;
|
|
||||||
getEvent();
|
getEvent();
|
||||||
|
|
||||||
TIMER_STOP("[fe0] tuning took");
|
TIMER_STOP("[fe0] tuning took");
|
||||||
|
Reference in New Issue
Block a user