diff --git a/assets/contracts/checklists/z27ag-captures.json b/assets/contracts/checklists/z27ag-captures.json index 49126bd..ab84ae8 100644 --- a/assets/contracts/checklists/z27ag-captures.json +++ b/assets/contracts/checklists/z27ag-captures.json @@ -1,6 +1,6 @@ { "id": "z27ag-captures", - "version": 3, + "version": 4, "title": "Z27AG decoding captures", "about": "docs/impl/plans/Z27AG-CAPTURES.md", "mark_format": " [ #] start|end for a span, [ #] for a point", @@ -445,6 +445,30 @@ "hold_s": 10 } ] + }, + { + "id": "31", + "title": "One wheel at a time, by hand", + "do": "Ignition on, engine off, neutral. A front: hold the other front still (open differential: in neutral the turned wheel spins the gearbox, not its partner) and spin this one briskly by hand, forward, about one turn a second; start as it turns, end as you stop. A rear, if you raise it: rears turn freely, no holding needed. Fronts are enough if the rears are not up.", + "finds": "which word of 235 is which wheel, one at a time (the drives already point to bytes 0-1 front right, 2-3 front left, 4-5 rear right, 6-7 rear left); also the slowest speed the ABS reports", + "actions": [ + { + "label": "front left by hand", + "hold_s": 10 + }, + { + "label": "front right by hand", + "hold_s": 10 + }, + { + "label": "rear left by hand", + "hold_s": 10 + }, + { + "label": "rear right by hand", + "hold_s": 10 + } + ] } ] }, diff --git a/lib/main.dart b/lib/main.dart index b836d44..8fc5644 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -5,6 +5,7 @@ import 'package:flutter/material.dart'; import 'link/boundary.dart'; import 'link/net.dart'; +import 'link/reading.dart'; import 'pages/link_test.dart'; import 'shell.dart'; import 'shell_scope.dart'; @@ -24,6 +25,14 @@ Future main() async { final usb = UsbLink(); await usb.bindFor(Uri.parse(defaultUrl)); final boundary = Boundary(defaultUrl)..start(); + // The sun, for auto dark/bright: the car's position while GNSS has one. + boundary.addListener(() { + final lat = Reading.of(boundary, 'gnss_lat'); + final lon = Reading.of(boundary, 'gnss_lon'); + if (!lat.dim && !lon.dim && lat.number != null && lon.number != null) { + themes.setPosition(lat.number!, lon.number!); + } + }); final linkTest = LinkTest(usb); // Development hook: `am start ... --es linktest [dl:|bi:]