-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
170 lines (159 loc) · 9.77 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>ERLT PocketEdition WebDriver</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="/assets/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<link href="/assets/font-awesome.css" rel="stylesheet" >
<link rel="stylesheet" href="/assets/style.css">
<script src="/socket.io/socket.io.js"></script>
<script src="/channels.js"></script>
</head>
<body>
<div class="container-fluid">
<h1 class="title">ERLT PocketEdition web driver v0.2</h1>
<div id="app">
<div class="row">
<div class="col">
<p>
<label>EasyRaceLapTimerHost</label>
<input v-model="erlt_host">
<button v-on:click='saveERLTHost' class="btn btn-xs"><i class="fa fa-floppy-o" aria-hidden="true"></i></button>
</p>
</div>
<div class="col">
<p>
<label>Advanced</label>
<input v-model="showAdvanced" type="checkbox">
</p>
</div>
<div class="col">
<p>
<button v-on:click='resetBoxes' class="btn btn-primary"><i class="fa fa-refresh" aria-hidden="true"></i> Reset</button>
</p>
</div>
</div>
<pe_driver_container v-bind:show-advanced="showAdvanced" v-bind:com_ports="com_ports" v-bind:pe-data="peDriver[0]" v-bind:number="1" v-bind:channels="channels"></pe_driver_container>
<pe_driver_container v-bind:show-advanced="showAdvanced" v-bind:com_ports="com_ports" v-bind:pe-data="peDriver[1]" v-bind:number="2" v-bind:channels="channels"></pe_driver_container>
<pe_driver_container v-bind:show-advanced="showAdvanced" v-bind:com_ports="com_ports" v-bind:pe-data="peDriver[2]" v-bind:number="3" v-bind:channels="channels"></pe_driver_container>
<pe_driver_container v-bind:show-advanced="showAdvanced" v-bind:com_ports="com_ports" v-bind:pe-data="peDriver[3]" v-bind:number="4" v-bind:channels="channels"></pe_driver_container>
<pe_driver_container v-bind:show-advanced="showAdvanced" v-bind:com_ports="com_ports" v-bind:pe-data="peDriver[4]" v-bind:number="5" v-bind:channels="channels"></pe_driver_container>
<pe_driver_container v-bind:show-advanced="showAdvanced" v-bind:com_ports="com_ports" v-bind:pe-data="peDriver[5]" v-bind:number="6" v-bind:channels="channels"></pe_driver_container>
<pe_driver_container v-bind:show-advanced="showAdvanced" v-bind:com_ports="com_ports" v-bind:pe-data="peDriver[6]" v-bind:number="7" v-bind:channels="channels"></pe_driver_container>
<pe_driver_container v-bind:show-advanced="showAdvanced" v-bind:com_ports="com_ports" v-bind:pe-data="peDriver[7]" v-bind:number="8" v-bind:channels="channels"></pe_driver_container>
<pe_tracked_timings_container v-bind:timing-data="timingData"></pe_tracked_timings_container>
<div class="row" v-if="showAdvanced">
<div class="col-xl-12">
<h2>Serial Log</h2>
<p>
<textarea v-model="serialLog" width="100%" rows="15" cols="80"></textarea>
</p>
</div>
</div>
</div>
<script type="text/x-template" id="pe_tracked_timings_template">
<div class="row">
<div class="col">
<hr/>
<h2>Timing log</h2>
<table class="table table-bordered">
<thead>
<tr>
<th>Device</th>
<th>Lap Time</th>
<th>Triggered RSSI</th>
</tr>
</thead>
<tbody>
<tr v-for="tdata in timingData">
<td>{{tdata.number}}</td>
<td>{{tdata.lap_time}}</td>
<td>{{tdata.rssi}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</script>
<script type="text/x-template" id="pe_driver_container_template">
<div class="row pe_container">
<div class="col">
<h2 class="pe_container_title">PocketEdition No: {{number}}</h2>
<div class="row" style="margin-bottom: 10px;">
<div class="col">
<select v-model="peData.selectedComPort">
<option v-for="com_port in com_ports" :value="com_port">
{{com_port}}
</option>
</select>
</div>
<div class="col">
<button v-on:click='refreshComPorts' class="btn btn-primary"><i class="fa fa-refresh" aria-hidden="true"></i> Refresh</button>
</div>
<div class="col">
<button v-on:click='connectToComPort' class="btn btn-primary" v-if="peData.connected == false"><i class="fa fa-caret-square-o-right" aria-hidden="true"></i> Connect</button>
</div>
<div class="col">
<button v-on:click='disconnectFromComPort' class="btn btn-warning" v-if="peData.connected == true"><i class="fa fa-stop-circle" aria-hidden="true"></i> Disconnect</button>
</div>
</div>
<table class="table table-bordered" v-if="peData.connected == true">
<thead>
<tr>
<td v-if="showAdvanced">Safety RSSI</td>
<td>Channel</td>
<td>SmartSense CutOff</td>
<td>Minimum Lap Time</td>
<td v-if="showAdvanced">Current RSSI</td>
</tr>
</thead>
<tbody>
<tr>
<td v-if="showAdvanced">
<input type="text" v-model="peData.safetyRssi">
<button v-on:click='refreshSafetyRSSI' class="btn btn-xs"><i class="fa fa-refresh" aria-hidden="true"></i></button>
</td>
<td>
<select v-model="peData.channel">
<option v-for="channel in channels" v-bind:value="channel.c">
{{channel.title}}
</option>
</select>
<button v-on:click='refreshChannel' class="btn btn-xs"><i class="fa fa-refresh" aria-hidden="true"></i></button>
<button v-on:click='saveChannel' class="btn btn-xs"><i class="fa fa-floppy-o" aria-hidden="true"></i></button>
</td>
<td>
<input type="text" v-model="peData.smartSenseCutOff">
<button v-on:click='refreshSmartSenseCutOff' class="btn btn-xs"><i class="fa fa-refresh" aria-hidden="true"></i></button>
<button v-on:click='saveSmartSenseCutOff' class="btn btn-xs"><i class="fa fa-floppy-o" aria-hidden="true"></i></button>
</td>
<td>
<input type="text" v-model="peData.minLapTime">
<button v-on:click='refreshMinimumLapTime' class="btn btn-xs"><i class="fa fa-refresh" aria-hidden="true"></i></button>
<button v-on:click='savehMinimumLapTime' class="btn btn-xs"><i class="fa fa-floppy-o" aria-hidden="true"></i></button>
</td>
<td v-if="showAdvanced">
<input type="text" v-model="peData.currentRSSI">
<button v-on:click='refreshCurrentRSSI' class="btn btn-xs"><i class="fa fa-refresh" aria-hidden="true"></i></button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</script>
</div>
<div id="footer">
EasyRaceLapTimer PocketEdition web driver © 2016-2017 by <a href="http://www.airbirds.de" target="_blank">AirBirds.de</a>
</div>
<!-- jQuery first, then Tether, then Bootstrap JS. -->
<script src="/assets/vue.js"></script>
<script src="/vue_app.js"></script>
<script src="/assets/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script src="/assets/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
<script src="/assets/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
</body>
</html>