Skip to content

Commit

Permalink
fix: telemetry logger null reference
Browse files Browse the repository at this point in the history
  • Loading branch information
asvol committed Dec 7, 2024
1 parent 4624c85 commit ecd42a8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Asv.Common;
using Asv.Mavlink.V2.Common;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using ZLogger;

namespace Asv.Mavlink
Expand Down Expand Up @@ -120,6 +121,7 @@ public TelemetryClient(
ILogger? logger = null)
: base("RTT", connection, identity, seq,scheduler,logger)
{
_logger = logger ?? NullLogger.Instance;
_radio = new RxValue<RadioStatusPayload>().DisposeItWith(Disposable);
InternalFilter<RadioStatusPacket>().Select(p=>p.Payload).Subscribe(_radio).DisposeItWith(Disposable);
_systemStatus = new RxValue<SysStatusPayload>().DisposeItWith(Disposable);
Expand Down

0 comments on commit ecd42a8

Please sign in to comment.