Skip to content

Commit b4f47bc

Browse files
Keith BannisterKeith Bannister
Keith Bannister
authored and
Keith Bannister
committed
Add more peripherals
1 parent 243c9d7 commit b4f47bc

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

dashboard.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,10 @@ function onMessageArrived(message) {
120120

121121
addData(temperatureChart, mqtt_message_count, [data.internal_temp, data.external_temp, data.relative_humidity])
122122

123-
$('#battery_voltage').html("- V");
124-
$('#controller_temp').html(`${data.external_temp} Deg.`);
125-
123+
$('#battery_voltage').html(`${data.battery_voltage} V`);
124+
$('#controller_temp').html(`${data.esc_temp} Deg.`);
125+
$('#rpm').html(`${data.rpm} RPM`);
126+
126127
mqtt_message_count += 1;
127128

128129
}

ekayak.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ const temperatureData = {
5353
backgroundColor: 'rgba(0, 99, 182, 0.2)',
5454
yAxisID: 'y',
5555
},
56+
{
57+
label: 'ESC Temp',
58+
data: [],
59+
borderColor: 'rgba(89, 150, 182, 1)',
60+
backgroundColor: 'rgba(89, 99, 182, 0.2)',
61+
yAxisID: 'y',
62+
},
5663
{
5764
label: 'Humidity',
5865
data: [],
@@ -283,7 +290,7 @@ function onMessageArrived(message) {
283290

284291
let data = JSON.parse(message.payloadString);
285292

286-
addData(temperatureChart, nmsg, [data.internal_temp, data.external_temp, data.relative_humidity])
293+
addData(temperatureChart, nmsg, [data.internal_temp, data.external_temp, data.esc_temp, data.relative_humidity])
287294

288295
nmsg += 1;
289296

index.html

+5
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ <h3 class="text-xs mb-2 uppercase"> Temp</h3>
135135
<span class="text-2xl"id="controller_temp"></span>
136136
</div>
137137

138+
<div class = "flex flex-col">
139+
<h3 class="text-xs mb-2 uppercase"> RPM</h3>
140+
<span class="text-2xl"id="rpm"></span>
141+
</div>
142+
138143
<div class = "flex flex-col">
139144
<h3 class="text-xs mb-2 uppercase"> Trip</h3>
140145
<span class="text-2xl"id="current_trip"> </span>

0 commit comments

Comments
 (0)