5757#endif
5858
5959void LogBroadcastOutputMessageColor (const std::shared_ptr<const NavMsg>& msg,
60- const std::string& stream_name,
61- NavmsgStatus ns, NmeaLog& nmea_log) {
62- if (nmea_log.IsActive ()) {
63- ns.direction = NavmsgStatus::Direction::kOutput ;
64- Logline ll (msg, ns, stream_name);
65- nmea_log.Add (ll);
66- }
60+ NavmsgStatus ns, NmeaLog& nmea_log) {
61+ if (nmea_log.IsActive ()) {
62+ ns.direction = NavmsgStatus::Direction::kOutput ;
63+ Logline ll (msg, ns);
64+ nmea_log.Add (ll);
65+ }
6766}
6867
6968void BroadcastNMEA0183Message (const wxString& msg, NmeaLog& nmea_log,
@@ -108,8 +107,7 @@ void BroadcastNMEA0183Message(const wxString& msg, NmeaLog& nmea_log,
108107 } else {
109108 ns.accepted = NavmsgStatus::Accepted::kFilteredDropped ;
110109 }
111- LogBroadcastOutputMessageColor (
112- msg_out, params.GetDSPort ().ToStdString (), ns, nmea_log);
110+ LogBroadcastOutputMessageColor (msg_out, ns, nmea_log);
113111 }
114112 }
115113 }
@@ -486,7 +484,8 @@ int SendRouteToGPS_N0183(Route* pr, const wxString& com_name,
486484 } else
487485
488486 {
489- auto address = std::make_shared<NavAddr>();
487+ auto address =
488+ std::make_shared<NavAddr>(NavAddr::Bus::N0183, drv_n0183->iface );
490489 SENTENCE snt;
491490 NMEA0183 oNMEA0183 (NmeaCtxFactory ());
492491 oNMEA0183.TalkerID = _T ( " EC" );
@@ -572,7 +571,7 @@ int SendRouteToGPS_N0183(Route* pr, const wxString& com_name,
572571
573572 NavmsgStatus ns;
574573 ns.direction = NavmsgStatus::Direction::kOutput ;
575- multiplexer.LogOutputMessage (msg_out, com_name. ToStdString (), ns);
574+ multiplexer.LogOutputMessage (msg_out, ns);
576575 auto msg =
577576 wxString (" -->GPS Port: " ) + com_name + " Sentence: " + snt.Sentence ;
578577 msg.Trim ();
@@ -780,7 +779,7 @@ int SendRouteToGPS_N0183(Route* pr, const wxString& com_name,
780779
781780 NavmsgStatus ns;
782781 ns.direction = NavmsgStatus::Direction::kOutput ;
783- multiplexer.LogOutputMessage (msg_out, com_name. ToStdString (), ns);
782+ multiplexer.LogOutputMessage (msg_out, ns);
784783 wxYield ();
785784
786785 // LogOutputMessage(sentence, dstr->GetPort(), false);
@@ -799,7 +798,7 @@ int SendRouteToGPS_N0183(Route* pr, const wxString& com_name,
799798
800799 NavmsgStatus ns;
801800 ns.direction = NavmsgStatus::Direction::kOutput ;
802- multiplexer.LogOutputMessage (msg_out, com_name. ToStdString (), ns);
801+ multiplexer.LogOutputMessage (msg_out, ns);
803802 wxYield ();
804803
805804 auto msg =
@@ -823,7 +822,7 @@ int SendRouteToGPS_N0183(Route* pr, const wxString& com_name,
823822 drv_n0183->SendMessage (msg_out, address);
824823 NavmsgStatus ns;
825824 ns.direction = NavmsgStatus::Direction::kOutput ;
826- multiplexer.LogOutputMessage (msg_out, com_name. ToStdString (), ns);
825+ multiplexer.LogOutputMessage (msg_out, ns);
827826
828827 auto msg = wxString (" -->GPS Port:" ) + com_name + " Sentence: " + rte;
829828 msg.Trim ();
@@ -838,7 +837,7 @@ int SendRouteToGPS_N0183(Route* pr, const wxString& com_name,
838837
839838 ns = NavmsgStatus ();
840839 ns.direction = NavmsgStatus::Direction::kOutput ;
841- multiplexer.LogOutputMessage (msg_outf, com_name. ToStdString (), ns);
840+ multiplexer.LogOutputMessage (msg_outf, ns);
842841
843842 msg = wxString (" -->GPS Port:" ) + com_name + " Sentence: " + term;
844843 msg.Trim ();
@@ -1039,7 +1038,7 @@ int SendWaypointToGPS_N0183(RoutePoint* prp, const wxString& com_name,
10391038
10401039 NavmsgStatus ns;
10411040 ns.direction = NavmsgStatus::Direction::kOutput ;
1042- multiplexer.LogOutputMessage (msg_out, com_name. ToStdString (), ns);
1041+ multiplexer.LogOutputMessage (msg_out, ns);
10431042 auto msg = wxString (" -->GPS Port:" ) + com_name + " Sentence: " ;
10441043 msg.Trim ();
10451044 wxLogMessage (msg);
0 commit comments