├── assets └── image-20230421155741786.png ├── SerialPort ├── main.cpp ├── mainwindow.h ├── CMakeLists.txt ├── mainwindow.cpp └── mainwindow.ui ├── README.md ├── LICENSE └── .gitignore /assets/image-20230421155741786.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zcmaye/Qt6.2.4_SerialPort/HEAD/assets/image-20230421155741786.png -------------------------------------------------------------------------------- /SerialPort/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | 3 | #include 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | QApplication a(argc, argv); 8 | MainWindow w; 9 | w.show(); 10 | return a.exec(); 11 | } 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Qt6.2.4_SerialPort 2 | Qt6.2.4 编写的串口通信助手~ 3 | 4 | ![image-20230421155741786](assets/image-20230421155741786.png) 5 | 6 | 有如下功能: 7 | 8 | + 发送文字 9 | + 发送文件(txt文件) 10 | + 定时发送 11 | + 自动添加换行 12 | + 十六进制显示 13 | + 保存数据(未实现) 14 | 15 | -------------------------------------------------------------------------------- /SerialPort/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | QT_BEGIN_NAMESPACE 9 | namespace Ui { class MainWindow; } 10 | QT_END_NAMESPACE 11 | 12 | 13 | class MainWindow : public QWidget 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | MainWindow(QWidget *parent = nullptr); 19 | ~MainWindow(); 20 | void init(); 21 | private slots: 22 | void on_openPortBtn_released(); 23 | 24 | void on_sendBtn_released(); 25 | 26 | void onReadyRead(); 27 | 28 | void on_openFileBtn_released(); 29 | 30 | void on_sendFileBtn_released(); 31 | 32 | void on_hexDisplayChx_toggled(bool checked); 33 | 34 | void on_timerSendChx_toggled(bool checked); 35 | 36 | void on_sendStopBtn_released(); 37 | 38 | 39 | private: 40 | void displayHex(); 41 | void displayText(); 42 | 43 | Ui::MainWindow *ui; 44 | QSerialPort serialPort_; 45 | QTimer timer_; 46 | }; 47 | #endif // MAINWINDOW_H 48 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Maye 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /SerialPort/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5) 2 | 3 | project(SerialPort VERSION 0.1 LANGUAGES CXX) 4 | 5 | set(CMAKE_AUTOUIC ON) 6 | set(CMAKE_AUTOMOC ON) 7 | set(CMAKE_AUTORCC ON) 8 | 9 | set(CMAKE_CXX_STANDARD 17) 10 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 11 | 12 | find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets SerialPort) 13 | find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets SerialPort) 14 | 15 | set(PROJECT_SOURCES 16 | main.cpp 17 | mainwindow.cpp 18 | mainwindow.h 19 | mainwindow.ui 20 | ) 21 | 22 | if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) 23 | qt_add_executable(SerialPort 24 | MANUAL_FINALIZATION 25 | ${PROJECT_SOURCES} 26 | ) 27 | # Define target properties for Android with Qt 6 as: 28 | # set_property(TARGET SerialPort APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR 29 | # ${CMAKE_CURRENT_SOURCE_DIR}/android) 30 | # For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation 31 | else() 32 | if(ANDROID) 33 | add_library(SerialPort SHARED 34 | ${PROJECT_SOURCES} 35 | ) 36 | # Define properties for Android with Qt 5 after find_package() calls as: 37 | # set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android") 38 | else() 39 | add_executable(SerialPort 40 | ${PROJECT_SOURCES} 41 | ) 42 | endif() 43 | endif() 44 | 45 | target_link_libraries(SerialPort PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt6::SerialPort) 46 | 47 | set_target_properties(SerialPort PROPERTIES 48 | MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com 49 | MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} 50 | MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} 51 | MACOSX_BUNDLE TRUE 52 | WIN32_EXECUTABLE TRUE 53 | ) 54 | 55 | install(TARGETS SerialPort 56 | BUNDLE DESTINATION . 57 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) 58 | 59 | if(QT_VERSION_MAJOR EQUAL 6) 60 | qt_finalize_executable(SerialPort) 61 | endif() 62 | -------------------------------------------------------------------------------- /SerialPort/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include "./ui_mainwindow.h" 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | MainWindow::MainWindow(QWidget *parent) 11 | : QWidget(parent) 12 | , ui(new Ui::MainWindow) 13 | { 14 | ui->setupUi(this); 15 | init(); 16 | 17 | ui->linkLable->setText("顿开教育-顽石老师-版权所有"); 18 | ui->linkLable->setOpenExternalLinks(true); 19 | } 20 | 21 | MainWindow::~MainWindow() 22 | { 23 | delete ui; 24 | } 25 | 26 | void MainWindow::init() 27 | { 28 | setWindowTitle("Qt串口助手"); 29 | //设置改变 30 | connect(ui->baudRateCmb,&QComboBox::currentIndexChanged,this,[=] 31 | { 32 | auto br = ui->baudRateCmb->currentData().value(); 33 | if(!serialPort_.setBaudRate(br)) 34 | { 35 | QMessageBox::warning(this,"false","设置波特率失败:"+serialPort_.errorString()); 36 | } 37 | }); 38 | connect(ui->dataBitsCmb,&QComboBox::currentIndexChanged,this,[=] 39 | { 40 | auto value = ui->dataBitsCmb->currentData().value(); 41 | if(!serialPort_.setDataBits(value)) 42 | { 43 | QMessageBox::warning(this,"false","设置数据位失败:"+serialPort_.errorString()); 44 | } 45 | }); 46 | connect(ui->stopBitsCmb,&QComboBox::currentIndexChanged,this,[=] 47 | { 48 | auto value = ui->stopBitsCmb->currentData().value(); 49 | if(!serialPort_.setStopBits(value)) 50 | { 51 | QMessageBox::warning(this,"false","设置停止位失败:"+serialPort_.errorString()); 52 | } 53 | }); 54 | connect(ui->parityCmb,&QComboBox::currentIndexChanged,this,[=] 55 | { 56 | auto value = ui->parityCmb->currentData().value(); 57 | if(!serialPort_.setParity(value)) 58 | { 59 | QMessageBox::warning(this,"false","设置校验位失败:"+serialPort_.errorString()); 60 | } 61 | qInfo()<<"sdflksjdfklsfkd"; 62 | }); 63 | 64 | 65 | //获取所有的可用的串口 66 | auto portsInfo = QSerialPortInfo::availablePorts(); 67 | for(auto& info : portsInfo) 68 | { 69 | qInfo()<protsCmb->addItem(info.portName() +":" + info.description(),info.portName()); 71 | } 72 | 73 | //获取标准的波特率 74 | auto baudRates = QSerialPortInfo::standardBaudRates(); 75 | for(auto br : baudRates) 76 | { 77 | ui->baudRateCmb->addItem(QString::number(br),br); 78 | } 79 | ui->baudRateCmb->setCurrentText("9600"); 80 | 81 | //设置停止位 82 | ui->stopBitsCmb->addItem("1",QSerialPort::OneStop); 83 | ui->stopBitsCmb->addItem("1.5",QSerialPort::OneAndHalfStop); 84 | ui->stopBitsCmb->addItem("2",QSerialPort::TwoStop); 85 | 86 | //设置数据位 87 | ui->dataBitsCmb->addItem("5",QSerialPort::Data5); 88 | ui->dataBitsCmb->addItem("6",QSerialPort::Data6); 89 | ui->dataBitsCmb->addItem("7",QSerialPort::Data7); 90 | ui->dataBitsCmb->addItem("8",QSerialPort::Data8); 91 | ui->dataBitsCmb->setCurrentText("8"); 92 | 93 | //设置校验位 94 | ui->parityCmb->addItem("NoParity",QSerialPort::NoParity); 95 | ui->parityCmb->addItem("EvenParity",QSerialPort::EvenParity); 96 | ui->parityCmb->addItem("OddParity",QSerialPort::OddParity); 97 | ui->parityCmb->addItem("SpaceParity",QSerialPort::SpaceParity); 98 | ui->parityCmb->addItem("MarkParity",QSerialPort::MarkParity); 99 | 100 | connect(&serialPort_,&QSerialPort::readyRead,this,&MainWindow::onReadyRead); 101 | 102 | timer_.callOnTimeout([=] 103 | { 104 | this->on_sendBtn_released(); 105 | }); 106 | 107 | connect(ui->clearRecvBtn,&QPushButton::clicked,ui->recvEdit,&QPlainTextEdit::clear); 108 | connect(ui->sendClearBtn,&QPushButton::clicked,ui->sendEdit,&QPlainTextEdit::clear); 109 | } 110 | 111 | void MainWindow::on_openPortBtn_released() 112 | { 113 | //串口是否已经打开 114 | if(serialPort_.isOpen()) 115 | { 116 | serialPort_.close(); 117 | ui->openPortBtn->setText("打开串口"); 118 | if(timer_.isActive()) 119 | timer_.stop(); 120 | return; 121 | } 122 | 123 | 124 | //获取串口名 125 | auto portName = ui->protsCmb->currentData().toString(); 126 | /* //获取波特率 127 | auto baudRate = ui->baudRateCmb->currentData().value(); 128 | //获取数据位 129 | auto dataBits = ui->dataBitsCmb->currentData().value(); 130 | //获取停止位 131 | auto stopBits = ui->stopBitsCmb->currentData().value(); 132 | //获取校验位 133 | auto parity = ui->parityCmb->currentData().value(); 134 | 135 | 136 | serialPort_.setBaudRate(baudRate); 137 | serialPort_.setDataBits(dataBits); 138 | serialPort_.setStopBits(stopBits); 139 | serialPort_.setParity(parity); 140 | */ 141 | serialPort_.setPortName(portName); 142 | //打开串口 143 | if(!serialPort_.open(QIODevice::ReadWrite)) 144 | { 145 | QMessageBox::warning(this,"warning",portName + " open failed:"+serialPort_.errorString()); 146 | return; 147 | } 148 | else 149 | { 150 | ui->openPortBtn->setText("关闭串口"); 151 | } 152 | } 153 | 154 | void MainWindow::on_sendBtn_released() 155 | { 156 | auto dataStr = ui->sendEdit->toPlainText() + (ui->sendNewLineChx->isChecked() ? "\r\n":""); 157 | serialPort_.write(dataStr.toLocal8Bit()); 158 | } 159 | 160 | void MainWindow::onReadyRead() 161 | { 162 | auto data = serialPort_.readAll(); 163 | ui->recvEdit->setPlainText(QString::fromLocal8Bit(data)); 164 | } 165 | 166 | void MainWindow::on_openFileBtn_released() 167 | { 168 | auto filename =QFileDialog::getOpenFileName(this,"选择文件",QStandardPaths::writableLocation(QStandardPaths::DesktopLocation), 169 | "txt(*.txt);;all(*.*)"); 170 | if(!filename.isEmpty()) 171 | { 172 | ui->fileNameEdit->setText(filename); 173 | } 174 | } 175 | 176 | void MainWindow::on_sendFileBtn_released() 177 | { 178 | auto filename = ui->fileNameEdit->text(); 179 | QFile file(filename); 180 | if(!file.open(QIODevice::ReadOnly)) 181 | { 182 | QMessageBox::warning(this,"warning",filename + " open failed:"+file.errorString()); 183 | return; 184 | } 185 | //最好判断一下文件的编码 186 | serialPort_.write(QString::fromUtf8(file.readAll()).toLocal8Bit()); 187 | } 188 | 189 | void MainWindow::on_hexDisplayChx_toggled(bool checked) 190 | { 191 | if(checked) 192 | displayHex(); 193 | else 194 | displayText(); 195 | } 196 | 197 | void MainWindow::displayHex() 198 | { 199 | //先把数据拿出来 200 | auto dataStr = ui->recvEdit->toPlainText(); 201 | //转成十六进制 202 | auto hexData = dataStr.toLocal8Bit().toHex(' ').toUpper(); 203 | //写回去 204 | ui->recvEdit->setPlainText(hexData); 205 | } 206 | 207 | void MainWindow::displayText() 208 | { 209 | //先把数据拿出来 210 | auto dataStr = ui->recvEdit->toPlainText(); 211 | //转成文本 212 | auto textData = QString::fromLocal8Bit(dataStr.toLocal8Bit()); 213 | //写回去 214 | ui->recvEdit->setPlainText(textData); 215 | 216 | } 217 | 218 | void MainWindow::on_timerSendChx_toggled(bool checked) 219 | { 220 | if(checked) 221 | { 222 | timer_.start(ui->timerPeriodEdit->text().toUInt()); 223 | ui->timerPeriodEdit->setEnabled(false); 224 | } 225 | else 226 | { 227 | timer_.stop(); 228 | ui->timerPeriodEdit->setEnabled(true); 229 | } 230 | } 231 | 232 | void MainWindow::on_sendStopBtn_released() 233 | { 234 | serialPort_.clear(); 235 | if(timer_.isActive()) 236 | timer_.stop(); 237 | } 238 | 239 | 240 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | [Ll]ogs/ 33 | 34 | # Visual Studio 2015/2017 cache/options directory 35 | .vs/ 36 | # Uncomment if you have tasks that create the project's static files in wwwroot 37 | #wwwroot/ 38 | 39 | # Visual Studio 2017 auto generated files 40 | Generated\ Files/ 41 | 42 | # MSTest test Results 43 | [Tt]est[Rr]esult*/ 44 | [Bb]uild[Ll]og.* 45 | 46 | # NUnit 47 | *.VisualState.xml 48 | TestResult.xml 49 | nunit-*.xml 50 | 51 | # Build Results of an ATL Project 52 | [Dd]ebugPS/ 53 | [Rr]eleasePS/ 54 | dlldata.c 55 | 56 | # Benchmark Results 57 | BenchmarkDotNet.Artifacts/ 58 | 59 | # .NET Core 60 | project.lock.json 61 | project.fragment.lock.json 62 | artifacts/ 63 | 64 | # StyleCop 65 | StyleCopReport.xml 66 | 67 | # Files built by Visual Studio 68 | *_i.c 69 | *_p.c 70 | *_h.h 71 | *.ilk 72 | *.meta 73 | *.obj 74 | *.iobj 75 | *.pch 76 | *.pdb 77 | *.ipdb 78 | *.pgc 79 | *.pgd 80 | *.rsp 81 | *.sbr 82 | *.tlb 83 | *.tli 84 | *.tlh 85 | *.tmp 86 | *.tmp_proj 87 | *_wpftmp.csproj 88 | *.log 89 | *.vspscc 90 | *.vssscc 91 | .builds 92 | *.pidb 93 | *.svclog 94 | *.scc 95 | 96 | # Chutzpah Test files 97 | _Chutzpah* 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opendb 104 | *.opensdf 105 | *.sdf 106 | *.cachefile 107 | *.VC.db 108 | *.VC.VC.opendb 109 | 110 | # Visual Studio profiler 111 | *.psess 112 | *.vsp 113 | *.vspx 114 | *.sap 115 | 116 | # Visual Studio Trace Files 117 | *.e2e 118 | 119 | # TFS 2012 Local Workspace 120 | $tf/ 121 | 122 | # Guidance Automation Toolkit 123 | *.gpState 124 | 125 | # ReSharper is a .NET coding add-in 126 | _ReSharper*/ 127 | *.[Rr]e[Ss]harper 128 | *.DotSettings.user 129 | 130 | # TeamCity is a build add-in 131 | _TeamCity* 132 | 133 | # DotCover is a Code Coverage Tool 134 | *.dotCover 135 | 136 | # AxoCover is a Code Coverage Tool 137 | .axoCover/* 138 | !.axoCover/settings.json 139 | 140 | # Visual Studio code coverage results 141 | *.coverage 142 | *.coveragexml 143 | 144 | # NCrunch 145 | _NCrunch_* 146 | .*crunch*.local.xml 147 | nCrunchTemp_* 148 | 149 | # MightyMoose 150 | *.mm.* 151 | AutoTest.Net/ 152 | 153 | # Web workbench (sass) 154 | .sass-cache/ 155 | 156 | # Installshield output folder 157 | [Ee]xpress/ 158 | 159 | # DocProject is a documentation generator add-in 160 | DocProject/buildhelp/ 161 | DocProject/Help/*.HxT 162 | DocProject/Help/*.HxC 163 | DocProject/Help/*.hhc 164 | DocProject/Help/*.hhk 165 | DocProject/Help/*.hhp 166 | DocProject/Help/Html2 167 | DocProject/Help/html 168 | 169 | # Click-Once directory 170 | publish/ 171 | 172 | # Publish Web Output 173 | *.[Pp]ublish.xml 174 | *.azurePubxml 175 | # Note: Comment the next line if you want to checkin your web deploy settings, 176 | # but database connection strings (with potential passwords) will be unencrypted 177 | *.pubxml 178 | *.publishproj 179 | 180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 181 | # checkin your Azure Web App publish settings, but sensitive information contained 182 | # in these scripts will be unencrypted 183 | PublishScripts/ 184 | 185 | # NuGet Packages 186 | *.nupkg 187 | # NuGet Symbol Packages 188 | *.snupkg 189 | # The packages folder can be ignored because of Package Restore 190 | **/[Pp]ackages/* 191 | # except build/, which is used as an MSBuild target. 192 | !**/[Pp]ackages/build/ 193 | # Uncomment if necessary however generally it will be regenerated when needed 194 | #!**/[Pp]ackages/repositories.config 195 | # NuGet v3's project.json files produces more ignorable files 196 | *.nuget.props 197 | *.nuget.targets 198 | 199 | # Microsoft Azure Build Output 200 | csx/ 201 | *.build.csdef 202 | 203 | # Microsoft Azure Emulator 204 | ecf/ 205 | rcf/ 206 | 207 | # Windows Store app package directories and files 208 | AppPackages/ 209 | BundleArtifacts/ 210 | Package.StoreAssociation.xml 211 | _pkginfo.txt 212 | *.appx 213 | *.appxbundle 214 | *.appxupload 215 | 216 | # Visual Studio cache files 217 | # files ending in .cache can be ignored 218 | *.[Cc]ache 219 | # but keep track of directories ending in .cache 220 | !?*.[Cc]ache/ 221 | 222 | # Others 223 | ClientBin/ 224 | ~$* 225 | *~ 226 | *.dbmdl 227 | *.dbproj.schemaview 228 | *.jfm 229 | *.pfx 230 | *.publishsettings 231 | orleans.codegen.cs 232 | 233 | # Including strong name files can present a security risk 234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 235 | #*.snk 236 | 237 | # Since there are multiple workflows, uncomment next line to ignore bower_components 238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 239 | #bower_components/ 240 | 241 | # RIA/Silverlight projects 242 | Generated_Code/ 243 | 244 | # Backup & report files from converting an old project file 245 | # to a newer Visual Studio version. Backup files are not needed, 246 | # because we have git ;-) 247 | _UpgradeReport_Files/ 248 | Backup*/ 249 | UpgradeLog*.XML 250 | UpgradeLog*.htm 251 | ServiceFabricBackup/ 252 | *.rptproj.bak 253 | 254 | # SQL Server files 255 | *.mdf 256 | *.ldf 257 | *.ndf 258 | 259 | # Business Intelligence projects 260 | *.rdl.data 261 | *.bim.layout 262 | *.bim_*.settings 263 | *.rptproj.rsuser 264 | *- [Bb]ackup.rdl 265 | *- [Bb]ackup ([0-9]).rdl 266 | *- [Bb]ackup ([0-9][0-9]).rdl 267 | 268 | # Microsoft Fakes 269 | FakesAssemblies/ 270 | 271 | # GhostDoc plugin setting file 272 | *.GhostDoc.xml 273 | 274 | # Node.js Tools for Visual Studio 275 | .ntvs_analysis.dat 276 | node_modules/ 277 | 278 | # Visual Studio 6 build log 279 | *.plg 280 | 281 | # Visual Studio 6 workspace options file 282 | *.opt 283 | 284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 285 | *.vbw 286 | 287 | # Visual Studio LightSwitch build output 288 | **/*.HTMLClient/GeneratedArtifacts 289 | **/*.DesktopClient/GeneratedArtifacts 290 | **/*.DesktopClient/ModelManifest.xml 291 | **/*.Server/GeneratedArtifacts 292 | **/*.Server/ModelManifest.xml 293 | _Pvt_Extensions 294 | 295 | # Paket dependency manager 296 | .paket/paket.exe 297 | paket-files/ 298 | 299 | # FAKE - F# Make 300 | .fake/ 301 | 302 | # CodeRush personal settings 303 | .cr/personal 304 | 305 | # Python Tools for Visual Studio (PTVS) 306 | __pycache__/ 307 | *.pyc 308 | 309 | # Cake - Uncomment if you are using it 310 | # tools/** 311 | # !tools/packages.config 312 | 313 | # Tabs Studio 314 | *.tss 315 | 316 | # Telerik's JustMock configuration file 317 | *.jmconfig 318 | 319 | # BizTalk build output 320 | *.btp.cs 321 | *.btm.cs 322 | *.odx.cs 323 | *.xsd.cs 324 | 325 | # OpenCover UI analysis results 326 | OpenCover/ 327 | 328 | # Azure Stream Analytics local run output 329 | ASALocalRun/ 330 | 331 | # MSBuild Binary and Structured Log 332 | *.binlog 333 | 334 | # NVidia Nsight GPU debugger configuration file 335 | *.nvuser 336 | 337 | # MFractors (Xamarin productivity tool) working folder 338 | .mfractor/ 339 | 340 | # Local History for Visual Studio 341 | .localhistory/ 342 | 343 | # BeatPulse healthcheck temp database 344 | healthchecksdb 345 | 346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 347 | MigrationBackup/ 348 | 349 | # Ionide (cross platform F# VS Code tools) working folder 350 | .ionide/ 351 | -------------------------------------------------------------------------------- /SerialPort/mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 645 10 | 487 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | 18 | 19 | 20 | true 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 165 29 | 16777215 30 | 31 | 32 | 33 | 34 | 0 35 | 36 | 37 | 10 38 | 39 | 40 | 41 | 42 | 数据位 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 停止位 56 | 57 | 58 | 59 | 60 | 61 | 62 | 16进制显示 63 | 64 | 65 | 66 | 67 | 68 | 69 | 串口选择 70 | 71 | 72 | 73 | 74 | 75 | 76 | 打开串口 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 波特率 87 | 88 | 89 | 90 | 91 | 92 | 93 | 校验位 94 | 95 | 96 | 97 | 98 | 99 | 100 | 串口操作 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | Qt::Vertical 114 | 115 | 116 | 117 | 20 118 | 40 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 清除接受 127 | 128 | 129 | 130 | 131 | 132 | 133 | 保存数据 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 0 145 | 146 | 147 | 0 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 发送 156 | 157 | 158 | 159 | 160 | 161 | 162 | 清除发送 163 | 164 | 165 | 166 | 167 | 168 | 169 | 定时发送 170 | 171 | 172 | 173 | 174 | 175 | 176 | 周期: 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 45 185 | 16777215 186 | 187 | 188 | 189 | 1000 190 | 191 | 192 | 193 | 194 | 195 | 196 | ms 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 打开文件 207 | 208 | 209 | 210 | 211 | 212 | 213 | 发送文件 214 | 215 | 216 | 217 | 218 | 219 | 220 | 停止发送 221 | 222 | 223 | 224 | 225 | 226 | 227 | 发送新行 228 | 229 | 230 | 231 | 232 | 233 | 234 | TextLabel 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | --------------------------------------------------------------------------------