Changeset 30752 for titan/titan/global.h


Ignore:
Timestamp:
10/30/14 10:50:52 (9 years ago)
Author:
nit
Message:

fix e2 transponder convert

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/global.h

    r30748 r30752  
    61706170int converte2settings(int flag)
    61716171{
    6172         char* path = NULL, *tmpstr3 = NULL, *buf = NULL, *tmpstr = NULL, *tmpstr1 = NULL, *tmpstr2 = NULL, *line = NULL, *name = NULL, *orbitalpos = NULL, *fetype = NULL, *flags = NULL, *outfile = NULL, *start = NULL, *end = NULL, *filename = NULL, *transponderfile = NULL, *satfile = NULL;
     6172        char* path = NULL, *buf = NULL, *tmpstr = NULL, *tmpstr1 = NULL, *tmpstr2 = NULL, *line = NULL, *name = NULL, *orbitalpos = NULL, *fetype = NULL, *flags = NULL, *outfile = NULL, *start = NULL, *end = NULL, *filename = NULL, *transponderfile = NULL, *satfile = NULL;
    61736173        int incount = 0;
    61746174       
     
    62566256       
    62576257//      writesys("/tmp/convert.log", buf, 1);
    6258         tmpstr3 = ostrcat("-1", NULL, 0, 0);
    62596258
    62606259        while(ostrstr(buf, start) != NULL)
     
    63106309                                        line = ostrcat(line, getxmlentry(ret1[i].part, "frequency="), 1, 0); // frequency
    63116310                                else
    6312                                         line = ostrcat(line, tmpstr3, 1, 0);
     6311                                        line = ostrcat(line, "-1", 1, 0);
    63136312                                line = ostrcat(line, "#", 1, 0);
    63146313
     
    63166315                                        line = ostrcat(line, getxmlentry(ret1[i].part, "polarization="), 1, 0); // polarization
    63176316                                else
    6318                                         line = ostrcat(line, tmpstr3, 1, 0); // polarization
     6317                                        line = ostrcat(line, "-1", 1, 0); // polarization
    63196318
    63206319                                line = ostrcat(line, "#", 1, 0);
     
    63226321                                        line = ostrcat(line, orbitalpos, 1, 0); // orbitalpos
    63236322                                else
    6324                                         line = ostrcat(line, tmpstr3, 1, 0); // orbitalpos
     6323                                        line = ostrcat(line, "-1", 1, 0); // orbitalpos
    63256324                                line = ostrcat(line, "#", 1, 0);
    63266325
     
    63286327                                        line = ostrcat(line, getxmlentry(ret1[i].part, "symbol_rate="), 1, 0); // symbolrate
    63296328                                else
    6330                                         line = ostrcat(line, tmpstr3, 1, 0);
     6329                                        line = ostrcat(line, "-1", 1, 0);
    63316330                                line = ostrcat(line, "#", 1, 0);
    63326331
     
    63346333                                        line = ostrcat(line, getxmlentry(ret1[i].part, "modulation="), 1, 0); // modulation
    63356334                                else
    6336                                         line = ostrcat(line, tmpstr3, 1, 0);
     6335                                {
     6336                                        if(flag == 2)
     6337                                                line = ostrcat(line, "3", 1, 0);
     6338                                        else
     6339                                                line = ostrcat(line, "0", 1, 0);
     6340                                }
    63376341                                line = ostrcat(line, "#", 1, 0);
    63386342
     
    63406344                                        line = ostrcat(line, getxmlentry(ret1[i].part, "fec_inner="), 1, 0); // fec
    63416345                                else
    6342                                         line = ostrcat(line, tmpstr3, 1, 0);
     6346                                {
     6347                                        if(flag == 2)
     6348                                                line = ostrcat(line, "5", 1, 0);
     6349                                        else
     6350                                                line = ostrcat(line, "0", 1, 0);
     6351                                }
    63436352                                line = ostrcat(line, "#", 1, 0);
    63446353
     
    63526361                                        line = ostrcat(line, "0", 1, 0); // rolloff
    63536362                                else
    6354                                         line = ostrcat(line, tmpstr3, 1, 0); // rolloff
     6363                                        line = ostrcat(line, "3", 1, 0); // rolloff
    63556364                                line = ostrcat(line, "#", 1, 0);
    63566365
    6357                                 if(checkbox("UFS910") == 1)
    6358                                         line = ostrcat(line, "2", 1, 0); // inversion
    6359                                 else
    6360                                         line = ostrcat(line, tmpstr3, 1, 0); // inversion
     6366                                line = ostrcat(line, "2", 1, 0); // inversion
    63616367                                line = ostrcat(line, "#", 1, 0);
    63626368
     
    63646370                                        line = ostrcat(line, getxmlentry(ret1[i].part, "system="), 1, 0); // system
    63656371                                else
    6366                                         line = ostrcat(line, tmpstr3, 1, 0); // system
     6372                                        line = ostrcat(line, "0", 1, 0); // system
    63676373                                line = ostrcat(line, "\n", 1, 0);
    63686374                        }
     
    63966402        free(transponderfile), transponderfile = NULL;
    63976403               
    6398         free(tmpstr3), tmpstr3 = NULL;
    63996404        free(buf), buf = NULL;
    64006405        free(start), start = NULL;
Note: See TracChangeset for help on using the changeset viewer.