forked from xin/TowerOptoSifAndSpectral
程序重命名及版本更新
- 程序名从 TowerOptoSifAndSpectral 更名为 AirOptoSifAndSpectral - 版本从 2.1.5 更新至 2.1.9 - GPIO 控制逻辑修改:引脚 1 和 12 输出改为 0 - 新增 dpkg preinst 脚本处理冲突文件
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
#else
|
||||
m_qstrDeviceConfigFilePath = "/home/data/Setting/DeviceSettings.ini";
|
||||
m_qstrJSONConfigFilePath = ("/home/data/Setting/config.json");
|
||||
qDebug()<< "Load Device Config File Path:" << m_qstrDeviceConfigFilePath;
|
||||
#endif // DEBUG
|
||||
|
||||
m_qsDeviceConfig = NULL;
|
||||
@ -24,6 +25,9 @@
|
||||
|
||||
int ZZ_SysConfigger::Initialize()
|
||||
{
|
||||
qDebug()<< "Load Device Config File Path:" ;
|
||||
qDebug()<< "Load Device Config File Path:" << m_qstrDeviceConfigFilePath;
|
||||
qDebug()<< "Load Device Config File Path:" << m_qstrDeviceConfigFilePath;
|
||||
//////////////////////////////////////////////////////////////////////////load device settings
|
||||
using namespace ZZ_MISCDEF;
|
||||
QMetaEnum enumDeviceModel = QMetaEnum::fromType<ConfiggerDeviceModel>();
|
||||
@ -32,6 +36,8 @@
|
||||
{
|
||||
delete m_qsDeviceConfig;
|
||||
}
|
||||
|
||||
|
||||
m_qsDeviceConfig = new QSettings(m_qstrDeviceConfigFilePath, QSettings::IniFormat);
|
||||
////FS
|
||||
m_struFSContext.ucDeviceNumber = m_qsDeviceConfig->value(QString("DEVICE INFO/TotalSpectrometer"),-1).toInt();
|
||||
@ -81,7 +87,19 @@
|
||||
m_struLSContext.usCmdID = m_qsDeviceConfig->value(QString("LINEAR SHUTTER/DCID")).toInt();
|
||||
m_struLSContext.ucProtocolType = m_qsDeviceConfig->value(QString("LINEAR SHUTTER/Type")).toInt();
|
||||
m_struLSContext.strInterface = m_qsDeviceConfig->value(QString("LINEAR SHUTTER/Port")).toString().toStdString();
|
||||
m_struLSContext.usGPIOChannelAPin="null";
|
||||
m_struLSContext.usGPIOChannelBPin="null";
|
||||
if (m_qsDeviceConfig->value(QString("LINEAR SHUTTER/GPIO_ChannelA")).toString().toStdString()!=""&& m_qsDeviceConfig->value(QString("LINEAR SHUTTER/GPIO_ChannelB")).toString().toStdString()!="") {
|
||||
|
||||
m_struLSContext.usGPIOChannelAPin = m_qsDeviceConfig->value(QString("LINEAR SHUTTER/GPIO_ChannelA")).toString().toStdString();
|
||||
m_struLSContext.usGPIOChannelBPin = m_qsDeviceConfig->value(QString("LINEAR SHUTTER/GPIO_ChannelB")).toString().toStdString();
|
||||
}else {
|
||||
m_qsDeviceConfig->setValue("LINEAR SHUTTER/GPIO_ChannelA",QString(QString::number(m_struLSContext.usCmdID).toStdString()[0]) );
|
||||
m_qsDeviceConfig->setValue("LINEAR SHUTTER/GPIO_ChannelB",QString(QString::number(m_struLSContext.usCmdID).toStdString()[1]) );
|
||||
//保存更改
|
||||
m_qsDeviceConfig->sync();
|
||||
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////humiture
|
||||
m_struHumitureDeviceInfo.qstrInterfaceName = m_qsDeviceConfig->value(QString("HUMITURE/Port")).toString();
|
||||
//////////////////////////////////////////////////////////////////////////load json settings
|
||||
|
||||
Reference in New Issue
Block a user