mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +02:00
neutrino, zapit: drop EVT_SCAN_REPORT_FREQUENCY,
use EVT_SCAN_REPORT_FREQUENCYP to pass full feparams,
fix scan transponder display info
Origin commit data
------------------
Commit: 6e9b71af90
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2014-10-02 (Thu, 02 Oct 2014)
This commit is contained in:
@@ -993,10 +993,6 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6
|
||||
*msg = NeutrinoMessages::EVT_SCAN_REPORT_NUM_SCANNED_TRANSPONDERS;
|
||||
*data = *(unsigned*) p;
|
||||
break;
|
||||
case CZapitClient::EVT_SCAN_REPORT_FREQUENCY:
|
||||
*msg = NeutrinoMessages::EVT_SCAN_REPORT_FREQUENCY;
|
||||
*data = *(unsigned*) p;
|
||||
break;
|
||||
case CZapitClient::EVT_SCAN_FOUND_A_CHAN:
|
||||
*msg = NeutrinoMessages::EVT_SCAN_FOUND_A_CHAN;
|
||||
break;
|
||||
|
@@ -74,7 +74,6 @@ CScanTs::CScanTs(delivery_system_t DelSys)
|
||||
frameBuffer = CFrameBuffer::getInstance();
|
||||
radar = 0;
|
||||
total = done = 0;
|
||||
freqready = 0;
|
||||
delsys = DelSys;
|
||||
signalbox = NULL;
|
||||
memset(&TP, 0, sizeof(TP)); // valgrind
|
||||
@@ -402,25 +401,18 @@ int CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data)
|
||||
CVFD::getInstance()->showMenuText(0, str, -1, true);
|
||||
break;
|
||||
|
||||
case NeutrinoMessages::EVT_SCAN_REPORT_FREQUENCY:
|
||||
freqready = 1;
|
||||
sprintf(buffer, "%u", data);
|
||||
xpos_frequency = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(buffer)+2;
|
||||
paintLine(xpos2, ypos_frequency, xpos_frequency, buffer);
|
||||
paintRadar();
|
||||
break;
|
||||
|
||||
case NeutrinoMessages::EVT_SCAN_REPORT_FREQUENCYP:
|
||||
{
|
||||
int pol = data & 0xFF;
|
||||
int fec = (data >> 8) & 0xFF;
|
||||
int rate = (data >> 16) & 0xFFFF;
|
||||
//int delsys = (data >> 24)
|
||||
FrontendParameters *feparams = (FrontendParameters*) data;
|
||||
char * f, *s, *m;
|
||||
CFrontend * frontend = CServiceScan::getInstance()->GetFrontend();
|
||||
frontend->getDelSys(fec, (fe_modulation_t)0, f, s, m); // FIXME
|
||||
snprintf(buffer,sizeof(buffer), " %c %d %s %s %s", transponder::pol(pol), rate, f, s, m);
|
||||
paintLine(xpos2 + xpos_frequency, ypos_frequency, w - xpos_frequency - (7*fw), buffer);
|
||||
|
||||
CFrontend::getDelSys(feparams->delsys, feparams->fec_inner, feparams->modulation, f, s, m);
|
||||
uint32_t freq = feparams->frequency/1000;
|
||||
if (CFrontend::isSat(feparams->delsys))
|
||||
snprintf(buffer,sizeof(buffer), "%u %c %d %s %s %s", freq, transponder::pol(feparams->polarization), feparams->symbol_rate/1000, f, s, m);
|
||||
else
|
||||
snprintf(buffer,sizeof(buffer), "%u %d %s %s", freq, feparams->symbol_rate/1000, s, m);
|
||||
paintLine(xpos2, ypos_frequency, w - (7*fw), buffer);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -493,7 +485,6 @@ void CScanTs::hide()
|
||||
//frameBuffer->loadPal("radiomode.pal", 18, COL_MAXFREE);
|
||||
//frameBuffer->paintBackgroundBoxRel(0, 0, 720, 576);
|
||||
frameBuffer->paintBackground();
|
||||
freqready = 0;
|
||||
}
|
||||
|
||||
void CScanTs::paintLineLocale(int px, int * py, int pwidth, const neutrino_locale_t l)
|
||||
|
@@ -57,7 +57,6 @@ class CScanTs : public CMenuTarget
|
||||
int ypos_cur_satellite;
|
||||
int ypos_transponder;
|
||||
int ypos_frequency;
|
||||
int xpos_frequency;
|
||||
int ypos_provider;
|
||||
int ypos_channel;
|
||||
int ypos_service_numbers;
|
||||
@@ -74,7 +73,6 @@ class CScanTs : public CMenuTarget
|
||||
void paintRadar(void);
|
||||
int handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data);
|
||||
int greater_xpos(int xpos, const neutrino_locale_t txt);
|
||||
bool freqready;
|
||||
void showSNR();
|
||||
void testFunc();
|
||||
void prev_next_TP(bool);
|
||||
|
@@ -1755,7 +1755,6 @@ void CNeutrinoApp::InitZapitClient()
|
||||
CZapitClient::EVT_SCAN_FAILED,
|
||||
CZapitClient::EVT_SCAN_NUM_TRANSPONDERS,
|
||||
CZapitClient::EVT_SCAN_REPORT_NUM_SCANNED_TRANSPONDERS,
|
||||
CZapitClient::EVT_SCAN_REPORT_FREQUENCY,
|
||||
CZapitClient::EVT_SCAN_REPORT_FREQUENCYP,
|
||||
CZapitClient::EVT_SCAN_SATELLITE,
|
||||
CZapitClient::EVT_SCAN_NUM_CHANNELS,
|
||||
|
@@ -97,11 +97,10 @@ struct NeutrinoMessages {
|
||||
#endif
|
||||
EVT_SCAN_FAILED = CRCInput::RC_Events + 29,
|
||||
EVT_SCAN_REPORT_NUM_SCANNED_TRANSPONDERS = CRCInput::RC_Events + 30,
|
||||
EVT_SCAN_REPORT_FREQUENCY = CRCInput::RC_Events + 31,
|
||||
|
||||
EVT_SCAN_FOUND_RADIO_CHAN = CRCInput::RC_Events + 32,
|
||||
EVT_SCAN_FOUND_DATA_CHAN = CRCInput::RC_Events + 33,
|
||||
EVT_SCAN_FOUND_TV_CHAN = CRCInput::RC_Events + 34,
|
||||
EVT_SCAN_REPORT_FREQUENCYP = CRCInput::RC_Events + 36,
|
||||
EVT_ZAP_MOTOR = CRCInput::RC_Events + 37,
|
||||
/* sectionsd */
|
||||
EVT_SERVICES_UPD = CRCInput::RC_Events + 38,
|
||||
@@ -162,7 +161,8 @@ struct NeutrinoMessages {
|
||||
|
||||
EVT_HOTPLUG = CRCInput::RC_WithData + 26, /* data: char */
|
||||
EVT_FORMAT_DRIVE = CRCInput::RC_WithData + 27, /* data: char */
|
||||
EVT_WEBTV_ZAP_COMPLETE = CRCInput::RC_WithData + 28 /* data: (t_channel_id *) */
|
||||
EVT_WEBTV_ZAP_COMPLETE = CRCInput::RC_WithData + 28, /* data: (t_channel_id *) */
|
||||
EVT_SCAN_REPORT_FREQUENCYP = CRCInput::RC_WithData + 29
|
||||
};
|
||||
enum
|
||||
{
|
||||
|
@@ -56,7 +56,6 @@ class CZapitClient:public CBasicClient
|
||||
EVT_SCAN_FAILED,
|
||||
EVT_SCAN_NUM_TRANSPONDERS,
|
||||
EVT_SCAN_REPORT_NUM_SCANNED_TRANSPONDERS,
|
||||
EVT_SCAN_REPORT_FREQUENCY,
|
||||
EVT_SCAN_REPORT_FREQUENCYP,
|
||||
EVT_SCAN_SERVICENAME,
|
||||
EVT_SCAN_FOUND_A_CHAN,
|
||||
|
@@ -155,13 +155,8 @@ void CServiceScan::ReportFastScan(FrontendParameters &feparams, t_satellite_pos
|
||||
return;
|
||||
|
||||
std::string satname = CServiceManager::getInstance()->GetSatelliteName(satellitePosition);
|
||||
uint32_t actual_polarisation = ((feparams.symbol_rate/1000) << 16)
|
||||
| (feparams.fec_inner << 8) | (uint)feparams.polarization;
|
||||
uint32_t actual_freq = feparams.frequency;
|
||||
|
||||
CZapit::getInstance()->SendEvent(CZapitClient::EVT_SCAN_SATELLITE, satname.c_str(), satname.size() + 1);
|
||||
CZapit::getInstance()->SendEvent(CZapitClient::EVT_SCAN_REPORT_FREQUENCYP, &actual_polarisation,sizeof(actual_polarisation));
|
||||
CZapit::getInstance()->SendEvent(CZapitClient::EVT_SCAN_REPORT_FREQUENCY, &actual_freq,sizeof(actual_freq));
|
||||
CZapit::getInstance()->SendEvent(CZapitClient::EVT_SCAN_REPORT_FREQUENCYP, &feparams, sizeof(FrontendParameters));
|
||||
}
|
||||
|
||||
bool CServiceScan::FastscanTune(int id)
|
||||
|
@@ -659,21 +659,10 @@ bool CServiceScan::ReplaceTransponderParams(freq_id_t freq, t_satellite_position
|
||||
#endif
|
||||
void CServiceScan::SendTransponderInfo(transponder &t)
|
||||
{
|
||||
uint32_t actual_freq = t.feparams.frequency;
|
||||
|
||||
if (CFrontend::isCable(t.feparams.delsys) ||
|
||||
CFrontend::isTerr(t.feparams.delsys))
|
||||
actual_freq /= 1000;
|
||||
CZapit::getInstance()->SendEvent(CZapitClient::EVT_SCAN_REPORT_FREQUENCY, &actual_freq,sizeof(actual_freq));
|
||||
|
||||
CZapit::getInstance()->SendEvent(CZapitClient::EVT_SCAN_REPORT_NUM_SCANNED_TRANSPONDERS, &processed_transponders, sizeof(processed_transponders));
|
||||
CZapit::getInstance()->SendEvent(CZapitClient::EVT_SCAN_PROVIDER, (void *) " ", 2);
|
||||
CZapit::getInstance()->SendEvent(CZapitClient::EVT_SCAN_SERVICENAME, (void *) " ", 2);
|
||||
|
||||
if (CFrontend::isSat(t.feparams.delsys)) {
|
||||
uint32_t actual_polarisation = ((t.feparams.symbol_rate/1000) << 16) | (t.feparams.fec_inner << 8) | (uint)t.feparams.polarization;
|
||||
CZapit::getInstance()->SendEvent(CZapitClient::EVT_SCAN_REPORT_FREQUENCYP, &actual_polarisation,sizeof(actual_polarisation));
|
||||
}
|
||||
CZapit::getInstance()->SendEvent(CZapitClient::EVT_SCAN_REPORT_FREQUENCYP, &t.feparams, sizeof(FrontendParameters));
|
||||
}
|
||||
|
||||
void CServiceScan::ChannelFound(uint8_t service_type, std::string providerName, std::string serviceName)
|
||||
|
Reference in New Issue
Block a user