资源简介

Qt QCustomPlot 实时画图,通过串口Mav通信,本Demo暂时使用QTimer生成模拟数据,串口与Mav已经写好接口。

资源截图

代码片段和文件信息

#include “csvfile.h“

#include 
#include 

CsvFile::CsvFile()
{
    opened =false;
}

void CsvFile::start(QString fileName)
{
    file.setFileName(fileName);
    qDebug()<
    opened = file.open(QIODevice::ReadWrite);
    if(!opened)
    {
        QMessageBox::warning(NULL“Tip“QStringLiteral(“创建文件失败“));
        qDebug()<        return;
    }

    QString title = QString(“%1 %2 %3 %4 %5 %6 %7 %8 %9 %10\n“)
            .arg(QStringLiteral(“时间“))
            .arg(QStringLiteral(“油门“))
            .arg(QStringLiteral(“偏转角 “))
            .arg(QStringLiteral(“推力“))
            .arg(QStringLiteral(“扭矩“))
            .arg(QStringLiteral(“反扭矩“))
            .arg(QStringLiteral(“转速“))
       

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-04-02 12:59  Engine-Demo\
     文件         616  2020-04-01 15:01  Engine-Demo\EngineTest.pro
     文件       23835  2020-04-02 12:59  Engine-Demo\EngineTest.pro.user
     文件        1848  2020-03-20 09:17  Engine-Demo\csvfile.cpp
     文件         300  2020-03-18 16:15  Engine-Demo\csvfile.h
     文件         398  2020-03-20 09:14  Engine-Demo\engineinfo.h
     文件         172  2017-03-13 17:31  Engine-Demo\main.cpp
     文件        9185  2020-04-02 11:07  Engine-Demo\mainwindow.cpp
     文件        1560  2020-04-02 10:33  Engine-Demo\mainwindow.h
     文件        1586  2020-04-01 13:37  Engine-Demo\mainwindow.ui
     目录           0  2020-04-01 11:33  Engine-Demo\mavlink\
     文件        2348  2020-03-04 14:39  Engine-Demo\mavlink\checksum.h
     目录           0  2020-04-01 11:33  Engine-Demo\mavlink\common\
     文件       97525  2020-03-10 06:33  Engine-Demo\mavlink\common\common.h
     文件         610  2020-03-10 06:33  Engine-Demo\mavlink\common\mavlink.h
     文件       14492  2020-03-10 06:33  Engine-Demo\mavlink\common\mavlink_msg_attitude.h
     文件       17397  2020-03-10 06:33  Engine-Demo\mavlink\common\mavlink_msg_attitude_quaternion.h
     文件        8960  2020-03-10 06:33  Engine-Demo\mavlink\common\mavlink_msg_auth_key.h
     文件       25262  2020-03-10 06:33  Engine-Demo\mavlink\common\mavlink_msg_battery_status.h
     文件       10323  2020-03-10 06:33  Engine-Demo\mavlink\common\mavlink_msg_calibration_progress.h
     文件       16157  2020-03-10 06:33  Engine-Demo\mavlink\common\mavlink_msg_command_ack.h
     文件       21079  2020-03-10 06:33  Engine-Demo\mavlink\common\mavlink_msg_command_long.h
     文件       10916  2020-03-10 06:33  Engine-Demo\mavlink\common\mavlink_msg_extended_sys_state.h
     文件       15557  2020-03-10 06:33  Engine-Demo\mavlink\common\mavlink_msg_file_transfer_protocol.h
     文件       15246  2020-03-10 06:33  Engine-Demo\mavlink\common\mavlink_msg_firmware_version.h
     文件       21807  2020-03-10 06:33  Engine-Demo\mavlink\common\mavlink_msg_follow_target.h
     文件       19799  2020-03-10 06:33  Engine-Demo\mavlink\common\mavlink_msg_global_position_int.h
     文件       27121  2020-03-10 06:33  Engine-Demo\mavlink\common\mavlink_msg_gps_raw_int.h
     文件       17410  2020-03-10 06:33  Engine-Demo\mavlink\common\mavlink_msg_gps_status.h
     文件       12225  2020-03-10 06:33  Engine-Demo\mavlink\common\mavlink_msg_heartbeat.h
     文件       24281  2020-03-10 06:33  Engine-Demo\mavlink\common\mavlink_msg_hil_state.h
............此处省略40个文件信息

评论

共有 条评论