          cnt = (frame % 10) + 1
          can_sends.append(make_can_msg(addr, (cnt<<4).to_bytes(1, 'little') + b'\x00\x00\x00\x00\x00\x00\x00', 1))
  
        self.enabled_last = enabled
        self.main_on_last = CS.main_on
        self.steer_alert_last = steer_alert
  
      return can_sends
 
</s> remove     # calc best v_ego estimate, by averaging two opposite corners
 </s> add  </s> remove     return ret.as_reader()
 </s> add     self.CS.out = ret.as_reader()

    return self.CS.out </s> remove         can_sends.append(create_lkas_ui(self.packer, CS.main_on, enabled, steer_alert))
 </s> add         can_sends.append(create_lkas_ui(self.packer, CS.out.cruiseState.available, enabled, steer_alert)) </s> remove     self.user_gas = cp.vl["EngineData_14"]['ApedPosScal_Pc_Actl']
    self.brake_pressed = bool(cp.vl["Cruise_Status"]["Brake_Drv_Appl"])
    self.brake_lights = bool(cp.vl["BCM_to_HS_Body"]["Brake_Lights"])
    self.generic_toggle = bool(cp.vl["Steering_Buttons"]["Dist_Incr"])
 </s> add     return ret </s> remove                                               CS.lkas_state, CS.angle_steers, curvature, self.lkas_action))
        self.generic_toggle_last = CS.generic_toggle
 </s> add                                               CS.lkas_state, CS.out.steeringAngle, curvature, self.lkas_action))
        self.generic_toggle_last = CS.out.genericToggle
      self.main_on_last = CS.out.cruiseState.available
          cnt = (frame % 10) + 1
          can_sends.append(make_can_msg(addr, (cnt<<4).to_bytes(1, 'little') + b'\x00\x00\x00\x00\x00\x00\x00', 1))
  
        self.enabled_last = enabled
      self.main_on_last = CS.out.cruiseState.available
        self.steer_alert_last = steer_alert
  
      return can_sends
keep keep keep keep replace keep keep keep
 Ford: have carstate update returning capnp struct directly (#1113)

* Before abstraction, adding speed init from VW as well

* strting to abstract carstate class

* fix bug and update lock?

* revert pipfile change

* another bug

* fix linter

* bug fix

* remove a bunch of diplicated kf code

* better to not have class vars. will abstract __init__ anyway later

* abstract common instance vars in carstate init and a generic gear parser static method

* abstract gear parser for chrysler

* abstract gm gear parser too

* remove unnecessary random vars

* Chrysler: carstate returns capnp struct directly

* revert ref commit

* test ref

* WIP

* more WIP

* ops, missed this conflict

* ford as well

* not sure why this got deleted

* no need to copy

* remove copy

* remove copy import

* remove unnecessary intermediate variable

* remove obsolete comments

Co-authored-by: Willem Melching <willem.melching@gmail.com> 
selfdrive/car/ford/carcontroller.py