// =============================================================================
//  protocols/nmea2000_publisher.h -- NMEA 2000 publisher (Sprint 6)
// =============================================================================
//
//  Publishes autopilot state onto the NMEA 2000 backbone so other instruments
//  (chartplotters, VHF, AIS) can see what the autopilot is doing.
//
//  PGN 127245 -- Rudder angle (actual measured rudder position)
//    Broadcast at 10 Hz so chartplotters and other displays can render a
//    rudder indicator.
//
//  PGN 127237 -- Heading Track Control
//    Broadcast at 1 Hz. Tells the network: which mode is engaged, the
//    commanded heading, and the current COG. Chartplotters use this to
//    draw the track line and to know whether to suppress their own helm
//    commands.
//
//  Both messages are sent on the same NMEA2000 stack object that the consumer
//  uses (global `NMEA2000` instance from NMEA2000_CAN.h). The publisher runs
//  as a low-priority periodic task on Core 0 (comms core).
// =============================================================================

#pragma once

namespace arautopilot::protocols::nmea2000 {

/// Start the NMEA 2000 publisher task.
/// Must be called AFTER nmea2000_consumer_init() (shares the same CAN stack).
void nmea2000_publisher_start_task();

}  // namespace arautopilot::protocols::nmea2000
