Skip to content

Commit

Permalink
Merge pull request #68 from Solar-Gators/teaching
Browse files Browse the repository at this point in the history
Power draw quick fact
  • Loading branch information
jackschedel authored Nov 3, 2023
2 parents 3fc9b7a + 53bc7b6 commit b46dd3e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ backend/dist

backend/data-collector/node_modules/*
.env
rework/node_modules
1 change: 1 addition & 0 deletions client/src/component/TelemetryCan.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export default function TelemetryCAN<T>({
<>
<h3>{config.title}</h3>
<div className="center-align">

{Object.keys(config.data).map((messageName: string) => {
const message = config.data?.[messageName];

Expand Down
3 changes: 3 additions & 0 deletions client/src/pages/LiveTelemetry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ function LiveTelemetry() {
</Row>
<Row>
<Label label="Lap Count" value={data?.laps?.rx0?.lap ?? 0} />
<Label label="Power Draw" value={(data?.mitsuba?.rx0?.battVoltage ?? 0) * (data?.mitsuba?.rx0?.battCurrent ?? 0)}
unit = 'W'
/>
</Row>

<h3>Raw Messages</h3>
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/Strategy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ function Strategy() {
startTimestamp = new Date(
filteredResponse[0]["dateStamp"] * granularityMs,
).getTime();
} catch (e) {
} catch {
return;
}

Expand Down

0 comments on commit b46dd3e

Please sign in to comment.