mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-07-14 01:12:06 +08:00
Adds correct value of 8 to gearshifter check array
This commit is contained in:
@@ -339,7 +339,7 @@ class CarState(object):
|
||||
self.cruise_setting = cp.vl[0x1A6]['CRUISE_SETTING']
|
||||
self.cruise_buttons = cp.vl[0x1A6]['CRUISE_BUTTONS']
|
||||
self.main_on = cp.vl[0x1A6]['MAIN_ON']
|
||||
self.gear_shifter_valid = self.gear_shifter in [1,4] # TODO: 1/P allowed for debug
|
||||
self.gear_shifter_valid = self.gear_shifter in [1,8] # TODO: 1/P allowed for debug
|
||||
self.blinker_on = cp.vl[0x294]['LEFT_BLINKER'] or cp.vl[0x294]['RIGHT_BLINKER']
|
||||
self.left_blinker_on = cp.vl[0x294]['LEFT_BLINKER']
|
||||
self.right_blinker_on = cp.vl[0x294]['RIGHT_BLINKER']
|
||||
|
||||
@@ -181,8 +181,7 @@ class CarInterface(object):
|
||||
errors.append('steerTemporarilyUnavailable')
|
||||
if self.CS.brake_error:
|
||||
errors.append('brakeUnavailable')
|
||||
# crvtodo: fix gearbox read.
|
||||
if not self.CS.gear_shifter_valid and not self.CS.crv:
|
||||
if not self.CS.gear_shifter_valid:
|
||||
errors.append('wrongGear')
|
||||
if not self.CS.door_all_closed:
|
||||
errors.append('doorOpen')
|
||||
|
||||
Reference in New Issue
Block a user