Drive on other screens (field test on a 26″): the cells at most the profile's 80 px, on a bigger screen only the map's columns and rows stretch (the right column, the menus and the map keys stay cell-sized, a list shows more rows), on a smaller one everything — cells, type, icons — scaled by one factor so a 7″ keeps the same elements; a menu now lies over the cells of the area it opens in (Next stop and the rest covered Terrain), the dials sized by the cell; the simulation's roll and pitch always from the terrain under it, not the IMU of the car standing at home; the dashboard's card over the map hidden while driving (Terrain instead)
CI / check (push) Successful in 27s
CI / deploy (push) Successful in 17s

This commit is contained in:
randy committed 2026-12-03 11:04:45 +01:00
1 parent f73badd107
commit d39e3b5edd
4 files changed
+84 -64

No files matched your search

+6 -2
View File
@@ -213,7 +213,7 @@ export class DashboardControl {
if (this._values.alt == null) {
this._values.alt = await elevationAt(lon, lat, offline, { zoom: TILT_ZOOM, smooth: true });
}
if (this._course == null || this._values.pitch != null || this._values.roll != null) return;
if (this._course == null) return;
const [front, back, right, left] = await Promise.all([0, 180, 90, 270].map((b) => at(this._course + b)));
if ([front, back, right, left].includes(null)) return;
const deg = (rise) => Math.atan(rise / (2 * TILT_HALF_M)) / rad;
@@ -391,7 +391,11 @@ export class DashboardControl {
this._updateCourse(this._values);
this._simRunning = !!data.simulated; // /sim.html runs it
this._actions = data.actions || []; // can.json's SDO actions (levelling), POST /api/can/actions/<n>
if (this._simRunning) await this._simulateTerrain();
if (this._simRunning) {
// simulated driving: the tilt of the terrain under it, not the IMU of the car standing at home
this._values.pitch = this._values.roll = null;
await this._simulateTerrain();
}
this._navigate();
this._status.textContent = this._simRunning ? "Simulated GNSS" : data.available ? "" : "CAN is off on this server";
this._status.hidden = !this._status.textContent;