Skip to content

Commit 375151c

Browse files
committed
Begode: recognize the EX30 (151 V pack) so battery readout converges
The model fell through to the EX (100 V) matcher because "ex30" contained "ex". With a 100 V ratio, the EX30's raw centivolts on the wire are encoded above the 84-V-pack full-charge mark, so batteryPercentFromRawCv clamps to 100 % at every charge level. Adding EX30 ahead of "ex" in the name matcher and tagging the model at 151 V routes voltage and battery through the right ratio. Voltage class is a best estimate; an EX30 rider should report back if the dashboard reads off.
1 parent e77305b commit 375151c

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

app/src/main/java/com/eried/eucplanet/ble/BegodeModel.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ enum class BegodeModel(
2828
EX( "Begode EX", 100, 60),
2929
EX_N( "Begode EX.N", 100, 60),
3030
EX2( "Begode EX2", 126, 80),
31+
EX30( "Begode EX30", 151, 100),
3132
RS( "Begode RS", 126, 80),
3233
RS_HT( "Begode RS-HT", 134, 100),
3334
T3( "Begode T3", 84, 45),
@@ -51,6 +52,7 @@ enum class BegodeModel(
5152
"hero" in n -> HERO
5253
"rs-ht" in n || "rs_ht" in n || "rsht" in n -> RS_HT
5354
"rs" in n -> RS
55+
"ex30" in n || "ex_30" in n -> EX30
5456
"ex2" in n -> EX2
5557
"ex.n" in n || "ex_n" in n -> EX_N
5658
"ex" in n -> EX

app/src/main/java/com/eried/eucplanet/cheats/CheatState.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,14 @@ class CheatState @Inject constructor() {
8888
val mul = _speedDisplayMultiplier.value
8989
val daredevilState = if (mul == 1f) State.Off else State.Value("%.2fx".format(mul))
9090
return Result.ShowSheet(
91-
title = "Console",
91+
title = "EUC Planet",
9292
rows = listOf(
9393
Row("daredevilN", "Display-only speed multiplier", daredevilState),
9494
Row("godmode", "Mute all alarms", State.Bool(_godmode.value)),
9595
Row("silence", "Mute all voice", State.Bool(_silence.value)),
9696
Row("letmelock", "Lock wheel at any speed", State.Bool(_lockAtAnySpeed.value)),
9797
Row("bug", "Open the GitHub issues page", State.Action),
98-
Row("erwin", "Open ried.no", State.Action),
99-
Row("cheat / cheats", "This list", State.Action)
98+
Row("erwin", "Open ried.no", State.Action)
10099
)
101100
)
102101
}

0 commit comments

Comments
 (0)