App 2.22.1: gear badge shows only P; Logs list the raw gear codes

The badge said "D" for every gear that was not P, so N and R read as D.
EVHardware now passes on the raw gear code; the badge shows P for 1,
no letter for codes not yet mapped, "—" when unread. The Logs tab lists
each change of the code with time and speed, to match R, N and D on
the car. Emulator only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
This commit is contained in:
2026-10-24 16:59:44 +02:00
co-authored by Claude Opus 5.5
parent cd0dfcd612
commit 16cc2746ef
12 changed files with 151 additions and 11 deletions
@@ -0,0 +1,22 @@
package com.evsuite.abrp;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
/** The gear letter — pure JVM. */
public class GearTest {
@Test
public void onlyParkIsNamed() {
assertEquals("P", Gear.label(1));
assertEquals("", Gear.label(2));
assertEquals("", Gear.label(3));
assertEquals("", Gear.label(4));
}
@Test
public void unreadIsADash() {
assertEquals("—", Gear.label(null));
}
}