int startwindowbf::fresh()
{
    if((opiucd_getwltsdata(&com,&PACKAGE_tp[0])==NEWDATAGETCODE_BF)) //check new data
    {
        if(((PACKAGE_tp[0].payload[1+TSLEN+WLFRMHDRLEN+1])&(0X03))<3) //check quality 0=clean, 1=0fix, 2=<20fix, 3=>20fix
        {
            freshpdnindex=PDN_LOCATION[PACKAGE_tp[0].payload[7]];
            if(PACKAGE_tp[0].payload[7]==sdw[freshpdnindex]->PDN_NUMBER)
            {
                if(sdw[freshpdnindex]->getStruct(&PACKAGE_tp[0])==1)//if we get the struct then we draw
                {
                    if(ui->checkWriteFileBox->isChecked()) //if true then write file
                        opipkt_put_file(&PACKAGE_tp[0], file);   // write to file
                    //draw routine end
                }//if get structure end
            }
        }//if new data end
        else
        {
            qDebug()<<"bad quality";
            return 0;
        }
        return 1;
    }//if quality end
    else
    {
        return 0;
    }

}
Beispiel #2
0
int startwindow::fresh()
{
    if((opiucd_getwltsdata(&com,&PACKAGE_tp[0])==NEWDATAGETCODE)) //check new data
    {
        freshpdnindex=PDN_LOCATION[PACKAGE_tp[0].payload[7]];
        if(((PACKAGE_tp[0].payload[1+TSLEN+WLFRMHDRLEN+1])&(0X03))<2) //check quality
        {
            if(PACKAGE_tp[0].payload[7]==sdw[freshpdnindex]->PDN_NUMBER)
            {
                if(sdw[freshpdnindex]->getStruct(&PACKAGE_tp[0])==1)//if we get the struct then we draw
                {
                    if(ui->checkWriteFileBox->isChecked()) //if true then write file
                        opipkt_put_file(&PACKAGE_tp[0], file);   // write to file
                }//if get structure end
            }
        }//if new data end
        else
        {
            return 0;
        }
        return 1;
    }//if quality end
    else
    {
        return 0;
    }
}