mirror of
http://172.16.0.230/r/SIF/TowerOptoSifAndSpectral.git
synced 2025-10-19 19:49:42 +08:00
config
This commit is contained in:
@ -1,31 +1,27 @@
|
|||||||
[DEVICE INFO]
|
[DEVICE INFO]
|
||||||
TotalSpectrometer=2
|
TotalSpectrometer=1
|
||||||
|
[FS2]
|
||||||
|
Model=ISIF
|
||||||
|
Port=/dev/ttyS1
|
||||||
|
UID=QEP02975
|
||||||
[FS1]
|
[FS1]
|
||||||
Model=OSIFAlpha
|
Model=OSIFAlpha
|
||||||
Port=-1
|
Port=-1
|
||||||
UID=FLMS15815
|
|
||||||
AEMax=0.85
|
|
||||||
AEMin=0.75
|
|
||||||
Depth=65535
|
|
||||||
[FS2]
|
|
||||||
Model=OSIFBeta
|
|
||||||
Port=-1
|
|
||||||
UID=QEP02975
|
UID=QEP02975
|
||||||
AEMax=0.85
|
AEMax=0.85
|
||||||
AEMin=0.75
|
AEMin=0.80
|
||||||
Depth=230000
|
Depth=200000
|
||||||
[FS3]
|
[FS3]
|
||||||
Model=Null
|
Model=Null
|
||||||
[LINEAR SHUTTER]
|
[LINEAR SHUTTER]
|
||||||
Port=COM8
|
Port=/dev/ttyUSB1
|
||||||
Type=1
|
Type=1
|
||||||
DCID=1
|
DCID=1
|
||||||
TotalPosition=6
|
TotalPosition=5
|
||||||
Position0=2000
|
Position0=10000
|
||||||
Position1=110000
|
Position1=91947
|
||||||
Position2=220000
|
Position2=219299
|
||||||
Position3=330000
|
Position3=347535
|
||||||
Position4=440000
|
Position4=474904
|
||||||
Position5=550000
|
|
||||||
[HUMITURE]
|
[HUMITURE]
|
||||||
Port=COM11
|
Port=/dev/ttyUSB3
|
@ -6,11 +6,14 @@
|
|||||||
<link rel="stylesheet" type="text/css" href="/css/config.css">
|
<link rel="stylesheet" type="text/css" href="/css/config.css">
|
||||||
</head>
|
</head>
|
||||||
<body class="body" >
|
<body class="body" >
|
||||||
|
<div>
|
||||||
|
<h1 class="title1">Sif And Spectral</h1>
|
||||||
|
</div>
|
||||||
<div style="margin-left:auto;margin-right:auto;width:80%;" >
|
<div style="margin-left:auto;margin-right:auto;width:80%;" >
|
||||||
<table style="width: 100%">
|
<table style="width: 100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td>程序运行状态</td>
|
<td width="100px">程序运行状态</td>
|
||||||
<td id="statid"></td>
|
<td width="50px" id="statid"></td>
|
||||||
<td ></td>
|
<td ></td>
|
||||||
<td><input type="button" value="重启" onclick="rebootclicked()"></td>
|
<td><input type="button" value="重启" onclick="rebootclicked()"></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -19,9 +22,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<form action="/php/config.php" method="POST" >
|
<form action="/php/config.php" method="POST" >
|
||||||
<div style="margin-left:auto;margin-right:auto;width:80%;" >
|
<div style="margin-left:auto;margin-right:auto;width:80%;" >
|
||||||
<div>
|
|
||||||
<h1 class="title1">Sif And Spectral</h1>
|
|
||||||
</div>
|
|
||||||
<div class="mainframe" >
|
<div class="mainframe" >
|
||||||
<table class="linetb">
|
<table class="linetb">
|
||||||
<tr>
|
<tr>
|
||||||
|
98
html/index.html
Normal file
98
html/index.html
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Title</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/css/config.css">
|
||||||
|
</head>
|
||||||
|
<body class="body" >
|
||||||
|
<div>
|
||||||
|
<h1 class="title1">Sif And Spectral</h1>
|
||||||
|
</div>
|
||||||
|
<div style="margin-left:auto;margin-right:auto;width:80%;" >
|
||||||
|
<table style="width: 100%">
|
||||||
|
<tr>
|
||||||
|
<td width="100px">程序运行状态</td>
|
||||||
|
<td width="50px" id="statid"></td>
|
||||||
|
<td ></td>
|
||||||
|
<td><input type="button" value="重启" onclick="rebootclicked()"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<form action="/php/config.php" method="POST" >
|
||||||
|
<div style="margin-left:auto;margin-right:auto;width:80%;" >
|
||||||
|
|
||||||
|
<div class="mainframe" >
|
||||||
|
<table class="linetb">
|
||||||
|
<tr>
|
||||||
|
<td><h2>控制设置</h2></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div align="center">
|
||||||
|
<table class="linetb" >
|
||||||
|
|
||||||
|
<tr style="width:80%">
|
||||||
|
|
||||||
|
<td style="width:33%">开始时间
|
||||||
|
<input type="time" id="BeginTime" name="BeginTime" class="TextInput"></td>
|
||||||
|
<td style="width:33%">时间间隔
|
||||||
|
<input type="number" id="IntervalTime" name="IntervalTime" class="TextInput"></td>
|
||||||
|
<td style="width:33%">停止时间
|
||||||
|
<input type="time" id="EndTime" class="TextInput" name="EndTime"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<p></p>
|
||||||
|
<p></p>
|
||||||
|
<div>
|
||||||
|
<h2>描述信息</h2>
|
||||||
|
</div>
|
||||||
|
<div align="center">
|
||||||
|
<table style="width:100%">
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td>设备序列号 <input class="TextInput" id="Dev_SN" name="Dev_SN" value="1000000"></td>
|
||||||
|
<td>地点 <input class="TextInput" name="Location" id="Location"></td>
|
||||||
|
<td>北半球 <input type="checkbox" name="GPS_North" id="GPS_North"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>GPS经度 <input type="text" class="TextInput" name="GPS_Longtitude" id="GPS_Longtitude"></td>
|
||||||
|
<td>GPS经度 <input type="text" class="TextInput" name="GPS_Latitude" id="GPS_Latitude"> </td>
|
||||||
|
<td>GPS高程 <input type="text" class="TextInput" name="GPS_Atitude" id="GPS_Atitude"> </td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<p></p>
|
||||||
|
<table style="width:100%">
|
||||||
|
<tr>
|
||||||
|
<td>安装时间 <input type="date" name="InstallTime" id="InstallTime"></td>
|
||||||
|
<td>ISIF定标时间 <input type="date" name="ISIFCalibrationTime" id="ISIFCalibrationTime"> </td>
|
||||||
|
<td>IS1定标时间 <input type="date" name="IS1CalibrationTime" id="IS1CalibrationTime"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>设备维护人员 <input type="text" class="TextInput" name="NameOfMaintenance" id="NameOfMaintenance"></td>
|
||||||
|
<td>维护人员电话 <input type="number" name="PhoneOfMaintenance" id="PhoneOfMaintenance" style="width: 100px" ></td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>远程资源用户ID <input type="text" name="DownloadUserID" class="TextInput" id="DownloadUserID"></td>
|
||||||
|
<td>定标文件下载路径<input type="text" name="DownlaodAddress" id="DownlaodAddress"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div id="devinfo">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h2></h2>
|
||||||
|
<input type="submit" value="提交" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<script type="text/javascript" src="/javascript/comment.js"></script>
|
||||||
|
<script type="text/javascript" src="/javascript/config.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -23,7 +23,10 @@ function getDevinfoRetrun(retrun)
|
|||||||
div.innerHTML=retrun;
|
div.innerHTML=retrun;
|
||||||
init()
|
init()
|
||||||
}
|
}
|
||||||
|
function getstataRetrun(retrun){
|
||||||
|
var div=document.getElementById('statid');
|
||||||
|
div.innerHTML=retrun;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var datad;
|
var datad;
|
||||||
@ -36,10 +39,23 @@ function init()
|
|||||||
function getinit()
|
function getinit()
|
||||||
{
|
{
|
||||||
httpget("/php/GetIniFile.php",datad,getDevinfoRetrun)
|
httpget("/php/GetIniFile.php",datad,getDevinfoRetrun)
|
||||||
|
httpget("/php/GetSata.php",datad,getstataRetrun)
|
||||||
}
|
}
|
||||||
|
|
||||||
function rebootclicked()
|
function rebootclicked()
|
||||||
{
|
{
|
||||||
alert("reboot")
|
|
||||||
|
httpget("/php/reboot.php",datad,getrebootRentrun)
|
||||||
|
var div=document.getElementById('statid');
|
||||||
|
div.innerHTML="";
|
||||||
|
|
||||||
|
}
|
||||||
|
function getrebootRentrun(ret)
|
||||||
|
{
|
||||||
|
alert(ret)
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
location.reload()
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
window.onload=getinit;
|
window.onload=getinit;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
header("Content-type:application/json");
|
header("Content-type:application/json");
|
||||||
$a=file_get_contents("config.json");
|
$a=file_get_contents("/home/data/Setting/config.json");
|
||||||
echo $a;
|
echo $a;
|
||||||
|
@ -3,6 +3,7 @@ $a=parse_ini_file("/home/data/Setting/DeviceSettings.ini",true);
|
|||||||
|
|
||||||
$numberofsensor=intval($a['DEVICE INFO']['TotalSpectrometer']);
|
$numberofsensor=intval($a['DEVICE INFO']['TotalSpectrometer']);
|
||||||
$b=array_values($a);
|
$b=array_values($a);
|
||||||
|
|
||||||
echo '<h2>设备信息</h2>';
|
echo '<h2>设备信息</h2>';
|
||||||
echo '设备数量 '.$numberofsensor.'';
|
echo '设备数量 '.$numberofsensor.'';
|
||||||
echo '<table>';
|
echo '<table>';
|
||||||
|
@ -4,7 +4,7 @@ exec("ps -ef | grep TowerOptoSifAndSpectral | grep -v grep",$output,$return);
|
|||||||
//var_dump( $output);
|
//var_dump( $output);
|
||||||
if ( count($output)>0)
|
if ( count($output)>0)
|
||||||
{
|
{
|
||||||
echo '<div style="width: 20px;height: 20px;background: green"></div>';
|
echo '<div style="width: 40px;height: 20px;background: green"></div>';
|
||||||
}else{
|
}else{
|
||||||
echo '<div style="width: 20px;height: 20px;background: red"></div>';
|
echo '<div style="width: 40px;height: 20px;background: red"></div>';
|
||||||
}
|
}
|
@ -1 +1 @@
|
|||||||
{"BeginTime":"17:49","IntervalTime":"24","EndTime":"18:50","Dev_SN":"1000000","Location":"dasdf","GPS_North":"on","GPS_Longtitude":"123","GPS_Latitude":"123","GPS_Atitude":"50","InstallTime":"2021-12-16","ISIFCalibrationTime":"2021-12-16","IS1CalibrationTime":"2021-12-23","NameOfMaintenance":"123","PhoneOfMaintenance":"123123123","DownloadUserID":"123123","DownlaodAddress":"http:\/\/www.iris-rs.cn","OSIFAlpha_CaliFileMainName":"osifalpha","OSIFBeta_CaliFileMainName":"osifbeta"}
|
{"BeginTime":"","IntervalTime":"","EndTime":"","Dev_SN":"1000000","Location":"","GPS_Longtitude":"","GPS_Latitude":"","GPS_Atitude":"","InstallTime":"","ISIFCalibrationTime":"","IS1CalibrationTime":"","NameOfMaintenance":"","PhoneOfMaintenance":"","DownloadUserID":"","DownlaodAddress":""}
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
var_dump($_POST);
|
||||||
file_put_contents("config.json",json_encode($_POST));
|
exec("sudo touch /home/data/Setting/config.json");
|
||||||
|
exec("sudo chmod 777 /home/data/Setting/config.json");
|
||||||
|
file_put_contents("/home/data/Setting/config.json",json_encode($_POST));
|
||||||
echo "提交成功";
|
echo "提交成功";
|
7
html/php/reboot.php
Normal file
7
html/php/reboot.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
ignore_user_abort(true);
|
||||||
|
set_time_limit(0);
|
||||||
|
echo system("sudo killall TowerOptoSifAndSpectral");
|
||||||
|
echo system("sudo ./reboot.sh &");
|
||||||
|
echo "系统已重启";
|
||||||
|
//var_dump($output);
|
3
html/php/reboot.sh
Normal file
3
html/php/reboot.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
cd /home/pi/SIF0/out/build_d/Linux-GCC-Debug/
|
||||||
|
./TowerOptoSifAndSpectral>>log.txt &
|
||||||
|
|
Reference in New Issue
Block a user