-
Notifications
You must be signed in to change notification settings - Fork 1
/
fpvlog.php
235 lines (223 loc) · 9.63 KB
/
fpvlog.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<?php
require('layout/headerSite.php');
?>
<div id="fpvlogDiv">
<div class="tableContainer" >
<div id="table">
</div>
</div>
<div class="box" id="dataBox">
<div class="left" id="mapBox"></div>
<div class="right" id="activityDesc">
<div class="title">Activity log Details</div>
<div style='margin-top: 10px;'>
<div class="column" style="margin-left:2.5%; margin-right:1.25%;">
<div id="title_act" class="content"></div>
<div id="model_name" class="content"></div>
<div id="location" class="content"></div>
<div id="date_act" class="content"></div>
<div id="time_act" class="content"></div>
</div>
<div class="column" style="margin-left:1.25%; margin-right:2.5%;">
<div id="alt" class="content"></div>
<div id="max_alt" class="content"></div>
<div id="max_spd" class="content"></div>
<div id="min_rssi" class="content"></div>
</div>
</div>
</div>
</div>
</div>
<div id="activityDiv" style="margin-top: 35px;"></div>
</div>
<?php
//include header template
require('layout/footer.php');
?>
<script type="text/javascript">
var activityID;
var editable = 0;
var mapBoxHTML1 = '<div class="left" id="mapBox"></div> \
<div id="loader"></div></div> \
<div class="right" id="activityDesc"> \
<div class="title">Activity log Details</div> \
<div style="margin-top: 10px;"> \
<div class="column" style="margin-left:2.5%; margin-right:1.25%;"> \
<div id="title_act" class="content"></div> \
<div id="model_name" class="content"></div> \
<div id="location" class="content"></div> \
<div id="date_act" class="content"></div> \
<div id="time_act" class="content"></div> \
</div> \
<div class="column" style="margin-left:1.25%; margin-right:2.5%;"> \
<div id="alt" class="content"></div> \
<div id="max_alt" class="content"></div> \
<div id="max_spd" class="content"></div> \
<div id="min_rssi" class="content"></div> \
</div> \
</div> \
</div> ';
var mapBoxHTML2 = '<div class="box" id="dataBox2" style="height:510px;"> \
<div style="width:20%;"></div> \
<div class="left" id="mapBox" style="width:calc(98% - 220px);"></div> \
<div class="right2" id="instruments"> \
<td><div class="img-container" style="margin: 20px;"> \
<img class="top" id="compass" src="images/instruments/compass_needle.png" class="banner" style="width:100px; height:100px; margin:15px"> \
<img class="bottom" src="images/instruments/compass_bk2.png" class="banner" style="width:130px; height:130px; "> \
</div></td> \
<td><div class="img-container" style="margin: 20px;"> \
<img class="top" id="roll" src="images/instruments/roll_needle.png" class="banner" style="width:100px; height:100px; margin:15px"> \
<img class="bottom" src="images/instruments/IMU_bk.png" class="banner" style="width:130px; height:130px; "> \
</div></td> \
<td><div class="img-container" style="margin: 20px;"> \
<img class="top" id="pitch" src="images/instruments/pitch_needle.png" class="banner" style="width:100px; height:100px; margin:15px"> \
<img class="bottom" src="images/instruments/IMU_bk.png" class="banner" style="width:130px; height:130px; "> \
</div></td> \
</div> \
</div> \
<div class="box" style="height:1200px;"> \
<div style="width:97%; height:1140px; background:grey; margin:1%; margin-top:5px;"> \
<div ><div id="graphDiv" ></div></div> \
<div class="activityPanels" style="width:98%; height:400px; overflow:auto;"> \
<img id="editActivity" src="images/icons/gear.png" style="float:right; margin-right:30px; margin-top:20px; width:50px;" onclick="editActivity()"><\img> \
<div id="saveBut" style="float:right; margin-top:300px; margin-right:80;" ></div> \
<div> \
<div class="title">Activity log Details</div> \
<ul id="first-col"> \
<ul class="leftcolActLogDetail"> \
<div style="position:relative; margin-top: 10px;"> \
<div id="title_act" class="content2"></div> \
<div id="model_name" class="content2"></div> \
<div id="location" class="content2"></div> \
<div id="date_act" class="content2"></div> \
<div id="time_act" class="content2"></div> \
<div id="alt" class="content2"></div> \
<div id="max_alt" class="content2"></div> \
<div id="max_spd" class="content2"></div> \
<div id="min_rssi" class="content2"></div> \
</div> \
</ul> \
</ul> \
<ul id="second-col"> \
<ul id="editableAct" class="leftcolParam"> \
</ul> \
</ul> \
<ul id="third-col"> \
<ul id="notesCol" class="leftcolParam"> \
<div class="content3"> \
<div style="color: white;">Notes: </div> \
<textarea readonly rows="10" cols="80" id="notes" style="color: black;"></textarea> \
</div> \
</ul> \
</ul> \
</div> \
</div> \
<div class="activityPanels" style="width:98%; height:400px; overflow:auto;"> \
<div class="title">Flight Controller Parameters</div> \
<div style="position:relative; margin-top: 10px;"> \
<ul id="first-col"> \
<ul class="leftcolParam"> \
<div id="P_interval" class="content2"></div> \
<div id="minthrottle" class="content2"></div> \
<div id="maxthrottle" class="content2"></div> \
<div id="looptime" class="content2"></div> \
<div id="rc_rate" class="content2"></div> \
<div id="rc_expo" class="content2"></div> \
<div id="rc_yaw_expo" class="content2"></div> \
<div id="thr_mid" class="content2"></div> \
<div id="thr_expo" class="content2"></div> \
</ul> \
</ul> \
<ul id="second-col"> \
<ul class="leftcolParam"> \
<div id="tpa_rate" class="content2"></div> \
<div id="tpa_breakpoint" class="content2"></div> \
<div id="rates" class="content2"></div> \
<div id="rollPID" class="content2"></div> \
<div id="pitchPID" class="content2"></div> \
<div id="yawPID" class="content2"></div> \
<div id="altPID" class="content2"></div> \
<div id="posPID" class="content2"></div> \
<div id="posPID" class="content2"></div> \
</ul> \
</ul> \
<ul id="third-col"> \
<ul class="leftcolParam"> \
<div id="posrPID" class="content2"></div> \
<div id="levelPID" class="content2"></div> \
<div id="magPID" class="content2"></div> \
<div id="velPID" class="content2"></div> \
<div id="yaw_p_limit" class="content2"></div> \
<div id="yaw_lpf_hz" class="content2"></div> \
<div id="dterm_lpf_hz" class="content2"></div> \
<div id="dterm_notch_hz" class="content2"></div> \
<div id="dterm_notch_cutoff" class="content2"></div> \
</ul> \
</ul> \
<ul id="fourth-col"> \
<ul class="leftcolParam"> \
<div id="deadband" class="content2"></div> \
<div id="yaw_deadband" class="content2"></div> \
<div id="gyro_lpf" class="content2"></div> \
<div id="gyro_lpf_hz" class="content2"></div> \
<div id="gyro_notch_hz" class="content2"></div> \
<div id="gyro_notch_cutoff" class="content2"></div> \
<div id="acc_lpf_hz" class="content2"></div> \
<div id="acc_notch_hz" class="content2"></div> \
<div id="acc_notch_cutoff" class="content2"></div> \
</ul> \
</ul> \
<ul id="fifth-col"> \
<ul class="leftcolParam"> \
<div id="gyro_stage2_lowpass_hz" class="content2"></div> \
<div id="pidSumLimit" class="content2"></div> \
<div id="acc_hardware" class="content2"></div> \
<div id="baro_hardware" class="content2"></div> \
<div id="mag_hardware" class="content2"></div> \
<div id="motor_pwm_rate" class="content2"></div> \
<div id="waypoints" class="content2"></div> \
<div id="axisAccelerationLimitYaw" class="content2"></div> \
<div id="axisAccelerationLimitRollPitch" class="content2"></div> \
</ul> \
</ul> \
</div> \
</div> \
</div> \
</div> \
</div>';
function selectFPVlog()
{
document.getElementById("fpvlog").className = "active";
document.getElementById("activity").className = "null";
x = document.getElementById('fpvlogDiv');
x.style.display = "block";
x = document.getElementById('activityDiv');
x.style.display = "none";
document.getElementById("activityDiv").innerHTML = "";
document.getElementById("dataBox").innerHTML = mapBoxHTML1 ;
DB_select("date_act","DESC");
}
function selectActivity()
{
document.getElementById("activity").className = "active";
document.getElementById("fpvlog").className = "null";
x = document.getElementById('fpvlogDiv');
x.style.display = "none";
x = document.getElementById('activityDiv');
x.style.display = "block";
document.getElementById("dataBox").innerHTML = "";
document.getElementById("activityDiv").innerHTML = mapBoxHTML2 ;
getRuntimeData(activityID);
editable = 0;
editActivity();
DB_loadActivity(activityID);
DB_loadFCparam(activityID);
}
function onload(){
var text = "<div style='margin-top: 60px;'>" + "<?php echo $_SESSION['username'] ?>" + "'s <span><font color='#cc0000' face='arial''>fpv</font></span> logbook</div>";
sessionStorage.setItem("username","<?php echo $_SESSION['username'] ?>");
document.getElementById("toptitle").innerHTML = text;
selectFPVlog();
}
</script>
<script type="text/javascript" src="js/js_functions.js"></script>