better support non-car robots (#24106)

* better support non-car robots

* bump cereal

* update refs
This commit is contained in:
Adeeb Shihadeh
2022-04-01 20:03:20 -07:00
committed by GitHub
parent 333257badf
commit e40c36f22b
6 changed files with 9 additions and 8 deletions

2
cereal

Submodule cereal updated: c7c22aacfc...f05953e72a

View File

@@ -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)]

View File

@@ -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:

View File

@@ -1 +1 @@
7ede67c2798fbe675c078e4d90192efc7e8a3901
34c6b9b9a97a448138fa86ff6269d37f68aacb58

View File

@@ -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:

View File

@@ -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);
}
}