mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 22:23:56 +08:00
better support non-car robots (#24106)
* better support non-car robots * bump cereal * update refs
This commit is contained in:
2
cereal
2
cereal
Submodule cereal updated: c7c22aacfc...f05953e72a
@@ -9,6 +9,7 @@ class CarInterface(CarInterfaceBase):
|
||||
|
||||
ret = CarInterfaceBase.get_std_params(candidate, fingerprint)
|
||||
|
||||
ret.notCar = True
|
||||
ret.carName = "body"
|
||||
ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.body)]
|
||||
|
||||
|
||||
@@ -76,8 +76,9 @@ class CarInfo:
|
||||
Column.MAINTAINED: CP.carFingerprint not in non_tested_cars,
|
||||
}
|
||||
|
||||
if self.name == "comma body":
|
||||
self.row[Column.LONGITUDINAL] = True
|
||||
if CP.notCar:
|
||||
for col in StarColumns:
|
||||
self.row[col] = True
|
||||
|
||||
self.all_footnotes = all_footnotes
|
||||
for column in StarColumns:
|
||||
|
||||
@@ -1 +1 @@
|
||||
7ede67c2798fbe675c078e4d90192efc7e8a3901
|
||||
34c6b9b9a97a448138fa86ff6269d37f68aacb58
|
||||
@@ -70,8 +70,7 @@ def test_process(cfg, lr, cmp_log_fn, ignore_fields=None, ignore_msgs=None):
|
||||
if cfg.proc_name == "controlsd":
|
||||
for msg in log_msgs:
|
||||
if msg.which() == "carParams":
|
||||
# body doesn't enable
|
||||
if msg.carParams.carName == "body":
|
||||
if msg.carParams.notCar:
|
||||
break
|
||||
if msg.which() == "controlsState":
|
||||
if msg.controlsState.active:
|
||||
|
||||
@@ -50,8 +50,8 @@ void HomeWindow::showSidebar(bool show) {
|
||||
void HomeWindow::updateState(const UIState &s) {
|
||||
const SubMaster &sm = *(s.sm);
|
||||
|
||||
// switch to the body UI
|
||||
if (onroad->isVisible() && sm["carParams"].getCarParams().getCarName() == "body") {
|
||||
// switch to the generic robot UI
|
||||
if (onroad->isVisible() && sm["carParams"].getCarParams().getNotCar()) {
|
||||
slayout->setCurrentWidget(body);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user