程序重命名及版本更新

- 程序名从 TowerOptoSifAndSpectral 更名为 AirOptoSifAndSpectral
- 版本从 2.1.5 更新至 2.1.9
- GPIO 控制逻辑修改:引脚 1 和 12 输出改为 0
- 新增 dpkg preinst 脚本处理冲突文件
This commit is contained in:
xin
2026-04-07 10:28:53 +08:00
parent e8db9aa9fe
commit 84787f1006
13 changed files with 559 additions and 597 deletions

File diff suppressed because it is too large Load Diff

View File

@ -146,6 +146,13 @@ int CMainDataGrabber::InitLS()
DSSOne.iChannelA = 1;
DSSOne.iChannelB = 1;
}
if (m_struLinearShutterContext.usGPIOChannelAPin!="null"&& m_struLinearShutterContext.usGPIOChannelBPin!="null") {
DSSOne.strChannelA = m_struLinearShutterContext.usGPIOChannelAPin;
DSSOne.strChannelB = m_struLinearShutterContext.usGPIOChannelBPin;
}
qDebug()<< "Debugging GPIO Init Finished. Channel A Pin:"<< QString::fromStdString(DSSOne.strChannelA) << " Channel B Pin:"<< QString::fromStdString(DSSOne.strChannelB);
m_vecDSS.push_back(DSSOne);
@ -587,7 +594,7 @@ int CMainDataGrabber::GrabOnceFinished()
qDebug() << qstrCMD_A;
qDebug() << qstrCMD_B;
Delay_MSec(200);
Delay_MSec(200);
}
}
else

View File

@ -85,8 +85,9 @@ int Scheduler::OnTimeCounter()
m_iFlagIsOnRestart = 1;
}
emit SignalZeroHoldCurrent();
system("gpio write 1 0");//<2F><EFBFBD>ϵ<EFBFBD>
qDebug() << "gpio write 1 0......"<<endl;
system("gpio write 1 1");//<2F><EFBFBD>ϵ<EFBFBD>
system("gpio write 12 1");//<2F><EFBFBD>ϵ<EFBFBD>
qDebug() << "gpio write 1 1......"<<endl;
qDebug() << "Non working time. Idling......";
return 0;
}

View File

@ -216,6 +216,8 @@ namespace ZZ_MISCDEF
std::string strInterface;
ZZ_U8 ucProtocolType;
ZZ_U16 usCmdID;
std::string usGPIOChannelAPin;
std::string usGPIOChannelBPin;
}LSContext;
typedef struct tagAcquisitionTimeSettings

View File

@ -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