Skip to content

Commit

Permalink
Update version to 1.0.1 (#321)
Browse files Browse the repository at this point in the history
* feat: add "Save as" button

* Create Build for Windows

Asana: https://app.asana.com/0/1206009821057985/1207478687634539/f

* Change executable workflow

* feat(planning): refactor mission saving logic and clean up code

Streamline the mission saving implementation in PlaningMissionSavingBrowserViewModel by removing unneeded code and improving readability. Minimized property visibility where not necessary, and removed unused imports within different files across the project. Also, cleaned up CompatibilitySuppressions.xml by removing redundant suppressions.

Asana: https://app.asana.com/0/1203851531040615/1207411924258622/f

* feat (planning): update file and mission naming mechanism

Removed hard-coded watermark from TextBox in 'PlaningMissionSavingBrowserView.axaml'. Adapted "FileName" and "Name" properties in 'PlaningMissionSavingBrowserViewModel.cs' and 'PlaningMissionViewModel.cs' to accept null. Edited the instantiation of 'PlaningMissionSavingBrowserViewModel' in 'PlaningPageViewModel.cs' to include the current mission name.

Asana: https://app.asana.com/0/1203851531040615/1207411924258622/f

* feat(api): update API version and remove NLog dependency

The API version has been updated from 0.3.2 to 0.3.3. Also, some other version upgrades have been carried out, such as AsvCommonVersion and AsvMavlinkVersion. Furthermore, the NLog dependency has been removed from the project Asv.Drones.Gui.

* feat(api-mavlink): update mavlink nuget;add RFSA device

* feat(actions): release action (#303)

Add release action for new version

* feat(plugins): update plugins to include API version compatibility check

Updated the plugin system to support API version compatibility. All plugins are now required to specify their API version, which is then checked for compatibility with the application's API version. If the versions do not match, the plugin will not be loaded. The API version has also been added to the application version display for transparency.

* fix: Update GetRfsaByFullId method return type and source

Renamed the return type of GetRfsaByFullId method from IAdsbClientDevice to IRfsaClientDevice in MavlinkDevicesService class. The data source was also shifted from AdsbDevices to RfsaDevices, and the associated DiagnosticId was adjusted consequently in CompatibilitySuppressions.xml.

* fix: Update API version to 0.3.6

In Directory.Build.props, the API version was updated from 0.3.5 to 0.3.6. The previous API version was also adjusted accordingly, from 0.3.4 to 0.3.5.

* fix: Include RfsaDevices in AllDevices and update suppressions file

In the MavlinkDevicesService, it now includes RfsaDevices in the AllDevices merge. Moreover, certain suppressions related to ApiVersion in the CompatibilitySuppressions.xml for Asv.Drones.Gui.Api have been removed.

* feat: Add RFSA device class in MavlinkHelper

The commit introduces a new device class, RFSA, in the MavlinkHelper. It maps the new RFSA class to a specific icon (Waveform). The default icon was also updated to 'HelpNetworkOutline' for any device class not explicitly defined.

* feat: add default app.args file

* feat: Update visibility binding and enhance logging

The code updates have reorganized the compile instruction order for 'RS.Designer.cs' in the project file. The ScrollViewer's visibility binding in the MapPageView is now dependent on 'LeftWidgets' and 'RightWidgets' count. Borders visibility binding is now dependent on 'BottomWidgets' and 'MapActions' count, improving UI responsiveness.
A 'CatchToLog' method has also been added to ReactiveCommand in the logging service, enhancing error handling by directing thrown exceptions to the log.

* fix(anchor editor): add icon margin in actions (#305)

asana: https://app.asana.com/0/1203851531040615/1207643849991134/f

* fix(Uav): move the mode button (#306)

asana: https://app.asana.com/0/1203851531040615/1207643849991144/f

* fix(uav): refactor MissionStatusView layout and FlightUavView (#309)

asana: https://app.asana.com/0/1203851531040615/1207643986818660/f
https://app.asana.com/0/1203851531040615/1207654116236034/f

* fix(log-service): add filters to different levels of errors according to Nlog documentation. Add Logger message save (#308)

Asana: https://app.asana.com/0/1206009821057985/1207643849991142/f

* fix(uav): fix MissionStatusView margin (#312)

asana: https://app.asana.com/0/1206118975886649/1207674317434296/f

* Fix size optimization and ArgumentNullException in AnchorEditor widget (#310)

* fix(anchor-editor): descending sorting of uav actions

Asana: https://app.asana.com/0/1203851531040615/1207643849991138/f

* fix(anchor-editor): check actions collections for null to avoid ArgumentNullException

Asana: https://app.asana.com/0/1203851531040615/1207664866852418/f

* fix(anchor-editor): actions size-optimization with more short locales

Asana: https://app.asana.com/0/1203851531040615/1207643849991138/f

* fix(anchor-editor): add scrolls to actions and coordinates part of widget

Asana: https://app.asana.com/0/1203851531040615/1207654116236041/f

* fix(anchor-editor): short locales to reboot/shutdown action

Asana: https://app.asana.com/0/1203851531040615/1207643849991138/f

* fix(anchor-editor): better flyout menu style and refactor scroll viewers

Asana: https://app.asana.com/0/1203851531040615/1207654116236041/f

* fix(anchor-editor): update layout and visual changes in AnchorsEditorView

Reduced the width of the second column in the Grid from 10 to 2. The Border element was replaced with a Rectangle for better visual clarity. Minor adjustments were made to clean up the code format, maintaining consistency in layout and improving overall readability.

Asana: https://app.asana.com/0/1203851531040615/1207654116236041/f

* fix(anchor-editor): fix actions collection sharing when selected item changed, fix localization and anchor title layout

Asana: https://app.asana.com/0/1203851531040615/1207654116236041/f

* fix(anchor-editor): update AnchorsEditorView layout properties

The properties of TextBlock and Rectangle in the AnchorsEditorView file have been revised. Specifically, the TextBlock has been assigned a name "ActionsTextBlock". Additionally, the fill color of the rectangle now relies on the foreground of ActionsTextBlock, ensuring better UI consistency.

Asana: https://app.asana.com/0/1203851531040615/1207654116236041/f

---------

Co-authored-by: u01 <[email protected]>

* fix(hierarchical-store): add scroll viewer at list of tasks (#311)

* fix(hierarchical-store): add scroll viewer at list of tasks

Asana: https://app.asana.com/0/1203851531040615/1207644963134958/f

* fix(hierarchical-store): more height to list of tasks to reduce empty space

Asana: https://app.asana.com/0/1203851531040615/1207644963134958/f

* fix: progress bar (#313)

Asana: https://app.asana.com/0/1203851531040615/1207644963134966/f

* feat: update API and product version to 1.0.0

The commit adds Asv.Avalonia.Toolkit as a reference in both Asv.Drones.Gui.Api and Asv.Drones.Gui projects. It also changes the "CopyToOutputDirectory" property of "app.args" to "Never". The version numbers for Product, API, and various dependencies have been upgraded to 1.0.0 in Directory.Build.props file.

* feat: add api release action for GitHub+Nuget and GitHub only (#315)

Asana: https://app.asana.com/0/1203851531040615/1207693167811054/f

* feat: add support for Rsga devices

Added functionality for Rsga devices in the Mavlink helper and devices service. This includes methods to get Rsga device by ID and observe changes on Rsga devices. Also updated the project to use the upgraded Mavlink version 3.10.0 and target framework net8.0.

---------

Co-authored-by: etogood <[email protected]>
Co-authored-by: Eugene <[email protected]>
Co-authored-by: Alexey <[email protected]>
Co-authored-by: Maxim <[email protected]>
Co-authored-by: Lev <[email protected]>
  • Loading branch information
6 people authored Jul 8, 2024
1 parent 437423a commit 49eca7f
Show file tree
Hide file tree
Showing 9 changed files with 124 additions and 32 deletions.
44 changes: 20 additions & 24 deletions .github/workflows/ApiReleaseDeployAction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on:
tags:
- "api-v*"

env:
NUGET_SOURCE_URL: 'https://api.nuget.org/v3/index.json'
GITHUB_PACKAGES_URL: 'https://nuget.pkg.github.com/asv-soft/index.json'
PROJECT_NAME: 'Asv.Drones.Gui.Api'
PROPS_VERSION_VAR_NAME: 'ApiVersion'

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -18,29 +24,14 @@ jobs:
with:
dotnet-version: '8.0.x'

- name: Setup NuGet config
env:
NUGET_USERNAME: ${{ secrets.USER_NAME }}
NUGET_PASSWORD: ${{ secrets.GIHUB_NUGET_AUTH_TOKEN }}
run: |
echo "<configuration>" > nuget.config
echo "<packageSources>" >> nuget.config
echo "<add key=\"nuget.org\" value=\"https://api.nuget.org/v3/index.json\" protocolVersion=\"3\" />" >> nuget.config
echo "<add key=\"asv\" value=\"https://nuget.pkg.github.com/asv-soft/index.json\" />" >> nuget.config
echo "</packageSources>" >> nuget.config
echo "<packageSourceCredentials>" >> nuget.config
echo "<asv>" >> nuget.config
echo "<add key=\"Username\" value=\"$NUGET_USERNAME\" />" >> nuget.config
echo "<add key=\"ClearTextPassword\" value=\"$NUGET_PASSWORD\" />" >> nuget.config
echo "</asv>" >> nuget.config
echo "</packageSourceCredentials>" >> nuget.config
echo "</configuration>" >> nuget.config
- name: Add NuGet source
run: dotnet nuget add source ${{ env.GITHUB_PACKAGES_URL }} \--username '${{secrets.USER_NAME}}' \--password '${{secrets.GIHUB_NUGET_AUTH_TOKEN}}' \--store-password-in-clear-text

- name: Install dependencies
run: dotnet restore ./src/Asv.Drones.Gui.Api/Asv.Drones.Gui.Api.csproj
run: dotnet restore ./src/${{env.PROJECT_NAME}}/${{env.PROJECT_NAME}}.csproj

- name: Build
run: dotnet build ./src/Asv.Drones.Gui.Api/Asv.Drones.Gui.Api.csproj --configuration Release --no-restore
run: dotnet build ./src/${{env.PROJECT_NAME}}/${{env.PROJECT_NAME}}.csproj --configuration Release --no-restore

- name: Set version variable
env:
Expand All @@ -49,20 +40,25 @@ jobs:

- name: Read version from Directory.Build.props
id: read-version
run: echo "::set-output name=version::$(grep -oP '<ApiVersion>\K[^<]+' ./src/Directory.Build.props)"

run: |
version=$(grep -oP '<${{env.PROPS_VERSION_VAR_NAME}}>\K[^<]+' ./src/Directory.Build.props)
echo "PropsVersion=${version}" >> $GITHUB_ENV
- name: Compare tag with NuGet package version
run: |
if [ "${{ steps.read-version.outputs.version }}" != "${{ env.VERSION }}" ]; then
if [ "${{ env.PropsVersion }}" != "${{ env.VERSION }}" ]; then
echo "Error: Tag does not match NuGet package version"
exit 1
fi
- name: Pack package
run: dotnet pack ./src/Asv.Drones.Gui.Api/Asv.Drones.Gui.Api.csproj -c Release /p:Version=${VERSION} --no-build -o .
run: dotnet pack ./src/${{env.PROJECT_NAME}}/${{env.PROJECT_NAME}}.csproj -c Release /p:Version=${VERSION} --no-build -o .

- name: List output files
run: ls -la

- name: Push package to GitHub
run: dotnet nuget push Asv.Drones.Gui.Api.${VERSION}.nupkg --api-key ${{ secrets.GIHUB_NUGET_AUTH_TOKEN }} --skip-duplicate --source "https://nuget.pkg.github.com/asv-soft/index.json"
run: dotnet nuget push ${{env.PROJECT_NAME}}.${VERSION}.nupkg --api-key ${{ secrets.GIHUB_NUGET_AUTH_TOKEN }} --skip-duplicate --source ${{ env.GITHUB_PACKAGES_URL }}

- name: Push package to Nuget
run: dotnet nuget push ${{env.PROJECT_NAME}}.${VERSION}.nupkg --api-key ${{ secrets.NUGET_AUTH_TOKEN }} --skip-duplicate --source ${{ env.NUGET_SOURCE_URL }}
63 changes: 63 additions & 0 deletions .github/workflows/ApiReleaseDeployActionGitHubOnly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Build and Publish Api Github only

on:
push:
tags:
- "dev-api-v*"

env:
GITHUB_PACKAGES_URL: 'https://nuget.pkg.github.com/asv-soft/index.json'
PROJECT_NAME: 'Asv.Drones.Gui.Api'
PROPS_VERSION_VAR_NAME: 'ApiVersion'

jobs:
build:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/dev-api-v')
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'

- name: Add NuGet source
run: dotnet nuget add source ${{ env.GITHUB_PACKAGES_URL }} \--username '${{secrets.USER_NAME}}' \--password '${{secrets.GIHUB_NUGET_AUTH_TOKEN}}' \--store-password-in-clear-text

- name: Install dependencies
run: dotnet restore ./src/${{env.PROJECT_NAME}}/${{env.PROJECT_NAME}}.csproj

- name: Build
run: dotnet build ./src/${{env.PROJECT_NAME}}/${{env.PROJECT_NAME}}.csproj --configuration Release --no-restore

- name: Set version variable
env:
TAG: ${{ github.ref_name }}
run: |
newTag=$(echo $TAG | sed 's/dev-api-v//')
newTag="${newTag}-dev"
echo "VERSION=${newTag}" >> $GITHUB_ENV
- name: Read version from Directory.Build.props
id: read-version
run: |
version=$(grep -oP '<${{env.PROPS_VERSION_VAR_NAME}}>\K[^<]+' ./src/Directory.Build.props)
echo "PropsVersion=${version}" >> $GITHUB_ENV
- name: Compare tag with NuGet package version
run: |
if [ "${{ env.PropsVersion }}-dev" != "${{ env.VERSION }}" ]; then
echo "Error: Tag does not match NuGet package version"
exit 1
fi
- name: Pack package
run: dotnet pack ./src/${{env.PROJECT_NAME}}/${{env.PROJECT_NAME}}.csproj -c Release /p:Version=${VERSION} --no-build -o .

- name: List output files
run: ls -la

- name: Push package to GitHub
run: dotnet nuget push ${{env.PROJECT_NAME}}.${VERSION}.nupkg --api-key ${{ secrets.GIHUB_NUGET_AUTH_TOKEN }} --skip-duplicate --source ${{ env.GITHUB_PACKAGES_URL }}
2 changes: 1 addition & 1 deletion src/.run/Linux-arm64.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Linux-arm64" type="DotNetFolderPublish" factoryName="Publish to folder">
<riderPublish configuration="Release" delete_existing_files="true" include_native_libs_for_self_extract="true" platform="Any CPU" produce_single_file="true" runtime="linux-arm64" self_contained="true" target_folder="$PROJECT_DIR$/../publish/linux-arm64/app" target_framework="net7.0" uuid_high="-6069974389149972757" uuid_low="-5498245974063364756" />
<riderPublish configuration="Release" delete_existing_files="true" include_native_libs_for_self_extract="true" platform="Any CPU" produce_single_file="true" runtime="linux-arm64" self_contained="true" target_folder="$PROJECT_DIR$/../publish/linux-arm64/app" target_framework="net8.0" uuid_high="-6069974389149972757" uuid_low="-5498245974063364756" />
<method v="2" />
</configuration>
</component>
1 change: 0 additions & 1 deletion src/Asv.Drones.Gui.Api/Asv.Drones.Gui.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<Description>API reference for Asv.Drones GUI application</Description>
<Copyright>https://github.com/asv-soft</Copyright>
<EnablePackageValidation>true</EnablePackageValidation>
<PackageVersion>$(ApiVersion)</PackageVersion>
<ApiCompatGenerateSuppressionFile>true</ApiCompatGenerateSuppressionFile>
<PackageValidationBaselineVersion>$(ApiPrevVersion)</PackageValidationBaselineVersion>

Expand Down
9 changes: 8 additions & 1 deletion src/Asv.Drones.Gui.Api/CompatibilitySuppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@
</Suppression>
<Suppression>
<DiagnosticId>CP0006</DiagnosticId>
<Target>M:Asv.Drones.Gui.Api.IMavlinkDevicesService.GetRfsaByFullId(System.UInt16)</Target>
<Target>M:Asv.Drones.Gui.Api.IMavlinkDevicesService.GetRsgaByFullId(System.UInt16)</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>
<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,5 +62,7 @@ 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: 1 addition & 0 deletions src/Asv.Drones.Gui.Api/Services/Mavlink/MavlinkHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ 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
26 changes: 25 additions & 1 deletion src/Asv.Drones.Gui/Services/Mavlink/MavlinkDevicesService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class MavlinkDeviceServiceConfig
public AdsbClientDeviceConfig Adsb { get; set; } = new();
public bool WrapToV2ExtensionEnabled { get; set; } = true;
public RfsaClientDeviceConfig Rfsa { get; set; } = new();
public RfsaClientDeviceConfig Rsga { get; set; } = new();
}

[Export(typeof(IMavlinkDevicesService))]
Expand Down Expand Up @@ -163,11 +164,17 @@ 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 @@ -191,6 +198,16 @@ public MavlinkDevicesService(IConfiguration config, IPacketSequenceCalculator se
#endregion
}

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 @@ -323,7 +340,14 @@ private string TryGetName(StatustextPacket pkt)
using var autoDispose = RfsaDevices.BindToObservableList(out var list).Subscribe();
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)
{
//if (device.Autopilot == MavAutopilot.MavAutopilotArdupilotmega)
Expand Down
8 changes: 4 additions & 4 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project>
<PropertyGroup>
<ProductVersion>1.0.0</ProductVersion>
<ApiVersion>1.0.0</ApiVersion>
<ApiPrevVersion>0.3.6</ApiPrevVersion>
<ProductVersion>1.0.1</ProductVersion>
<ApiVersion>1.0.1</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.9.2</AsvMavlinkVersion>
<AsvMavlinkVersion>3.10.0</AsvMavlinkVersion>
<FluentAvaloniaUIVersion>2.0.5</FluentAvaloniaUIVersion>
<ReactiveUIVersion>19.5.41</ReactiveUIVersion>
<SystemReactiveVersion>6.0.0</SystemReactiveVersion>
Expand Down

0 comments on commit 49eca7f

Please sign in to comment.