def create_acc_ui_command(packer, main_on: bool, enabled: bool, stock_values):
  """
  Creates a CAN message for the Ford IPC adaptive cruise, forward collision
  warning and traffic jam assist status.

  Stock functionality is maintained by passing through unmodified signals.

  Frequency is 20Hz.
  """

  values = {
    "HaDsply_No_Cs": stock_values["HaDsply_No_Cs"],                     # [0|255]
    "HaDsply_No_Cnt": stock_values["HaDsply_No_Cnt"],                   # [0|15]
    "AccStopStat_D_Dsply": stock_values["AccStopStat_D_Dsply"],         # ACC stopped status message: 0=NoDisplay, 1=ResumeReady, 2=Stopped, 3=PressResume [0|3]
    "AccTrgDist2_D_Dsply": stock_values["AccTrgDist2_D_Dsply"],         # ACC target distance [0|15]
    "AccStopRes_B_Dsply": stock_values["AccStopRes_B_Dsply"],           # [0|1]
    "TjaWarn_D_Rq": stock_values["TjaWarn_D_Rq"],                       # TJA warning: 0=NoWarning, 1=Cancel, 2=HardTakeOverLevel1, 3=HardTakeOverLevel2 [0|7]
    "Tja_D_Stat": 2 if enabled else (1 if main_on else 0),              # TJA status: 0=Off, 1=Standby, 2=Active, 3=InterventionLeft, 4=InterventionRight, 5=WarningLeft, 6=WarningRight, 7=NotUsed [0|7]
    "TjaMsgTxt_D_Dsply": stock_values["TjaMsgTxt_D_Dsply"],             # TJA text [0|7]
    "IaccLamp_D_Rq": stock_values["IaccLamp_D_Rq"],                     # iACC status icon [0|3]
    "AccMsgTxt_D2_Rq": stock_values["AccMsgTxt_D2_Rq"],                 # ACC text [0|15]
    "FcwDeny_B_Dsply": stock_values["FcwDeny_B_Dsply"],                 # FCW disabled [0|1]
    "FcwMemStat_B_Actl": stock_values["FcwMemStat_B_Actl"],             # FCW enabled setting [0|1]
    "AccTGap_B_Dsply": stock_values["AccTGap_B_Dsply"],                 # ACC time gap display setting [0|1]
    "CadsAlignIncplt_B_Actl": stock_values["CadsAlignIncplt_B_Actl"],   # Radar alignment? [0|1]
    "AccFllwMde_B_Dsply": stock_values["AccFllwMde_B_Dsply"],           # ACC follow mode display setting [0|1]
    "CadsRadrBlck_B_Actl": stock_values["CadsRadrBlck_B_Actl"],         # Radar blocked? [0|1]
    "CmbbPostEvnt_B_Dsply": stock_values["CmbbPostEvnt_B_Dsply"],       # AEB event status [0|1]
    "AccStopMde_B_Dsply": stock_values["AccStopMde_B_Dsply"],           # ACC stop mode display setting [0|1]
    "FcwMemSens_D_Actl": stock_values["FcwMemSens_D_Actl"],             # FCW sensitivity setting [0|3]
    "FcwMsgTxt_D_Rq": stock_values["FcwMsgTxt_D_Rq"],                   # FCW text [0|7]
    "AccWarn_D_Dsply": stock_values["AccWarn_D_Dsply"],                 # ACC warning [0|3]
    "FcwVisblWarn_B_Rq": stock_values["FcwVisblWarn_B_Rq"],             # FCW alert: 0=Off, 1=On [0|1]
    "FcwAudioWarn_B_Rq": stock_values["FcwAudioWarn_B_Rq"],             # FCW audio: 0=Off, 1=On [0|1]
    "AccTGap_D_Dsply": stock_values["AccTGap_D_Dsply"],                 # ACC time gap: 1=Time_Gap_1, 2=Time_Gap_2, ..., 5=Time_Gap_5 [0|7]
    "AccMemEnbl_B_RqDrv": stock_values["AccMemEnbl_B_RqDrv"],           # ACC setting: 0=NormalCruise, 1=AdaptiveCruise [0|1]
    "FdaMem_B_Stat": stock_values["FdaMem_B_Stat"],                     # FDA enabled setting [0|1]
  }
  return packer.make_can_msg("ACCDATA_3", 0, values)