Skip to content

Commit

Permalink
dev-api-v1.0.1 commit
Browse files Browse the repository at this point in the history
  • Loading branch information
asv-soft-u02 committed Jul 4, 2024
1 parent f8c7776 commit a00bd8c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 31 deletions.
8 changes: 4 additions & 4 deletions src/Asv.Drones.Gui.Api/CompatibilitySuppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids -->
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>CP0006</DiagnosticId>
<Target>M:Asv.Drones.Gui.Api.IMavlinkDevicesService.GetRsgaByFullId(System.UInt16)</Target>
<DiagnosticId>CP0007</DiagnosticId>
<Target>T:Asv.Drones.Gui.Api.HierarchicalStoreEntryViewModel</Target>
<Left>lib/net8.0/Asv.Drones.Gui.Api.dll</Left>
<Right>lib/net8.0/Asv.Drones.Gui.Api.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0006</DiagnosticId>
<Target>P:Asv.Drones.Gui.Api.IMavlinkDevicesService.RsgaDevices</Target>
<DiagnosticId>CP0007</DiagnosticId>
<Target>T:Asv.Drones.Gui.Api.HierarchicalStoreViewModel</Target>
<Left>lib/net8.0/Asv.Drones.Gui.Api.dll</Left>
<Right>lib/net8.0/Asv.Drones.Gui.Api.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ public interface IMavlinkDevicesService
IAdsbClientDevice? GetAdsbVehicleByFullId(ushort id);
IObservable<IChangeSet<IRfsaClientDevice, ushort>> RfsaDevices { get; }
IRfsaClientDevice? GetRfsaByFullId(ushort id);
IObservable<IChangeSet<IRsgaClientDevice, ushort>> RsgaDevices { get; }
IRsgaClientDevice? GetRsgaByFullId(ushort id);

}
}
1 change: 0 additions & 1 deletion src/Asv.Drones.Gui.Api/Services/Mavlink/MavlinkHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public static MaterialIconKind GetIcon(DeviceClass type)
DeviceClass.GbsRtk => MaterialIconKind.RouterWireless,
DeviceClass.Adsb => MaterialIconKind.Radar,
DeviceClass.Rfsa => MaterialIconKind.Waveform,
DeviceClass.Rsga => MaterialIconKind.CellphoneWireless,
_ => MaterialIconKind.HelpNetworkOutline,
};
}
Expand Down
22 changes: 0 additions & 22 deletions src/Asv.Drones.Gui/Services/Mavlink/MavlinkDevicesService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,11 @@ public MavlinkDevicesService(IConfiguration config, IPacketSequenceCalculator se
.Transform(CreateRfsaDevice)
.DisposeMany()
.RefCount();
RsgaDevices = Devices
.Filter(d => d.Type == (MavType)Mavlink.V2.AsvRsga.MavType.MavTypeAsvRsga)
.Transform(CreateRsgaDevice)
.DisposeMany()
.RefCount();

AllDevices = Vehicles.Transform(x => (IClientDevice)x)
.MergeChangeSets(BaseStations.Transform(x => (IClientDevice)x))
.MergeChangeSets(Payloads.Transform(x => (IClientDevice)x))
.MergeChangeSets(RfsaDevices.Transform(x => (IClientDevice)x))
.MergeChangeSets(RsgaDevices.Transform(x => (IClientDevice)x))
.MergeChangeSets(AdsbDevices.Transform(x => (IClientDevice)x));

#endregion
Expand All @@ -200,16 +194,6 @@ public MavlinkDevicesService(IConfiguration config, IPacketSequenceCalculator se



private IRsgaClientDevice CreateRsgaDevice(IMavlinkDevice device)
{
return new RsgaClientDevice(Router, new MavlinkClientIdentity
{
TargetSystemId = device.SystemId,
TargetComponentId = device.ComponentId,
SystemId = _systemId.Value,
ComponentId = _componentId.Value,
}, InternalGetConfig(c => c.Rsga), _sequenceCalculator, RxApp.MainThreadScheduler);
}
private IRfsaClientDevice CreateRfsaDevice(IMavlinkDevice device)
{
return new RfsaClientDevice(Router, new MavlinkClientIdentity
Expand Down Expand Up @@ -343,12 +327,6 @@ private string TryGetName(StatustextPacket pkt)
return list.Items.FirstOrDefault(d => d.FullId == id);
}

public IObservable<IChangeSet<IRsgaClientDevice, ushort>> RsgaDevices { get; }
public IRsgaClientDevice? GetRsgaByFullId(ushort id)
{
using var autoDispose = RsgaDevices.BindToObservableList(out var list).Subscribe();
return list.Items.FirstOrDefault(d => ((IClientDevice)d).FullId == id);
}

private IVehicleClient? CreateVehicle(IMavlinkDevice device)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project>
<PropertyGroup>
<ProductVersion>1.0.1</ProductVersion>
<ApiVersion>1.0.1</ApiVersion>
<ApiVersion>1.0.0-dev</ApiVersion>
<ApiPrevVersion>1.0.0</ApiPrevVersion>
<AvaloniaVersion>11.0.6</AvaloniaVersion>
<AsvCommonVersion>2.0.2</AsvCommonVersion>
<AsvAvaloniaToolkitVersion>1.0.1</AsvAvaloniaToolkitVersion>
<AsvAvaloniaMapVersion>2.0.5</AsvAvaloniaMapVersion>
<AsvMavlinkVersion>3.10.0</AsvMavlinkVersion>
<AsvMavlinkVersion>3.9.3-dev</AsvMavlinkVersion>
<FluentAvaloniaUIVersion>2.0.5</FluentAvaloniaUIVersion>
<ReactiveUIVersion>19.5.41</ReactiveUIVersion>
<SystemReactiveVersion>6.0.0</SystemReactiveVersion>
Expand Down

0 comments on commit a00bd8c

Please sign in to comment.