# Mapping Speed
PT_VehicleAvgSpeed:
  minupdatedelay: 100
  targets: 
    Vehicle.Speed: {}

PT_EngineSpeed:
  minupdatedelay: 100
  targets: 
    Vehicle.Powertrain.CombustionEngine.Engine.Speed:
      transform:
        math: "floor(x+0.5)"

#
# NOTE:
#
# The following mappings depend on the AGL-specific VSS overlay
# that adds the extra Vehicle.Cabin.SteeringWheel.Switches sensors.
# Since the CAN events are coming from LIN polling, applications
# need to filter/debounce themselves.  The minupdatedelay of 0 is
# intentional to avoid missing events.
#

SW_Next:
  minupdatedelay: 0
  targets:
    Vehicle.Cabin.SteeringWheel.Switches.Next:
      filter-duplicates: "true"
      transform:
        fullmapping:
          0: "false"
          1: "true"

SW_Previous:
  minupdatedelay: 0
  targets:
    Vehicle.Cabin.SteeringWheel.Switches.Previous:
      filter-duplicates: "true"
      transform:
        fullmapping:
          0: "false"
          1: "true"

SW_Mode:
  minupdatedelay: 0
  targets:
    Vehicle.Cabin.SteeringWheel.Switches.Mode:
      filter-duplicates: "true"
      transform:
        fullmapping:
          0: "false"
          1: "true"

SW_Info:
  minupdatedelay: 0
  targets:
    Vehicle.Cabin.SteeringWheel.Switches.Info:
      filter-duplicates: "true"
      transform:
        fullmapping:
          0: "false"
          1: "true"

SW_CruiseEnable:
  minupdatedelay: 0
  targets:
    Vehicle.Cabin.SteeringWheel.Switches.CruiseEnable:
      filter-duplicates: "true"
      transform:
        fullmapping:
          0: "false"
          1: "true"

SW_CruiseSet:
  minupdatedelay: 0
  targets:
    Vehicle.Cabin.SteeringWheel.Switches.CruiseSet:
      filter-duplicates: "true"
      transform:
        fullmapping:
          0: "false"
          1: "true"

SW_CruiseResume:
  minupdatedelay: 0
  targets:
    Vehicle.Cabin.SteeringWheel.Switches.CruiseResume:
      filter-duplicates: "true"
      transform:
        fullmapping:
          0: "false"
          1: "true"

SW_CruiseCancel:
  minupdatedelay: 0
  targets:
    Vehicle.Cabin.SteeringWheel.Switches.CruiseCancel:
      filter-duplicates: "true"
      transform:
        fullmapping:
          0: "false"
          1: "true"

SW_VolumeUp:
  minupdatedelay: 0
  targets:
    Vehicle.Cabin.SteeringWheel.Switches.VolumeUp:
      filter-duplicates: "true"
      transform:
        fullmapping:
          0: "false"
          1: "true"

SW_VolumeDown:
  minupdatedelay: 0
  targets:
    Vehicle.Cabin.SteeringWheel.Switches.VolumeDown:
      filter-duplicates: "true"
      transform:
        fullmapping:
          0: "false"
          1: "true"

SW_VolumeMute:
  minupdatedelay: 0
  targets:
    Vehicle.Cabin.SteeringWheel.Switches.VolumeMute:
      filter-duplicates: "true"
      transform:
        fullmapping:
          0: "false"
          1: "true"

SW_Horn:
  minupdatedelay: 0
  targets:
    Vehicle.Cabin.SteeringWheel.Switches.Horn:
      filter-duplicates: "true"
      transform:
        fullmapping:
          0: "false"
          1: "true"

SW_LaneDepartureWarning:
  minupdatedelay: 0
  targets:
    Vehicle.Cabin.SteeringWheel.Switches.LaneDepartureWarning:
      filter-duplicates: "true"
      transform:
        fullmapping:
          0: "false"
          1: "true"
