QT的接收数据项目,前面的数据可以接收到并显示,后面的不行

需要一个联网项目,需要接收各种数据,我的代码现在温度和湿度的数据是可以接收到并显示出来的,但是后面的经度纬度等数据都不能够接收到并且显示出来,是哪里写的不对么?(用的QT)
    void MainWindow::readData() {
     //设置缓冲区用于接收数据
    QByteArray buf;
    buf = serial->readAll();
    int total = buf.size();
    qDebug() << "Read Buffer Size:" << total;
    if(!buf.isEmpty()){
    char *data = buf.data();
    int type = data[0];
    short *pLen = (short *)&data[1];
    short len = *pLen;

    char tmp[128];
    memset(tmp, 0, sizeof(tmp));
    memcpy(tmp, &data[3], len);
    qDebug() << QDateTime::currentDateTime().toString() << ":" << "Type=" << type << ";Length=" << len << ";Content=" << tmp;
    QString content(tmp);
    switch(type){
    case 1: // 接收温度
     {
        double temp = content.toDouble();
        ui->lcdNumber->display(temp);
        ui->textBrowser->append(QDateTime::currentDateTime().toString() + ":" + QString::number(temp) + "\n");
        break;
     }
    case 2: // 接收湿度
     {
        double humi = content.toDouble();
        ui->lcdNumber_2->display(humi);
        ui->textBrowser_2->append(QDateTime::currentDateTime().toString() + ":" + QString::number(humi) + "\n");
        break;
     }
    case 3: // 接收经度
     {
        double longi = content.toDouble();
        ui->lcdNumber_3->display(longi);
        ui->textBrowser_3->append(QDateTime::currentDateTime().toString() + ":" + QString::number(longi) + "\n");
        break;
     }

}

这是出问题显示不出来的图

img

这是我想要达到的结果

img

把你readall的打印出来看,是不是一起接收过来了