1e1
This commit is contained in:
@@ -395,11 +395,6 @@ static bool gm_tx_hook(const CANPacket_t *msg) {
|
||||
int button = (msg->data[5] >> 4) & 0x7U;
|
||||
|
||||
bool allowed_btn = (button == GM_BTN_CANCEL) && cruise_engaged_prev;
|
||||
// Pedal-long non-ACC path: once OP controls are taken over, allow cancel spam
|
||||
// immediately even if cruise_engaged_prev has not flipped yet.
|
||||
if ((button == GM_BTN_CANCEL) && gm_pedal_long && !gm_has_acc && controls_allowed) {
|
||||
allowed_btn = true;
|
||||
}
|
||||
if (gm_hw == GM_CAM && enable_gas_interceptor && gm_bolt_2022_pedal && button == GM_BTN_CANCEL) {
|
||||
allowed_btn = true;
|
||||
}
|
||||
|
||||
@@ -391,14 +391,18 @@ class TestGmInterceptorSafety(common.GasInterceptorSafetyTest, TestGmCameraSafet
|
||||
self.assertEqual(enable, self.safety.get_controls_allowed())
|
||||
|
||||
def test_buttons(self):
|
||||
# Pedal-long non-ACC only allows CANCEL while controls are active.
|
||||
# Pedal-long non-ACC only allows CANCEL when the CC-only cruise state is engaged.
|
||||
self.safety.set_controls_allowed(False)
|
||||
for btn in range(8):
|
||||
self.assertFalse(self._tx(self._button_msg(btn)))
|
||||
|
||||
self.safety.set_controls_allowed(True)
|
||||
for btn in range(8):
|
||||
self.assertEqual(btn == Buttons.CANCEL, self._tx(self._button_msg(btn)))
|
||||
self.assertFalse(self._tx(self._button_msg(btn)))
|
||||
|
||||
for enabled in (True, False):
|
||||
self._rx(self._pcm_status_msg(enabled))
|
||||
self.assertEqual(enabled, self._tx(self._button_msg(Buttons.CANCEL)))
|
||||
|
||||
def test_disable_control_allowed_from_cruise(self):
|
||||
pass
|
||||
@@ -510,7 +514,7 @@ class TestGmCcLongitudinalPandaSchedSafety(TestGmCcLongitudinalSafety):
|
||||
|
||||
self.safety.set_controls_allowed(1)
|
||||
for btn in range(8):
|
||||
self.assertEqual(btn == Buttons.CANCEL, self._tx(self._button_msg(btn)))
|
||||
self.assertFalse(self._tx(self._button_msg(btn)))
|
||||
|
||||
allowed_btns = {Buttons.UNPRESS, Buttons.RES_ACCEL, Buttons.DECEL_SET, Buttons.CANCEL}
|
||||
for enabled in (True, False):
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,2 +1,2 @@
|
||||
extern const uint8_t gitversion[19];
|
||||
const uint8_t gitversion[19] = "DEV-96ce4808-DEBUG";
|
||||
const uint8_t gitversion[19] = "DEV-c082d60d-DEBUG";
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
DEV-96ce4808-DEBUG
|
||||
DEV-c082d60d-DEBUG
|
||||
Reference in New Issue
Block a user