Skip to content

Commit 9419bcf

Browse files
eriedclaude
andcommitted
Watch: tighter copy, NONE-default stem buttons, dashboard parity
Stem-button defaults flip to NONE across all four slots so a paired watch doesn't intercept side-button presses unless the user deliberately maps an action. Avoids surprise rewrites of the watch's own button bindings on first install. Hardware buttons help text dropped — the Click / Long press picker labels are self-explanatory and the verbose Galaxy Watch Ultra walkthrough wasn't earning its keep. Wheel-name header on the second page now wears the same default on-surface white the phone dashboard uses for its connection-state caption, instead of the accent that read like a heading. Load (PWM) display: - Phone dashboard's stat label renamed LOAD -> LOAD (PWM) so the acronym matches the watch's settings and second-page label. - Watch dashboard's PWM number tracks the same tier rule as the phone (>= 80% red, >= 60% orange, else green or accent). - Load bar fill follows the same 80/60 thresholds — the prior 40% yellow tier read as a warning when the wheel was just cruising. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 861d80a commit 9419bcf

6 files changed

Lines changed: 29 additions & 27 deletions

File tree

app/src/main/java/com/eried/eucplanet/data/model/AppSettings.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,12 @@ data class AppSettings(
196196
* KEYCODE_STEM_* in MainActivity, and either fires a local control
197197
* intent or routes to the phone over /euc/control.
198198
*/
199-
@ColumnInfo(defaultValue = "HORN")
200-
val watchStem1Click: String = "HORN",
199+
@ColumnInfo(defaultValue = "NONE")
200+
val watchStem1Click: String = "NONE",
201201
@ColumnInfo(defaultValue = "NONE")
202202
val watchStem1Hold: String = "NONE",
203-
@ColumnInfo(defaultValue = "LIGHT_TOGGLE")
204-
val watchStem2Click: String = "LIGHT_TOGGLE",
203+
@ColumnInfo(defaultValue = "NONE")
204+
val watchStem2Click: String = "NONE",
205205
@ColumnInfo(defaultValue = "NONE")
206206
val watchStem2Hold: String = "NONE"
207207
)

app/src/main/java/com/eried/eucplanet/ui/settings/SettingsScreen.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,11 +1126,6 @@ private fun WatchTab(
11261126
)
11271127

11281128
SectionHeader(stringResource(R.string.section_watch_buttons))
1129-
Text(
1130-
stringResource(R.string.watch_buttons_help),
1131-
style = MaterialTheme.typography.bodySmall,
1132-
color = MaterialTheme.colorScheme.onSurfaceVariant
1133-
)
11341129

11351130
Text(stringResource(R.string.watch_button_1), style = MaterialTheme.typography.bodyLarge)
11361131
WatchActionPicker(

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<string name="stat_temp">TEMP</string>
6161
<string name="stat_voltage">VOLTAGE</string>
6262
<string name="stat_amps">AMPS</string>
63-
<string name="stat_load">LOAD</string>
63+
<string name="stat_load">LOAD (PWM)</string>
6464
<string name="stat_trip">TRIP</string>
6565
<string name="stat_odo">ODO </string>
6666

@@ -105,7 +105,6 @@
105105

106106
<!-- Watch hardware buttons -->
107107
<string name="section_watch_buttons">Hardware buttons</string>
108-
<string name="watch_buttons_help">Map your watch\'s side buttons to wheel actions. On Galaxy Watch Ultra: button 1 = orange Action button, button 2 = lower side button (after assigning EUC Planet to launch on press in your watch settings).</string>
109108
<string name="watch_button_1">Button 1</string>
110109
<string name="watch_button_2">Button 2</string>
111110
<string name="watch_button_click_label">Click</string>

wear/src/main/java/com/eried/eucplanet/wear/bridge/WatchBridgeService.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ class WatchBridgeService : WearableListenerService() {
5858
showGaugeBand = map.getBoolean(WatchKeys.OPT_GAUGE_BAND, false),
5959
gaugeOrangeThresholdPct = map.getInt(WatchKeys.OPT_GAUGE_ORANGE, 65),
6060
gaugeRedThresholdPct = map.getInt(WatchKeys.OPT_GAUGE_RED, 85),
61-
stem1Click = map.getString(WatchKeys.STEM1_CLICK, "HORN") ?: "HORN",
61+
stem1Click = map.getString(WatchKeys.STEM1_CLICK, "NONE") ?: "NONE",
6262
stem1Hold = map.getString(WatchKeys.STEM1_HOLD, "NONE") ?: "NONE",
63-
stem2Click = map.getString(WatchKeys.STEM2_CLICK, "LIGHT_TOGGLE") ?: "LIGHT_TOGGLE",
63+
stem2Click = map.getString(WatchKeys.STEM2_CLICK, "NONE") ?: "NONE",
6464
stem2Hold = map.getString(WatchKeys.STEM2_HOLD, "NONE") ?: "NONE"
6565
)
6666
)

wear/src/main/java/com/eried/eucplanet/wear/bridge/WatchProtocol.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ data class WatchState(
130130
val showGaugeBand: Boolean = false,
131131
val gaugeOrangeThresholdPct: Int = 65,
132132
val gaugeRedThresholdPct: Int = 85,
133-
val stem1Click: String = "HORN",
133+
val stem1Click: String = "NONE",
134134
val stem1Hold: String = "NONE",
135-
val stem2Click: String = "LIGHT_TOGGLE",
135+
val stem2Click: String = "NONE",
136136
val stem2Hold: String = "NONE"
137137
)

wear/src/main/java/com/eried/eucplanet/wear/ui/WatchApp.kt

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -196,20 +196,29 @@ private fun MainScreen(state: WatchState, accent: Color) {
196196
}
197197
if (showBar && showPwmNumber) Spacer(Modifier.width(6.dp))
198198
if (showPwmNumber) {
199-
// When the bar is alongside, the "%" is enough — the
200-
// bar itself is the visual context. Text-only mode
201-
// gets a full "Load (PWM): N%" label since there's no
202-
// bar to clue the rider in.
199+
// Bar alongside → just "N%". Text-only → "Load (PWM): N%"
200+
// since there's no bar to give the value context.
203201
val pwmText = when {
204202
!state.connected -> if (showBar) DASH else "Load (PWM): $DASH"
205203
showBar -> "%.0f%%".format(state.pwmPercent)
206204
else -> "Load (PWM): %.0f%%".format(state.pwmPercent)
207205
}
206+
// Same tier scale as the phone dashboard's LOAD card:
207+
// ≥ 80% red, ≥ 60% orange, else green (or accent for
208+
// custom accents). Disconnected stays muted grey.
209+
val pwmAccent = state.accentKey != "default"
210+
val pwmTextColor = when {
211+
!state.connected -> Color(0xFF606060)
212+
pwmAccent -> accent
213+
state.pwmPercent >= 80f -> GaugeAccentRed
214+
state.pwmPercent >= 60f -> GaugeAccentOrange
215+
else -> GaugeAccentGreen
216+
}
208217
Text(
209218
text = pwmText,
210219
fontSize = pwmNumberSp,
211220
fontWeight = FontWeight.Medium,
212-
color = if (state.connected) pwmTierColor(state.pwmPercent) else Color(0xFF606060)
221+
color = pwmTextColor
213222
)
214223
}
215224
}
@@ -265,9 +274,8 @@ private fun speedTierColor(speedKmh: Float, maxSpeedKmh: Float): Color = when {
265274
private fun LoadBar(percent: Float, modifier: Modifier = Modifier) {
266275
val pct = percent.coerceIn(0f, 100f)
267276
val fillColor = when {
268-
pct > 80f -> Color(0xFFEF5350)
269-
pct > 60f -> Color(0xFFFFA726)
270-
pct > 40f -> Color(0xFFFFCA28)
277+
pct >= 80f -> Color(0xFFEF5350)
278+
pct >= 60f -> Color(0xFFFFA726)
271279
else -> Color(0xFF66BB6A)
272280
}
273281
val trackColor = Color(0xFF333333)
@@ -468,9 +476,9 @@ private fun DetailsScreen(state: WatchState, accent: Color) {
468476
horizontalAlignment = Alignment.CenterHorizontally,
469477
verticalArrangement = Arrangement.spacedBy(2.dp)
470478
) {
471-
// When disconnected we still render every metric (all zeros) but
472-
// swap the wheel-name accent header for a muted "Disconnected"
473-
// hint so the rider knows the values aren't live.
479+
// Wheel-name and Disconnected header both wear the same muted
480+
// caption tint as the phone dashboard's status row — the speed
481+
// is the page's visual focus, the header is just context.
474482
if (!state.connected) {
475483
Text(
476484
text = stringResource(R.string.watch_disconnected),
@@ -482,7 +490,7 @@ private fun DetailsScreen(state: WatchState, accent: Color) {
482490
Text(
483491
text = state.wheelName,
484492
fontSize = headerSp,
485-
color = accent,
493+
color = Color.White,
486494
fontWeight = FontWeight.SemiBold
487495
)
488496
}

0 commit comments

Comments
 (0)