emergency_stop:
  # System configuration
  enabled: true
  
  # Timing constraints (CRITICAL)
  cmd_vel_zero_timeout_ms: 50      # Must zero cmd_vel within 50ms
  cascade_timeout_ms: 500           # Full cascade within 500ms
  
  # Trigger configuration
  triggers:
    voice: true
    gamepad: true
    tilt_threshold_deg: 45
    obstacle_distance_m: 0.3
    geofence: true
    watchdog: true
    mqtt_remote_kill: true
  
  # Resume configuration (manual only)
  resume_sources:
    - gamepad_start_button
    - voice_command_resume
    - manual_reset_switch
  
  # Cascade actions (order of execution)
  cascade:
    1_cmd_vel_zero:
      priority: critical
      timeout_ms: 50
      topic: /cmd_vel
      message_type: Twist
    
    2_disable_autonomous:
      topic: /saltybot/autonomous_enabled
      message: false
    
    3_face_alert:
      topic: /saltybot/face/alert
      message: emergency_stop
    
    4_led_red:
      topic: /saltybot/led/color
      message: red
    
    5_tts_alert:
      topic: /saltybot/tts_say
      message: "Emergency stop activated. System halted."
  
  # Logging
  logging:
    directory: /home/seb/saltybot-data/estop
    snapshot_sensors:
      - imu
      - lidar
      - camera
    retention_days: 30
  
  # Safety constraints
  safety:
    cannot_override: true
    requires_manual_resume: true
    auto_disable_timeout_s: null  # Never auto-enable (manual only)
