修改显示

This commit is contained in:
2022-01-19 13:47:02 +08:00
parent 600f415b56
commit b470876cfe
4 changed files with 154 additions and 29 deletions

View File

@ -4,32 +4,27 @@
1. **文件名称定义**
英文地名_起始时间_结束时间 精确到秒 时间 年_月_日_时_分_秒
英文地名_起始时间_结束时间 精确到秒 时间 年_月_日_时_分_秒
2. **路径定义**
```
总路径 /home/data
/Setting
/Data
/2021_10_15
/Beijing_2021_10_15_15_31_00_2021_10_15_15_31_50.csv
/2021_10_16
/Log
其他
/Setting
/Data
/2021_10_15
/Beijing_2021_10_15_15_31_00_2021_10_15_15_31_50.csv
/2021_10_16
/Log
其他
```
3. **数据内容确定**
```
按照《SIF加地物光谱仪本地数据存储格式说明.pdf》存储
```
4. **shutter切换顺序**
```
@ -73,8 +68,3 @@
```
添加温湿度传感器
```

View File

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

133
othersoft/findtty.sh Normal file
View File

@ -0,0 +1,133 @@
stty -F /dev/ttyUSB0 raw speed 9600
sleep 1s
stty -F /dev/ttyUSB0 raw speed 9600
echo -e "0 dev\n" > /dev/ttyUSB0
cat /dev/ttyUSB0 > 1.txt &
sleep 1s
pkill cat
if test -s 1.txt;then
echo '/dev/ttyUSB0 may be linermotor'> /home/data/Setting/tryfindtty.txt
fi
stty -F /dev/ttyUSB1 raw speed 9600
sleep 1s
stty -F /dev/ttyUSB1 raw speed 9600
echo -e "0 dev\n" > /dev/ttyUSB1
cat /dev/ttyUSB1 > 1.txt &
sleep 1s
pkill cat
if test -s 1.txt;then
echo '/dev/ttyUSB1 may be linermotor'> /home/data/Setting/tryfindtty.txt
fi
stty -F /dev/ttyUSB2 raw speed 9600
sleep 1s
stty -F /dev/ttyUSB2 raw speed 9600
echo -e "0 dev\n" > /dev/ttyUSB2
cat /dev/ttyUSB2 > 1.txt &
sleep 1s
pkill cat
if test -s 1.txt;then
echo '/dev/ttyUSB2 may be linermotor'> /home/data/Setting/tryfindtty.txt
fi
stty -F /dev/ttyUSB3 raw speed 9600
sleep 1s
stty -F /dev/ttyUSB3 raw speed 9600
echo -e "0 dev\n" > /dev/ttyUSB3
cat /dev/ttyUSB3 > 1.txt &
sleep 1s
pkill cat
if test -s 1.txt;then
echo '/dev/ttyUSB3 may be linermotor'> /home/data/Setting/tryfindtty.txt
fi
stty -F /dev/ttyS1 raw speed 115200
sleep 1s
stty -F /dev/ttyS1 raw speed 115200
cat -e /dev/ttyS1 > 1.txt &
sleep 1s
echo aa5500040307 | xxd -r -ps > /dev/ttyS1
sleep 1s
pkill cat
sleep 1s
if test -s 1.txt;then
echo '/dev/ttyS1 is ISIF or IS2'>> /home/data/Setting/tryfindtty.txt
fi
stty -F /dev/ttyS2 raw speed 115200
sleep 1s
stty -F /dev/ttyS2 raw speed 115200
cat -e /dev/ttyS2 > 1.txt &
sleep 1s
echo aa5500040307 | xxd -r -ps > /dev/ttyS2
sleep 1s
pkill cat
sleep 1s
if test -s 1.txt;then
echo '/dev/ttyS2 is ISIF or IS2'>> /home/data/Setting/tryfindtty.txt
fi
stty -F /dev/ttyUSB0 raw speed 115200
sleep 1s
stty -F /dev/ttyUSB0 raw speed 115200
cat -e /dev/ttyUSB0 > 1.txt &
sleep 1s
echo aa5500040307 | xxd -r -ps > /dev/ttyUSB0
sleep 1s
pkill cat
sleep 1s
if test -s 1.txt;then
echo '/dev/ttyUSB0 is IS1'>> /home/data/Setting/tryfindtty.txt
fi
stty -F /dev/ttyUSB1 raw speed 115200
sleep 1s
stty -F /dev/ttyUSB1 raw speed 115200
cat -e /dev/ttyUSB1 > 1.txt &
sleep 1s
echo aa5500040307 | xxd -r -ps > /dev/ttyS1
sleep 1s
pkill cat
sleep 1s
if test -s 1.txt;then
echo '/dev/ttyUSB1 is IS1'>> /home/data/Setting/tryfindtty.txt
fi
stty -F /dev/ttyUSB2 raw speed 115200
sleep 1s
stty -F /dev/ttyUSB2 raw speed 115200
cat -e /dev/ttyUSB2 > 1.txt &
sleep 1s
echo aa5500040307 | xxd -r -ps > /dev/ttyUSB2
sleep 1s
pkill cat
sleep 1s
if test -s 1.txt;then
echo '/dev/ttyUSB2 is IS1'>> /home/data/Setting/tryfindtty.txt
fi
stty -F /dev/ttyUSB3 raw speed 115200
sleep 1s
stty -F /dev/ttyUSB3 raw speed 115200
cat -e /dev/ttyUSB3 > 1.txt &
sleep 1s
echo aa5500040307 | xxd -r -ps > /dev/ttyUSB3
sleep 1s
pkill cat
sleep 1s
if test -s 1.txt;then
echo '/dev/ttyUSB3 is IS1'>> /home/data/Setting/tryfindtty.txt
fi

View File

@ -181,7 +181,7 @@ int main(int argc, char* argv[])
vector<int> location1point = DengJianJu(loction1[i], 5000, 25);
vector<float> valuepoint;
int lennow = location1point.size();
cout1<<"Detail find "<<i<<"point begin"<<"<br>"<<flush;
cout1<<"Detail find "<<i<<" point begin"<<"<br>"<<flush;
for (size_t ii = 0; ii < lennow; ii++)
{
@ -195,7 +195,7 @@ int main(int argc, char* argv[])
vector<int>loction2 = FindFeng(location1point, valuepinghua);
if (loction2.size() == 1)
{ cout1<<"find "<<i<<"point value is"<<loction2[0]<<"<br>"<<flush;
{ cout1<<"find "<<i<<"point value is <b color=\'green\'>"<<loction2[0]<<"<\/b><br>"<<flush;
outfile1 <<i+1<<"," << loction2[0]<< std::endl;
}