# EMU Manual Control fault definitions
# Highly Confidential and Proprietary Zoox Information. Copyright (c) Zoox.
component: ManualControl
source_enum: kEmuManualControl
namespace: zoox
faults:
  - id: 0
    name: ManualControlIpcRxError
    severity: ERROR
    description: Manual Control application errored while receiving IPC data and Manual Control is in Control.
    reaction:
      trajectory: NoGo
  - id: 1
    name: ManualControlRequestControlStateTimeout
    severity: WARNING
    description: Manual Control did not get control within timeout
  - id: 2
    name: MdiNorthPedalAccelerationInvalid
    severity: ERROR
    description: MDI accelerator pedal reporting invalid reading and Manual Control is in Control.
    reaction:
      trajectory: NoGo
  - id: 3
    name: MdiSouthPedalAccelerationInvalid
    severity: ERROR
    description: MDI accelerator pedal reporting invalid reading and Manual Control is in Control.
    reaction:
      trajectory: NoGo
  - id: 4
    name: MdiNorthPedalBrakeInvalid
    severity: ERROR
    description: MDI brake pedal reporting invalid reading and Manual Control is in Control.
    reaction:
      trajectory: NoGo
  - id: 5
    name: MdiSouthPedalBrakeInvalid
    severity: ERROR
    description: MDI brake pedal reporting invalid reading and Manual Control is in Control.
    reaction:
      trajectory: NoGo
  - id: 6
    name: MdiNorthPedalStale
    severity: ERROR
    description: MDI pedals are stale on both primary and secondary CAN and Manual Control is in Control.
    reaction:
      trajectory: NoGo
  - id: 7
    name: MdiSouthPedalStale
    severity: ERROR
    description: MDI pedals are stale on both primary and secondary CAN and Manual Control is in Control.
    reaction:
      trajectory: NoGo
  - id: 8
    name: MdiSteeringEncoderDriverStale
    severity: ERROR
    description: MDI steering encoder is stale and Manual Control is in Control.
    reaction:
      trajectory: Estop
  - id: 10
    name: MdiNorthWheelSensorsDisagree
    severity: ERROR
    description: MDI steering encoder disagrees with Helm steering angle and Manual Control is in Control.
    reaction:
      trajectory: Estop
  - id: 11
    name: MdiSouthWheelSensorsDisagree
    severity: ERROR
    description: MDI steering encoder disagrees with Helm steering angle and Manual Control is in Control.
    reaction:
      trajectory: Estop
  - id: 12
    name: MdiNorthHelmTimeoutDuringSteeringSync
    severity: ERROR
    description: MDI Helm failed to sync steering within timeout and Manual Control is in Control.
    reaction:
      trajectory: Estop
  - id: 13
    name: MdiSouthHelmTimeoutDuringSteeringSync
    severity: ERROR
    description: MDI Helm failed to sync steering within timeout and Manual Control is in Control.
    reaction:
      trajectory: Estop
  - id: 14
    name: MdiNorthHelmCommFault
    severity: ERROR
    description: MDI Helm reporting a communication fault on the active CAN bus and Manual Control is in Control.
    reaction:
      trajectory: Estop
  - id: 15
    name: MdiSouthHelmCommFault
    severity: ERROR
    description: MDI Helm reporting a communication fault on the active CAN bus and Manual Control is in Control.
    reaction:
      trajectory: Estop
  - id: 16
    name: MdiNorthHelmHWFault
    severity: ERROR
    description: MDI Helm reporting a hardware fault on the active CAN bus and Manual Control is in Control.
    reaction:
      trajectory: Estop
  - id: 17
    name: MdiSouthHelmHWFault
    severity: ERROR
    description: MDI Helm reporting a hardware fault on the active CAN bus and Manual Control is in Control.
    reaction:
      trajectory: Estop
  - id: 18
    name: MdiNorthHelmSensorFault
    severity: ERROR
    description: MDI Helm reporting a sensor fault on the active CAN bus and Manual Control is in Control.
    reaction:
      trajectory: Estop
  - id: 19
    name: MdiSouthHelmSensorFault
    severity: ERROR
    description: MDI Helm reporting a sensor fault on the active CAN bus and Manual Control is in Control.
    reaction:
      trajectory: Estop
  - id: 20
    name: MdiNorthHelmBatteryFault
    severity: ERROR
    description: MDI Helm reporting a battery fault on the active CAN bus and Manual Control is in Control.
    reaction:
      trajectory: Estop
  - id: 21
    name: MdiSouthHelmBatteryFault
    severity: ERROR
    description: MDI Helm reporting a battery fault on the active CAN bus and Manual Control is in Control.
    reaction:
      trajectory: Estop
  - id: 22
    name: MdiNorthHelmNetworkFault
    severity: WARNING
    description: MDI Helm reporting a network fault on the active CAN bus.
    troubleshooting_steps: Should cause pcan and mdi warnings and if you are in an active driving mode the MDI buzzer will go off.
  - id: 23
    name: MdiSouthHelmNetworkFault
    severity: WARNING
    description: MDI Helm reporting a network fault on the active CAN bus.
    troubleshooting_steps: Should cause pcan and mdi warnings and if you are in an active driving mode the MDI buzzer will go off.
  - id: 24
    name: MdiNorthHelmPowerFault
    severity: WARNING
    description: MDI Helm reporting a power fault on the active CAN bus.
    troubleshooting_steps: Should cause pcan and mdi warnings and if you are in an active driving mode the MDI buzzer will go off.
  - id: 25
    name: MdiSouthHelmPowerFault
    severity: WARNING
    description: MDI Helm reporting a power fault on the active CAN bus.
    troubleshooting_steps: Should cause pcan and mdi warnings and if you are in an active driving mode the MDI buzzer will go off.
  - id: 26
    name: MdiNorthHelmSingleCan
    severity: WARNING
    description: MDI Helm reporting only a single CAN bus is active.
    troubleshooting_steps: Should cause pcan and mdi warnings and if you are in an active driving mode the MDI buzzer will go off.
  - id: 27
    name: MdiSouthHelmSingleCan
    severity: WARNING
    description: MDI Helm reporting only a single CAN bus is active.
    troubleshooting_steps: Should cause pcan and mdi warnings and if you are in an active driving mode the MDI buzzer will go off.
  - id: 28
    name: MdiNorthHelmStale
    severity: ERROR
    description: MDI Helm is stale on both primary and secondary CAN and Manual Control is in Control.
    reaction:
      trajectory: Estop
  - id: 29
    name: MdiSouthHelmStale
    severity: ERROR
    description: MDI Helm is stale on both primary and secondary CAN and Manual Control is in Control.
    reaction:
      trajectory: Estop
  - id: 30
    name: OperatorTabletNorthStale
    severity: WARNING
    description: Operator tablet is stale on CAN and Manual Control is in Control.
  - id: 31
    name: OperatorTabletSouthStale
    severity: WARNING
    description: Operator tablet is stale on CAN and Manual Control is in Control.
  - id: 32
    name: NorthSteeringEncoderStale
    severity: ERROR
    description: Steering encoder is stale on CAN and Manual Control is in Control.
    reaction:
      trajectory: Estop
  - id: 33
    name: SouthSteeringEncoderStale
    severity: ERROR
    description: Steering encoder is stale on CAN and Manual Control is in Control.
    reaction:
      trajectory: Estop
  - id: 34
    name: OperatorTabletNorthStaleWhileNotInManualControl
    severity: WARNING
    description: Operator tablet is stale on CAN  and Manual Control is not in Control.
  - id: 35
    name: OperatorTabletSouthStaleWhileNotInManualControl
    severity: WARNING
    description: Operator tablet is stale on CAN  and Manual Control is not in Control.
  - id: 36
    name: ManualControlMdiNorthEstopButton
    severity: ERROR
    description: User requested eStop.
    reaction:
      trajectory: Estop
  - id: 37
    name: ManualControlMdiSouthEstopButton
    severity: ERROR
    description: User requested eStop.
    reaction:
      trajectory: Estop
  - id: 38
    name: MdiNorthNotActiveHasErrors
    severity: WARNING
    description: MDI north is installed in robot but not active. Installed MDI is triggering errors that if it was to become active would cause a robot response.
  - id: 39
    name: MdiSouthNotActiveHasErrors
    severity: WARNING
    description: MDI south is installed in robot but not active. Installed MDI is triggering errors that if it was to become active would cause a robot response.
  - id: 40
    name: ManualRequestorActiveStale
    severity: WARNING
    description: ManualRequestor is connected and active but stale.

# Deprecated Diagnostics
  - id: 9
    name: DEPRECATED_MdiSouthWheelEncoderDriverFaulted
    severity: ERROR
    description: MDI steering encoder is stale and Manual Control is in Control.
    reaction:
      trajectory: Estop
    deprecated: true
