From b71fd044addc546ab6520181ae6bf5ddfa58c893 Mon Sep 17 00:00:00 2001 From: nightshad Date: Sun, 6 Mar 2011 14:39:52 +0000 Subject: [PATCH] Reorder the properties for cable. Changing FEC in menu could lead to corrupted command list. git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1250 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/d4b483155c37020b7f9d08ccf2ea4aca1373ae9d Author: nightshad Date: 2011-03-06 (Sun, 06 Mar 2011) --- src/zapit/src/frontend.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/zapit/src/frontend.cpp b/src/zapit/src/frontend.cpp index cc47fe5d6..d8bc310fa 100644 --- a/src/zapit/src/frontend.cpp +++ b/src/zapit/src/frontend.cpp @@ -55,12 +55,14 @@ extern int uni_qrg; #define WEST 1 #define USALS +// Common properties #define FREQUENCY 1 #define MODULATION 2 #define INVERSION 3 #define SYMBOL_RATE 4 -#define INNER_FEC 5 -#define DELIVERY_SYSTEM 6 +#define DELIVERY_SYSTEM 5 +#define INNER_FEC 6 +// DVB-S/S2 specific #define PILOTS 7 #define ROLLOFF 8 @@ -79,8 +81,8 @@ static struct dtv_property dvbs_cmdargs[] = { { DTV_MODULATION, {0,0,0}, { QPSK },0 }, { DTV_INVERSION, {0,0,0}, { INVERSION_AUTO },0 }, { DTV_SYMBOL_RATE, {0,0,0}, { 27500000 },0 }, - { DTV_INNER_FEC, {0,0,0}, { FEC_AUTO },0 }, { DTV_DELIVERY_SYSTEM, {0,0,0}, { SYS_DVBS },0 }, + { DTV_INNER_FEC, {0,0,0}, { FEC_AUTO },0 }, { DTV_TUNE, {0,0,0}, { 0 },0 }, }; @@ -94,8 +96,8 @@ static struct dtv_property dvbs2_cmdargs[] = { { DTV_MODULATION, {}, { PSK_8 } ,0}, { DTV_INVERSION, {}, { INVERSION_AUTO } ,0}, { DTV_SYMBOL_RATE, {}, { 27500000 } ,0}, - { DTV_INNER_FEC, {}, { FEC_AUTO } ,0}, { DTV_DELIVERY_SYSTEM, {}, { SYS_DVBS2 } ,0}, + { DTV_INNER_FEC, {}, { FEC_AUTO } ,0}, { DTV_PILOT, {}, { PILOT_AUTO } ,0}, { DTV_ROLLOFF, {}, { ROLLOFF_AUTO } ,0}, { DTV_TUNE, {}, { 0 } ,0 }, @@ -112,7 +114,8 @@ static struct dtv_property dvbc_cmdargs[] = { { DTV_INVERSION, {}, { INVERSION_AUTO } ,0}, { DTV_SYMBOL_RATE, {}, { 27500000 } ,0}, { DTV_DELIVERY_SYSTEM, {}, { SYS_DVBC_ANNEX_AC } ,0}, - { DTV_TUNE, {}, { 0 },0 }, + { DTV_INNER_FEC, {}, { FEC_AUTO } ,0}, + { DTV_TUNE, {}, { 0 }, 0}, }; static struct dtv_properties dvbc_cmdseq = { @@ -680,10 +683,6 @@ int CFrontend::setFrontend(const struct dvb_frontend_parameters *feparams, bool } else { p = &dvbs_cmdseq; } -#if 0 // we set this before - p->props[VOLTAGE].u.data = currentVoltage; - p->props[TONE].u.data = currentToneMode; -#endif p->props[FREQUENCY].u.data = feparams->frequency; p->props[SYMBOL_RATE].u.data = feparams->u.qpsk.symbol_rate; p->props[INNER_FEC].u.data = fec; /*_inner*/ ; @@ -692,8 +691,8 @@ int CFrontend::setFrontend(const struct dvb_frontend_parameters *feparams, bool p = &dvbc_cmdseq; p->props[FREQUENCY].u.data = feparams->frequency; p->props[MODULATION].u.data = modulation; - p->props[INNER_FEC].u.data = fec_inner; p->props[SYMBOL_RATE].u.data = feparams->u.qam.symbol_rate; + p->props[INNER_FEC].u.data = fec_inner; break; default: printf("frontend: unknown frontend type, exiting\n");