From f9b4f03d311581bb697c493a53d20aeff3350ce0 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Tue, 17 Apr 2012 18:28:21 +0400 Subject: [PATCH] zapit/src/frontend.cpp: add static CFrontend::getDelSys Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/627fed723220ebeba9c9cd0917b0dc37c2deb171 Author: [CST] Focus Date: 2012-04-17 (Tue, 17 Apr 2012) --- src/zapit/include/zapit/frontend_c.h | 1 + src/zapit/src/frontend.cpp | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/zapit/include/zapit/frontend_c.h b/src/zapit/include/zapit/frontend_c.h index e10d9566e..5de13ca6c 100644 --- a/src/zapit/include/zapit/frontend_c.h +++ b/src/zapit/include/zapit/frontend_c.h @@ -240,5 +240,6 @@ class CFrontend satellite_map_t & getSatellites() { return satellites; } void setSatellites(satellite_map_t satmap) { satellites = satmap; } int getNumber() { return fenumber; }; + static void getDelSys(uint8_t type, int f, int m, char * &fec, char * &sys, char * &mod); }; #endif /* __zapit_frontend_h__ */ diff --git a/src/zapit/src/frontend.cpp b/src/zapit/src/frontend.cpp index 7ff1a5834..e4f07c8f6 100644 --- a/src/zapit/src/frontend.cpp +++ b/src/zapit/src/frontend.cpp @@ -508,7 +508,12 @@ struct dvb_frontend_event CFrontend::getEvent(void) void CFrontend::getDelSys(int f, int m, char *&fec, char *&sys, char *&mod) { - if (info.type == FE_QPSK) { + return getDelSys(info.type, f, m, fec, sys, mod); +} + +void CFrontend::getDelSys(uint8_t type, int f, int m, char *&fec, char *&sys, char *&mod) +{ + if (type == FE_QPSK) { if (f < FEC_S2_QPSK_1_2) { sys = (char *)"DVB"; mod = (char *)"QPSK"; @@ -519,7 +524,7 @@ void CFrontend::getDelSys(int f, int m, char *&fec, char *&sys, char *&mod) sys = (char *)"DVB-S2"; mod = (char *)"8PSK"; } - } else if (info.type == FE_QAM) { + } else if (type == FE_QAM) { sys = (char *)"DVB"; switch (m) { case QAM_16: @@ -1682,3 +1687,4 @@ void CFrontend::gotoXX(t_satellite_position pos) sendMotorCommand(0xE0, 0x31, 0x6E, 2, ((RotorCmd & 0xFF00) / 0x100), RotorCmd & 0xFF, repeatUsals); secSetVoltage(config.highVoltage ? SEC_VOLTAGE_18 : SEC_VOLTAGE_13, 15); //FIXME ? } +