Skip to content

Commit

Permalink
adjust refresh rate for flowmeter feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
KLDistance committed Feb 23, 2021
1 parent e2b8e0f commit 95489ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,8 +693,7 @@ void MainWindow::on_btn_flowmeter_clicked()
this->target_device->PickFlowmeterPort(
this->target_device->get_port_name_list()[ui->cbox_flowmeterports->currentIndex()]
);
qDebug() << "button clicked";
this->serialport_leds[2]->setChecked(true);
this->target_device->flowmeter->start();
this->target_device->flowmeter->proc_resume();
qDebug() << this->target_device->flowmeter->serial_buffer_list.size();
}
6 changes: 3 additions & 3 deletions targetdevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,15 +255,15 @@ void TargetDevice::run_signal_from_flowmeter()
// #1
QString flow_rate_query = QString("!0") + QString::number(1) + QString(",F\r\n");
this->flowmeter->WriteIntoTarget(flow_rate_query);
QThread::msleep(400);
QThread::msleep(220);
// #2
flow_rate_query = QString("!0") + QString::number(2) + QString(",F\r\n");
this->flowmeter->WriteIntoTarget(flow_rate_query);
QThread::msleep(400);
QThread::msleep(220);
// #3
flow_rate_query = QString("!0") + QString::number(3) + QString(",F\r\n");
this->flowmeter->WriteIntoTarget(flow_rate_query);
QThread::msleep(400);
QThread::msleep(220);
// obtain flow rate in ml/min for 3 meters
double propf = 0, butaf = 0, argof = 0;
// 01 for propane, 02 for butane, 03 for argon
Expand Down

0 comments on commit 95489ca

Please sign in to comment.