mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-25 09:42:05 +08:00
Rename FlatUIState to FlatConfidenceBall
Rename the parameter key FlatUIState to FlatConfidenceBall and update all references. Changes update common/params_keys.h, the UI state property (self.flat_confidence_ball in selfdrive/ui/sunnypilot/ui_state.py), the confidence ball rendering check (selfdrive/ui/mici/onroad/confidence_ball.py), and the params metadata (sunnypilot/sunnylink/params_metadata.json) with a clearer title/description
This commit is contained in:
@@ -154,7 +154,7 @@ inline static std::unordered_map<std::string, ParamKeyAttributes> keys = {
|
||||
{"DevUIInfo", {PERSISTENT | BACKUP, INT, "0"}},
|
||||
{"EnableCopyparty", {PERSISTENT | BACKUP, BOOL}},
|
||||
{"EnableGithubRunner", {PERSISTENT | BACKUP, BOOL}},
|
||||
{"FlatUIState", {PERSISTENT | BACKUP, BOOL, "0"}},
|
||||
{"FlatConfidenceBall", {PERSISTENT | BACKUP, BOOL, "0"}},
|
||||
{"GreenLightAlert", {PERSISTENT | BACKUP, BOOL, "0"}},
|
||||
{"GithubRunnerSufficientVoltage", {CLEAR_ON_MANAGER_START , BOOL}},
|
||||
{"HasAcceptedTermsSP", {PERSISTENT, STRING, "0"}},
|
||||
|
||||
@@ -81,7 +81,7 @@ class ConfidenceBall(Widget, ConfidenceBallSP):
|
||||
top_dot_color = rl.Color(50, 50, 50, 255)
|
||||
bottom_dot_color = rl.Color(13, 13, 13, 255)
|
||||
|
||||
if ui_state.flat_ui_state:
|
||||
if ui_state.flat_confidence_ball:
|
||||
top_dot_color = bottom_dot_color
|
||||
|
||||
draw_circle_gradient(content_rect.x + content_rect.width - status_dot_radius,
|
||||
|
||||
@@ -138,7 +138,7 @@ class UIStateSP:
|
||||
self.torque_bar = self.params.get_bool("TorqueBar")
|
||||
self.true_v_ego_ui = self.params.get_bool("TrueVEgoUI")
|
||||
self.turn_signals = self.params.get_bool("ShowTurnSignals")
|
||||
self.flat_ui_state = self.params.get_bool("FlatUIState")
|
||||
self.flat_confidence_ball = self.params.get_bool("FlatConfidenceBall")
|
||||
|
||||
|
||||
class DeviceSP:
|
||||
|
||||
@@ -302,9 +302,9 @@
|
||||
"title": "Firmware Query Done",
|
||||
"description": ""
|
||||
},
|
||||
"FlatUIState": {
|
||||
"title": "Flat UI State",
|
||||
"description": ""
|
||||
"FlatConfidenceBall": {
|
||||
"title": "Flat Confidence Ball",
|
||||
"description": "Removes the gradient from the confidence ball and uses solid state colors for improved visibility"
|
||||
},
|
||||
"ForcePowerDown": {
|
||||
"title": "Force Power Down",
|
||||
|
||||
Reference in New Issue
Block a user