Files
newspark110/device/ui/rstozerosetwidget.cpp
Chenwenxuan edac2715f0 init
2024-03-06 14:54:30 +08:00

51 lines
1.6 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "rstozerosetwidget.h"
#include "deviceproxy.h"
#include "rs_settings.h"
#include "deviceinfo.h"
RSToZeroSetWidget::RSToZeroSetWidget(QWidget* parent)
:QFrame(parent)
,ui(new Ui::RSToZeroSetWidget)
{
ui->setupUi(this);
loadSet();
}
void RSToZeroSetWidget::loadSet()
{
// 加载PTP位置设置
RS_SETTINGS->beginGroup("device/RSTZVel");
double Vel1 = RS_SETTINGS->readNumDEntry("/Vel1");
double Vel2 = RS_SETTINGS->readNumDEntry("/Vel2");
double Vel3 = RS_SETTINGS->readNumDEntry("/Vel3");
RS_SETTINGS->endGroup();
ui->dsbZAAxisToZero1Vel->setValue(Vel1);
ui->dsbZAAxisToZero2Vel->setValue(Vel2);
ui->dsbZAAxisToZero3Vel->setValue(Vel3);
}
void RSToZeroSetWidget::on_dsbZAAxisToZero1Vel_valueChanged(double value)
{
RS_SETTINGS->beginGroup("device/RSTZVel");
RS_SETTINGS->writeEntry("/Vel1", value);
RS_SETTINGS->endGroup();
//DEVICE_INFO->printDeviceSystemInfo(QString("Z轴回零速度1改变为%1mm/s").arg(value));
}
void RSToZeroSetWidget::on_dsbZAAxisToZero2Vel_valueChanged(double value)
{
RS_SETTINGS->beginGroup("device/RSTZVel");
RS_SETTINGS->writeEntry("/Vel2", value);
RS_SETTINGS->endGroup();
//DEVICE_INFO->printDeviceSystemInfo(QString("Z轴回零速度2改变为%1mm/s").arg(value));
}
void RSToZeroSetWidget::on_dsbZAAxisToZero3Vel_valueChanged(double value)
{
RS_SETTINGS->beginGroup("device/RSTZVel");
RS_SETTINGS->writeEntry("/Vel3", value);
RS_SETTINGS->endGroup();
//DEVICE_INFO->printDeviceSystemInfo(QString("Z轴回零速度3改变为%1mm/s").arg(value));
}