  
  GearShifter = car.CarState.GearShifter
  
  def parse_gear_shifter(can_gear):
    if can_gear == 0x1:
      return GearShifter.park
    elif can_gear == 0x2:
      return GearShifter.reverse
    elif can_gear == 0x3:
      return GearShifter.neutral
    elif can_gear == 0x4:
      return GearShifter.drive
    elif can_gear == 0x5:
      return GearShifter.low
    return GearShifter.unknown
  
  
  def get_can_parser(CP):
  
    signals = [
 
</s> remove def parse_gear_shifter(gear, vals):

  val_to_capnp = {'P': GearShifter.park, 'R': GearShifter.reverse, 'N': GearShifter.neutral,
                  'D': GearShifter.drive, 'B': GearShifter.brake}
  try:
    return val_to_capnp[vals[gear]]
  except KeyError:
    return GearShifter.unknown
 </s> add def parse_gear_shifter(gear):
  return {'P': GearShifter.park, 'R': GearShifter.reverse, 'N': GearShifter.neutral,
              'D': GearShifter.drive, 'B': GearShifter.brake}.get(gear, GearShifter.unknown) </s> remove     self.gear_shifter = parse_gear_shifter(can_gear, self.shifter_values)
 </s> add     self.gear_shifter = parse_gear_shifter(self.shifter_values.get(can_gear, None)) </s> remove def parse_gear_shifter(gear, vals):

  val_to_capnp = {'P': GearShifter.park, 'R': GearShifter.reverse, 'N': GearShifter.neutral,
                  'D': GearShifter.drive, 'S': GearShifter.sport, 'L': GearShifter.low}
  try:
    return val_to_capnp[vals[gear]]
  except KeyError:
    return "unknown"
 </s> add def parse_gear_shifter(gear):
  return {'P': GearShifter.park, 'R': GearShifter.reverse, 'N': GearShifter.neutral,
            'D': GearShifter.drive, 'S': GearShifter.sport, 'L': GearShifter.low}.get(gear, GearShifter.unknown) </s> remove     if (frame % 3 == 0 and CS.CP.openpilotLongitudinalControl) or (pcm_cancel_cmd and ECU.CAM in self.fake_ecus):
 </s> add     if (frame % 3 == 0 and CS.CP.openpilotLongitudinalControl) or (pcm_cancel_cmd and Ecu.fwdCamera in self.fake_ecus): </s> remove                                                  ECU.APGS in self.fake_ecus))
    elif ECU.APGS in self.fake_ecus:
 </s> add                                                  Ecu.apgs in self.fake_ecus))
    elif Ecu.apgs in self.fake_ecus:
  return {0x1: GearShifter.park, 0x2: GearShifter.reverse, 0x3: GearShifter.neutral,
          0x4: GearShifter.drive, 0x5: GearShifter.low}.get(can_gear, GearShifter.unknown)
  
  GearShifter = car.CarState.GearShifter
  
  def parse_gear_shifter(can_gear):
  return {0x1: GearShifter.park, 0x2: GearShifter.reverse, 0x3: GearShifter.neutral,
          0x4: GearShifter.drive, 0x5: GearShifter.low}.get(can_gear, GearShifter.unknown)
  return {0x1: GearShifter.park, 0x2: GearShifter.reverse, 0x3: GearShifter.neutral,
          0x4: GearShifter.drive, 0x5: GearShifter.low}.get(can_gear, GearShifter.unknown)
  return {0x1: GearShifter.park, 0x2: GearShifter.reverse, 0x3: GearShifter.neutral,
          0x4: GearShifter.drive, 0x5: GearShifter.low}.get(can_gear, GearShifter.unknown)
  return {0x1: GearShifter.park, 0x2: GearShifter.reverse, 0x3: GearShifter.neutral,
          0x4: GearShifter.drive, 0x5: GearShifter.low}.get(can_gear, GearShifter.unknown)
  return {0x1: GearShifter.park, 0x2: GearShifter.reverse, 0x3: GearShifter.neutral,
          0x4: GearShifter.drive, 0x5: GearShifter.low}.get(can_gear, GearShifter.unknown)
  return {0x1: GearShifter.park, 0x2: GearShifter.reverse, 0x3: GearShifter.neutral,
          0x4: GearShifter.drive, 0x5: GearShifter.low}.get(can_gear, GearShifter.unknown)
  return {0x1: GearShifter.park, 0x2: GearShifter.reverse, 0x3: GearShifter.neutral,
          0x4: GearShifter.drive, 0x5: GearShifter.low}.get(can_gear, GearShifter.unknown)
  return {0x1: GearShifter.park, 0x2: GearShifter.reverse, 0x3: GearShifter.neutral,
          0x4: GearShifter.drive, 0x5: GearShifter.low}.get(can_gear, GearShifter.unknown)
  return {0x1: GearShifter.park, 0x2: GearShifter.reverse, 0x3: GearShifter.neutral,
          0x4: GearShifter.drive, 0x5: GearShifter.low}.get(can_gear, GearShifter.unknown)
  return {0x1: GearShifter.park, 0x2: GearShifter.reverse, 0x3: GearShifter.neutral,
          0x4: GearShifter.drive, 0x5: GearShifter.low}.get(can_gear, GearShifter.unknown)
  return {0x1: GearShifter.park, 0x2: GearShifter.reverse, 0x3: GearShifter.neutral,
          0x4: GearShifter.drive, 0x5: GearShifter.low}.get(can_gear, GearShifter.unknown)
  
  
  def get_can_parser(CP):
  
    signals = [
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Clean up ECU redundancy in selfdrive/car/* (#963)

* clean up ecu redundancy in selfdrive/car

* clean up gear parsing 
selfdrive/car/chrysler/carstate.py