提交v2.2.2

This commit is contained in:
xin
2025-11-27 18:50:16 +08:00
parent 612bf24b15
commit 9e003b2ee7
14 changed files with 76 additions and 14 deletions

View File

@ -2,3 +2,7 @@
#### v2.1.2 修改了温控模块 修改了calibrate时名称修改为.dat #### v2.1.2 修改了温控模块 修改了calibrate时名称修改为.dat
#### v2.1.3 将预热放置到timer开启前 #### v2.1.3 将预热放置到timer开启前
#### v2.1.4 更改来templog精简日志及推杆配置文件 写rtc1
#### v2.1.5 采集完成后滴答滴答
#### v2.1.7 开机滴答滴答
#### v2.2.1 修改来shutter mode

View File

@ -7,7 +7,7 @@
# exit 1 # exit 1
#fi #fi
VERSION=2.1.3 VERSION=2.2.2
sh install.sh sh install.sh
thispwd=$(pwd) thispwd=$(pwd)
@ -36,6 +36,7 @@ echo "Version:${VERSION}" >> ./control
echo "echo \"V${VERSION}\" > /home/data/version" >> ./postinst echo "echo \"V${VERSION}\" > /home/data/version" >> ./postinst
chmod +x ./post* chmod +x ./post*
chmod +x ./control chmod +x ./control
chmod +x ./preinst
cd ../ cd ../
#复制root文件 #复制root文件
mkdir -p ./root mkdir -p ./root

View File

@ -1,4 +1,5 @@
Package: TowerSif Package: TowerSif
Architecture: armhf Architecture: armhf
Maintainer: rlx, tc Maintainer: rlx, tc
Depends: systemd, tzdata
Description: test Description: test

View File

@ -3,10 +3,10 @@
echo "install airbornesystem ok" echo "install airbornesystem ok"
sed -i '/\/root\/start/d' /etc/rc.local sed -i '/\/root\/start/d' /etc/rc.local
sed -i '/^exit 0/i/root/start.sh &' /etc/rc.local sed -i '/^exit 0/i/root/start.sh &' /etc/rc.local
sudo apt-get install -y timedatectl #sudo apt-get install -y timedatectl
timedatectl set-timezone Asia/Shanghai timedatectl set-timezone Asia/Shanghai
date -R date -R
sudo hwclock -w -f /dev/rtc0 sudo hwclock -w -f /dev/rtc1
#echo "/home/pi/AirbroneSystem/lib" > /etc/ld.so.conf.d/mylib.conf #echo "/home/pi/AirbroneSystem/lib" > /etc/ld.so.conf.d/mylib.conf
#echo "/home/pi/AirbroneSystem/libreh" > /etc/ld.so.conf.d/mylib1.conf #echo "/home/pi/AirbroneSystem/libreh" > /etc/ld.so.conf.d/mylib1.conf
## 获取系统内存信息,并提取总内存大小 ## 获取系统内存信息,并提取总内存大小

7
dpkg/preinst Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
set -e
# 删除可能引起冲突的文件
if [ -f /home/data/ChangeLog.md ]; then
echo "Removing conflicting ChangeLog.md file..."
rm -f /home/data/ChangeLog.md
fi

View File

@ -13,7 +13,8 @@ set_time_limit(0);
ob_end_clean();//清空(擦除)缓冲区并关闭输出缓冲 ob_end_clean();//清空(擦除)缓冲区并关闭输出缓冲
ob_implicit_flush(1);//将打开或关闭绝对(隐式)刷送。绝对(隐式)刷送将导致在每次输出调用后有一次刷送操作,以便不再需要对 flush() 的显式调用 ob_implicit_flush(1);//将打开或关闭绝对(隐式)刷送。绝对(隐式)刷送将导致在每次输出调用后有一次刷送操作,以便不再需要对 flush() 的显式调用
system("sudo gpio mode 1 out"); system("sudo gpio mode 1 out");
system("sudo gpio write 1 1"); system("sudo gpio write 1 0");
system("sudo gpio write 12 0");
system("sudo killall Mywathdog.sh"); system("sudo killall Mywathdog.sh");
system("sudo killall TowerOptoSifAndSpectral"); system("sudo killall TowerOptoSifAndSpectral");
system("sudo pkill shutter_calibrate"); system("sudo pkill shutter_calibrate");

View File

@ -36,7 +36,9 @@ $numberofFS=0;
system("sudo killall Mywathdog.sh"); system("sudo killall Mywathdog.sh");
system("sudo killall TowerOptoSifAndSpectral"); system("sudo killall TowerOptoSifAndSpectral");
system("sudo pkill ocean_optics_calibration_console"); system("sudo pkill ocean_optics_calibration_console");
system("sudo gpio write 1 1"); system("sudo gpio write 1 0");
system("sudo gpio write 12 0");
$cmd=""; $cmd="";

View File

@ -2,5 +2,6 @@ mkdir -p build
cd build cd build
cmake ../ cmake ../
make -j4 make -j4
cp TowerOptoSifAndSpectral /home/pi/bin
cd ../othersoft cd ../othersoft
sh install.sh sh install.sh

View File

@ -58,12 +58,25 @@ int main(int argc, char *argv[])
//////add support to dual channel //////add support to dual channel
int iRet0 = 0,iRet1 = 0,iRet2 = 0,iRet3 = 0; int iRet0 = 0,iRet1 = 0,iRet2 = 0,iRet3 = 0;
iRet0 = system("gpio mode 1 out"); iRet0 = system("gpio mode 1 out");
qDebug()<< "set gpio 1 out"<< endl;
iRet1 = system("gpio mode 4 out"); iRet1 = system("gpio mode 4 out");
qDebug()<< "set gpio 4 out"<< endl;
iRet2 = system("gpio mode 5 out"); iRet2 = system("gpio mode 5 out");
iRet3 = system("gpio write 1 1");//上电 qDebug()<< "set gpio 5 out"<< endl;
iRet1 = system("gpio mode 20 out");
qDebug()<< "set gpio 20 out"<< endl;
iRet2 = system("gpio mode 21 out");
qDebug()<< "set gpio 21 out"<< endl;
iRet1 = system("gpio mode 22 out");
qDebug()<< "set gpio 22 out"<< endl;
iRet2 = system("gpio mode 23 out");
qDebug()<< "set gpio 23 out"<< endl;
iRet3 = system("gpio write 1 0");//上电
iRet3 = system("gpio write 12 0");//上电
system("gpio mode 13 out");
qDebug() << "gpio 1;4;5; ready"<<" Ret:"<< iRet0<< iRet1<< iRet2<< endl; qDebug() << "gpio 1;4;5; ready"<<" Ret:"<< iRet0<< iRet1<< iRet2<< endl;
qDebug() << "gpio write 1 1......" <<" Ret:"<< iRet3<< endl; qDebug() << "gpio write 1 0......" <<" Ret:"<< iRet3<< endl;
// QString qstrCMD_A, qstrCMD_B, qstrCMD_Temp; // QString qstrCMD_A, qstrCMD_B, qstrCMD_Temp;
// qstrCMD_Temp = QString::fromStdString("4"); // qstrCMD_Temp = QString::fromStdString("4");

View File

@ -19,8 +19,8 @@
"Pin": 19 "Pin": 19
}, },
"WINDOWS": { "WINDOWS": {
"Pin_H": 10, "Pin_H": 7,
"Pin_L": 7, "Pin_L": 10,
"WaitTime": 80 "WaitTime": 80
} }
}, },

View File

@ -81,7 +81,7 @@ void TemperaTureWoker::OpenCom(QString portname, int baudrate) {
ReadTempreature(); ReadTempreature();
} }
int timesforrecode=0;
void TemperaTureWoker::ReadTempreature() { void TemperaTureWoker::ReadTempreature() {
if (m_isInit) { if (m_isInit) {
m_SerialPort->write("{\"command\":\"get_temp\"}"); m_SerialPort->write("{\"command\":\"get_temp\"}");
@ -108,7 +108,11 @@ void TemperaTureWoker::ReadTempreature() {
return; return;
} }
std::cout << data.toStdString()<< std::endl; std::cout << data.toStdString()<< std::endl;
logout("TemperaSersor",data.toHex(),5); if (timesforrecode%30==0) {
logout("TemperaSersor",data.toHex(),5);
}
timesforrecode++;
qDebug() << data; qDebug() << data;
try { try {
json::parse(data.toStdString()); json::parse(data.toStdString());

View File

@ -1,12 +1,34 @@
/sbin/hwclock -s -f /dev/rtc1
chmod +x /root/filebrew/filebrowser chmod +x /root/filebrew/filebrowser
/root/filebrew/filebrowser -d /root/filebrew/filebrowser.db & /root/filebrew/filebrowser -d /root/filebrew/filebrowser.db &
chmod +x /root/frp_0.34.3_linux_arm/frpc chmod +x /root/frp_0.34.3_linux_arm/frpc
chmod +x /root/ffwatch.sh chmod +x /root/ffwatch.sh
/root/ffwatch.sh & /root/ffwatch.sh &
mount /dev/mmcblk1p1 /home/data/ mount /dev/mmcblk1p1 /home/data/ -o nonempty
chmod +x /root/Mywathdog.sh chmod +x /root/Mywathdog.sh
chmod +x /root/Mywathdogtemp.sh chmod +x /root/Mywathdogtemp.sh
bash /root/Mywathdog.sh & bash /root/Mywathdog.sh &
bash /root/Mywathdogtemp.sh & bash /root/Mywathdogtemp.sh &
/home/pi/bin/TemperatureControler > /root/templog.log & /home/pi/bin/TemperatureControler > /root/templog.log &
gpio mode 13 out
gpio write 13 1
sleep 1
gpio write 13 0
sleep 1
gpio write 13 1
sleep 1
gpio write 13 0
sleep 1
gpio write 13 1
sleep 1
gpio write 13 0
sleep 1
gpio write 13 1
sleep 1
gpio write 13 0
sleep 1
gpio write 13 1
sleep 1
gpio write 13 0
sleep 1

View File

@ -586,6 +586,7 @@ int CMainDataGrabber::GrabOnceFinished()
qDebug() << qstrCMD_A; qDebug() << qstrCMD_A;
qDebug() << qstrCMD_B; qDebug() << qstrCMD_B;
Delay_MSec(500);
} }
} }
else else
@ -659,6 +660,10 @@ int CMainDataGrabber::GrabOnceFinished()
} }
} }
system("gpio write 13 1");
Delay_MSec(200);
system("gpio write 13 0");
m_iFlagIsCapturing = 0; m_iFlagIsCapturing = 0;
// qDebug() << "-------------------------------------------busy" << QTime::currentTime().toString(); // qDebug() << "-------------------------------------------busy" << QTime::currentTime().toString();

View File

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