Changeset 11023


Ignore:
Timestamp:
11/05/11 01:07:45 (12 years ago)
Author:
nit
Message:

[titan] fix channelist convert

Location:
titan/titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/frontenddev.h

    r11014 r11023  
    11421142        if(fec == 8) fec = FEC_4_5;
    11431143        if(fec == 9) fec = FEC_9_10;
    1144         if(fec == 10) fec = FEC_NONE;
    1145         if(fec == 11) fec = FEC_6_7;
    1146 
     1144        if(fec == 15) fec = FEC_NONE;
     1145       
    11471146        int pilot = tpnode->pilot;
    11481147        if(pilot == 0) pilot = PILOT_OFF;
     
    11601159        if(modulation == 2) modulation = PSK_8;
    11611160        if(modulation == 3) modulation = QAM_16;
    1162         if(modulation == 4) modulation = QAM_32;
    1163         if(modulation == 5) modulation = QAM_64;
    1164         if(modulation == 6) modulation = QAM_128;
    1165         if(modulation == 7) modulation = QAM_256;
    1166         if(modulation == 8) modulation = VSB_8;
    1167         if(modulation == 9) modulation = VSB_16;
    11681161
    11691162        p[0].cmd = DTV_CLEAR;
     
    12361229                return;
    12371230        }
     1231       
     1232        int fec = tpnode->fec;
     1233        if(fec == 0) fec = FEC_AUTO;
     1234        if(fec == 1) fec = FEC_1_2;
     1235        if(fec == 2) fec = FEC_2_3;
     1236        if(fec == 3) fec = FEC_3_4;
     1237        if(fec == 4) fec = FEC_5_6;
     1238        if(fec == 5) fec = FEC_7_8;
     1239        if(fec == 6) fec = FEC_8_9;
     1240        if(fec == 15) fec = FEC_NONE;
     1241
     1242        int modulation = tpnode->modulation;
     1243        if(modulation == 0) modulation = QAM_AUTO;
     1244        if(modulation == 1) modulation = QAM_16;
     1245        if(modulation == 2) modulation = QAM_32;
     1246        if(modulation == 3) modulation = QAM_64;
     1247        if(modulation == 4) modulation = QAM_128;
     1248        if(modulation == 5) modulation = QAM_256;
    12381249
    12391250#if DVB_API_VERSION >= 5
     
    12451256        p[1].cmd = DTV_DELIVERY_SYSTEM, p[1].u.data = tpnode->system;
    12461257        p[2].cmd = DTV_FREQUENCY,       p[2].u.data = tpnode->frequency;
    1247         p[3].cmd = DTV_MODULATION,      p[3].u.data = tpnode->modulation;
     1258        p[3].cmd = DTV_MODULATION,      p[3].u.data = modulation;
    12481259        p[4].cmd = DTV_SYMBOL_RATE,     p[4].u.data = tpnode->symbolrate;
    12491260        p[5].cmd = DTV_INVERSION,       p[5].u.data = (fe_spectral_inversion_t) tpnode->inversion;
    1250         p[6].cmd = DTV_INNER_FEC,       p[6].u.data = tpnode->fec;
     1261        p[6].cmd = DTV_INNER_FEC,       p[6].u.data = fec;
    12511262        p[7].cmd = DTV_TUNE;
    12521263        cmdseq.num = 8;
    12531264
    1254         debug(200, "frequ=%d, inversion=%d, fec=%d, sr=%d, modulation=%d, system=%d", tpnode->frequency, tpnode->inversion, tpnode->fec, tpnode->symbolrate, tpnode->modulation, tpnode->system);
     1265        debug(200, "frequ=%d, inversion=%d, fec=%d, sr=%d, modulation=%d, system=%d", tpnode->frequency, tpnode->inversion, fec, tpnode->symbolrate, modulation, tpnode->system);
    12551266#else
    12561267        struct dvb_frontend_parameters tuneto;
     
    12621273        tuneto.u.qam.modulation = tpnode->modulation;
    12631274
    1264         debug(200, "frequ=%d, inversion=%d, fec=%d, sr=%d, modulation=%d", tpnode->frequency, tpnode->inversion, tpnode->fec, tpnode->symbolrate, tpnode->modulation);
     1275        debug(200, "frequ=%d, inversion=%d, fec=%d, sr=%d, modulation=%d", tpnode->frequency, tpnode->inversion, fec, tpnode->symbolrate, modulation);
    12651276#endif
    12661277
     
    12911302                return;
    12921303        }
     1304       
     1305        int fec = tpnode->fec;
     1306        if(fec == 0) fec = FEC_1_2;
     1307        if(fec == 1) fec = FEC_2_3;
     1308        if(fec == 2) fec = FEC_3_4;
     1309        if(fec == 3) fec = FEC_5_6;
     1310        if(fec == 4) fec = FEC_7_8;
     1311        if(fec == 5) fec = FEC_AUTO;
     1312       
     1313        int modulation = tpnode->modulation;
     1314        if(modulation == 0) modulation = QPSK;
     1315        if(modulation == 1) modulation = QAM_16;
     1316        if(modulation == 2) modulation = QAM_64;
     1317        if(modulation == 3) modulation = QAM_AUTO;
     1318       
     1319/*
     1320        int bandwidth = tpnode->bandwidth;
     1321        if(bandwidth == 0) bandwidth = BANDWIDTH_8MHZ;
     1322        if(bandwidth == 1) bandwidth = BANDWIDTH_7MHZ;
     1323        if(bandwidth == 2) bandwidth = BANDWIDTH_6MHZ;
     1324        if(bandwidth == 3) bandwidth = BANDWIDTH_AUTO;
     1325       
     1326        int transmission = tpnode->transmission;
     1327        if(transmission == 0) transmission = TRANSMISSIONMODE_2K;
     1328        if(transmission == 1) transmission = TRANSMISSIONMODE_8K;
     1329        if(transmission == 2) transmission = TRANSMISSIONMODE_AUTO;
     1330       
     1331        int guardinterval = tpnode->guardinterval;
     1332        if(guardinterval == 0) guardinterval = GUARDINTERVAL_1_32;
     1333        if(guardinterval == 1) guardinterval = GUARDINTERVAL_1_16;
     1334        if(guardinterval == 2) guardinterval = GUARDINTERVAL_1_8;
     1335        if(guardinterval == 3) guardinterval = GUARDINTERVAL_1_4;
     1336        if(guardinterval == 4) guardinterval = GUARDINTERVAL_AUTO;
     1337       
     1338        int hierarchy = tpnode->hierarchy;
     1339        if(hierarchy == 0) hierarchy = HIERARCHY_NONE;
     1340        if(hierarchy == 1) hierarchy = HIERARCHY_1;
     1341        if(hierarchy == 2) hierarchy = HIERARCHY_2;
     1342        if(hierarchy == 3) hierarchy = HIERARCHY_4;
     1343        if(hierarchy == 4) hierarchy = HIERARCHY_NONE;
     1344*/
    12931345
    12941346        tuneto.frequency = tpnode->frequency;
    12951347        tuneto.inversion = tpnode->inversion;
    1296         tuneto.u.ofdm.bandwidth = 0;
     1348        //tuneto.u.ofdm.bandwidth = bandwidth;
    12971349        tuneto.u.ofdm.code_rate_HP = 0;
    12981350        tuneto.u.ofdm.code_rate_LP = 0;
    12991351        tuneto.u.ofdm.constellation = 0;
    1300         tuneto.u.ofdm.transmission_mode = 0;
    1301         tuneto.u.ofdm.guard_interval = 0;
    1302         tuneto.u.ofdm.hierarchy_information = 0;
     1352        //tuneto.u.ofdm.transmission_mode = transmission;
     1353        //tuneto.u.ofdm.guard_interval = guardinterval;
     1354        //tuneto.u.ofdm.hierarchy_information = hierarchy;
    13031355
    13041356        fediscard(node);
  • titan/titan/scan.h

    r10859 r11023  
    855855
    856856        //system
    857         tmpstr = transpondergetsystemstr(NULL, 1);
     857        tmpstr = transpondergetsystemstr(tpnode, 1);
    858858        changeinput(system, tmpstr);
    859859        free(tmpstr); tmpstr = NULL;
    860         tmpstr = transpondergetsystemstr(NULL, 2);
     860        tmpstr = transpondergetsystemstr(tpnode, 2);
    861861        changechoiceboxvalue(system, tmpstr);
    862862        free(tmpstr); tmpstr = NULL;
     
    878878
    879879        //inversion
    880         tmpstr = transpondergetinversionstr(NULL, 1);
     880        tmpstr = transpondergetinversionstr(tpnode, 1);
    881881        changeinput(inversion, tmpstr);
    882882        free(tmpstr); tmpstr = NULL;
    883         tmpstr = transpondergetinversionstr(NULL, 2);
     883        tmpstr = transpondergetinversionstr(tpnode, 2);
    884884        changechoiceboxvalue(inversion, tmpstr);
    885885        free(tmpstr); tmpstr = NULL;
     
    901901
    902902        //polarization
    903         tmpstr = transpondergetpolarizationstr(NULL, 1);
     903        tmpstr = transpondergetpolarizationstr(tpnode, 1);
    904904        changeinput(polarization, tmpstr);
    905905        free(tmpstr); tmpstr = NULL;
    906         tmpstr = transpondergetpolarizationstr(NULL, 2);
     906        tmpstr = transpondergetpolarizationstr(tpnode, 2);
    907907        changechoiceboxvalue(polarization, tmpstr);
    908908        free(tmpstr); tmpstr = NULL;
     
    915915
    916916        //fec
    917         tmpstr = transpondergetfecstr(NULL, 1);
     917        tmpstr = transpondergetfecstr(tpnode, 1);
    918918        changeinput(fec, tmpstr);
    919919        free(tmpstr); tmpstr = NULL;
    920         tmpstr = transpondergetfecstr(NULL, 2);
     920        tmpstr = transpondergetfecstr(tpnode, 2);
    921921        changechoiceboxvalue(fec, tmpstr);
    922922        free(tmpstr); tmpstr = NULL;
     
    929929
    930930        //modulation
    931         tmpstr = transpondergetmodulationstr(NULL, 1);
     931        tmpstr = transpondergetmodulationstr(tpnode, 1);
    932932        changeinput(modulation, tmpstr);
    933933        free(tmpstr); tmpstr = NULL;
    934         tmpstr = transpondergetmodulationstr(NULL, 2);
     934        tmpstr = transpondergetmodulationstr(tpnode, 2);
    935935        changechoiceboxvalue(modulation, tmpstr);
    936936        free(tmpstr); tmpstr = NULL;
     
    943943
    944944        //rolloff
    945         tmpstr = transpondergetrolloffstr(NULL, 1);
     945        tmpstr = transpondergetrolloffstr(tpnode, 1);
    946946        changeinput(rolloff, tmpstr);
    947947        free(tmpstr); tmpstr = NULL;
    948         tmpstr = transpondergetrolloffstr(NULL, 2);
     948        tmpstr = transpondergetrolloffstr(tpnode, 2);
    949949        changechoiceboxvalue(rolloff, tmpstr);
    950950        free(tmpstr); tmpstr = NULL;
     
    957957
    958958        //pilot
    959         tmpstr = transpondergetpilotstr(NULL, 1);
     959        tmpstr = transpondergetpilotstr(tpnode, 1);
    960960        changeinput(pilot, tmpstr);
    961961        free(tmpstr); tmpstr = NULL;
    962         tmpstr = transpondergetpilotstr(NULL, 2);
     962        tmpstr = transpondergetpilotstr(tpnode, 2);
    963963        changechoiceboxvalue(pilot, tmpstr);
    964964        free(tmpstr); tmpstr = NULL;
Note: See TracChangeset for help on using the changeset viewer.