-
Notifications
You must be signed in to change notification settings - Fork 5
/
flash.ejs
148 lines (123 loc) · 6.2 KB
/
flash.ejs
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>SnapperGPS - Flash</title>
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
<link rel="stylesheet" href="css/style.css" />
<script src="js/deviceCommunication.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Flash your SnapperGPS receiver with custom firmware.">
</head>
<body>
<!-- Nav bar -->
<%- include ('partials/navBar', {pageName: 'flash'}) %>
<!-- Main body -->
<main class="container">
<div class="row">
<div class="col">
<h1>Flash your SnapperGPS receiver with custom firmware</h1>
</div>
</div>
<div class="row" style="margin-bottom: 20px;">
<div class="col">
<i>
Did you know that this site works offline, too?
You can configure your SnapperGPS receiver in the field.
(If you do not clear your browser cache.)
</i>
</div>
</div>
<div class="row bg-white">
<div>
<%- include ('partials/webUsbSupport') %>
</div>
<div id="error-display" style="display: none;">
<div class="card text-white bg-danger mb-3" style="max-width: 100%;">
<div class="card-header"><b>Error</b></div>
<div class="card-body">
<p class="card-text" id="error-text">Error</p>
</div>
</div>
</div>
</div>
<div class="row bg-light">
<div class="row">
<div class="col">
Connect your SnapperGPS receiver
via USB.
If you used SnapperGPS before, then you can see some information
from your SnapperGPS receiver below.
Otherwise, click <i>Pair receiver</i> and select your SnapperGPS
receiver from the list.
</div>
</div>
<div class="row-ident">
<%- include ('partials/deviceInfo') %>
</div>
<div class="row btnrow row-ident">
<div class="col btncol">
<button class="btn btn-primary full-width" id="pair-button" style="min-width: 175px" disabled>Pair receiver</button>
</div>
</div>
</div>
<div class="row bg-light">
<div class="row">
<div class="col">
Flash a custom firmware to your SnapperGPS receiver or
select a firmware from the list.
</div>
</div>
<!-- <div class="row row-ident">
<div class="col">
<label for="total-size-input" style="margin-right: 10px;">Firmware size:</label>
<input id="total-size-input" type="number" value="49152" min="0"
style="width: 70px; text-align: right;">
<label for="total-size-input">bytes</label>
</div>
</div>
<div class="row row-ident">
<div class="col">
<label for="chunk-size-input" style="margin-right: 10px;">Flash page size:</label>
<input id="chunk-size-input" type="number" value="2048" min="0"
style="width: 70px; text-align: right;">
<label for="chunk-size-input">bytes</label>
</div>
</div> -->
<div class="row row-ident">
<div class="col">
<!-- Drop down list with option '-' -->
<label for="firmware-select" style="margin-right: 10px;" hidden>Firmware:</label>
<select class="form-select" id="firmware-select" style="width: 200px;">
<option value="-">-</option>
</select>
</div>
</div>
<div class="row row-ident">
<div class="col">
<label for="file-input" style="margin-right: 10px;" hidden>Custom firmware:</label>
<input id="file-input" type="file" accept=".bin">
</div>
</div>
<div class="row btnrow row-ident">
<div class="col btncol">
<button class="btn btn-primary full-width" id="firmware-button" style="min-width: 175px" disabled>Update firmware</button>
</div>
</div>
<div class="row row-ident">
<div class="col">
<span id="firmware-info">
No firmware for update selected.
</span>
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true" style="display: none; margin-left: 5px" id="firmware-spinner"></span>
</div>
</div>
</div>
</main>
</body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0" crossorigin="anonymous"></script>
<script src="js/configure/configureComms.js"></script>
<script src="service-worker.js"></script>
<script src="js/configure/flashUI.js"></script>
</html>