Skip to content

Commit 437423a

Browse files
asv-soft-u01asv-soft-u03asvolasv-soft-u04asv-soft-u05
authored
feat: update API and product version to 1.0.0 (#314)
* 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. --------- Co-authored-by: Ilya<[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]>
1 parent 05ad55a commit 437423a

File tree

67 files changed

+1147
-444
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1147
-444
lines changed

.github/workflows/BuildForWindows.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
jobs:
8+
build-and-release:
9+
runs-on: windows-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v3
13+
14+
- name: Setup .NET
15+
uses: actions/setup-dotnet@v1
16+
with:
17+
dotnet-version: 8.0.x
18+
19+
- name: Add NuGet source
20+
env:
21+
NUGET_USERNAME: ${{ secrets.USER_NAME }}
22+
NUGET_PASSWORD: ${{ secrets.GIHUB_NUGET_AUTH_TOKEN }}
23+
run: |
24+
echo "<configuration>" > nuget.config
25+
echo "<packageSources>" >> nuget.config
26+
echo '<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />' >> nuget.config
27+
echo '<add key="asv" value="https://nuget.pkg.github.com/asv-soft/index.json" />' >> nuget.config
28+
echo "</packageSources>" >> nuget.config
29+
echo "<packageSourceCredentials>" >> nuget.config
30+
echo "<asv>" >> nuget.config
31+
echo '<add key="Username" value="'${{ secrets.USER_NAME }}'" />' >> nuget.config
32+
echo '<add key="ClearTextPassword" value="'${{ secrets.GIHUB_NUGET_AUTH_TOKEN }}'" />' >> nuget.config
33+
echo "</asv>" >> nuget.config
34+
echo "</packageSourceCredentials>" >> nuget.config
35+
echo "</configuration>" >> nuget.config
36+
37+
- name: Install dependencies
38+
run: |
39+
dotnet restore ./src/Asv.Drones.Gui.Api/Asv.Drones.Gui.Api.csproj
40+
dotnet restore ./src/Asv.Drones.Gui/Asv.Drones.Gui.csproj
41+
dotnet restore ./src/Asv.Drones.Gui.Desktop/Asv.Drones.Gui.Desktop.csproj
42+
43+
- name: Build
44+
run: |
45+
dotnet build ./src/Asv.Drones.Gui.Api/Asv.Drones.Gui.Api.csproj --configuration Release --no-restore
46+
dotnet build ./src/Asv.Drones.Gui/Asv.Drones.Gui.csproj --configuration Release --no-restore
47+
dotnet build ./src/Asv.Drones.Gui.Desktop/Asv.Drones.Gui.Desktop.csproj --configuration Release --no-restore
48+
49+
- name: Set version variable
50+
env:
51+
TAG: ${{ github.ref_name }}
52+
run: echo "VERSION=${TAG#v}" >> $GITHUB_ENV
53+
54+
55+
# here you must define path to your .csproj
56+
- name: Publish project for installer
57+
run: dotnet publish ./src/Asv.Drones.Gui.Desktop/Asv.Drones.Gui.Desktop.csproj -c Release -o ./publish/app
58+
59+
- name: Install NSIS
60+
run: |
61+
choco install nsis
62+
63+
#here you must define path to your .nsi file (it is used for installer setup and creation)
64+
- name: Create EXE installer
65+
run: makensis ./win-64-install.nsi
66+
67+
- name: List output files
68+
run: Get-ChildItem -Path ./publish/app -Force
69+
70+
- name: Create Release
71+
id: create_release
72+
uses: actions/create-release@v1
73+
env:
74+
GITHUB_TOKEN: ${{ secrets.GIHUB_NUGET_AUTH_TOKEN }}
75+
RELEASE_BODY: ${{ steps.create-release-notes.outputs.release-notes }}
76+
with:
77+
tag_name: ${{ github.ref }}
78+
release_name: Release ${{ github.ref }}
79+
draft: false
80+
prerelease: ${{ contains(github.ref, 'alpha') }}
81+
82+
83+
- name: Upload Release Asset
84+
uses: actions/upload-release-asset@v1
85+
env:
86+
GITHUB_TOKEN: ${{ secrets.GIHUB_NUGET_AUTH_TOKEN }}
87+
with:
88+
upload_url: ${{ steps.create_release.outputs.upload_url }}
89+
asset_path: ./AsvDronesGuiInstaller.exe
90+
asset_name: asv-drones-${{ github.ref_name }}-setup-windows-64.exe
91+
asset_content_type: application/vnd.microsoft.portable-executable

.github/workflows/ReleaseDeployAction.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/.run/Win-x64.run.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Win-x64" type="DotNetFolderPublish" factoryName="Publish to folder">
3-
<riderPublish configuration="Release" delete_existing_files="true" include_native_libs_for_self_extract="true" platform="Any CPU" produce_single_file="true" runtime="win-x64" self_contained="true" target_folder="$PROJECT_DIR$/../publish/win-x64/app" target_framework="net7.0" uuid_high="-6069974389149972757" uuid_low="-5498245974063364756" />
3+
<riderPublish configuration="Release" delete_existing_files="true" include_native_libs_for_self_extract="true" platform="Any CPU" produce_single_file="true" runtime="win-x64" self_contained="true" target_folder="$PROJECT_DIR$/../publish/win-x64/app" target_framework="net8.0" uuid_high="-6069974389149972757" uuid_low="-5498245974063364756" />
44
<method v="2" />
55
</configuration>
66
</component>

src/Asv.Drones.Gui.Api/Asv.Drones.Gui.Api.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,9 @@
8181
<AdditionalFiles Include="Tools\Controls\Params\ParamItemView.axaml"/>
8282
<AdditionalFiles Include="Tools\Controls\Params\ParamPageView.axaml"/>
8383
</ItemGroup>
84+
<ItemGroup>
85+
<Reference Include="Asv.Avalonia.Toolkit">
86+
<HintPath>..\..\..\..\Users\Havok\.nuget\packages\asv.avalonia.toolkit\0.1.7\lib\net8.0\Asv.Avalonia.Toolkit.dll</HintPath>
87+
</Reference>
88+
</ItemGroup>
8489
</Project>

src/Asv.Drones.Gui.Api/CompatibilitySuppressions.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids -->
33
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
4+
<Suppression>
5+
<DiagnosticId>CP0002</DiagnosticId>
6+
<Target>M:Asv.Drones.Gui.Api.IMavlinkDevicesService.GetRfsaByFullId(System.UInt16)</Target>
7+
<Left>lib/net8.0/Asv.Drones.Gui.Api.dll</Left>
8+
<Right>lib/net8.0/Asv.Drones.Gui.Api.dll</Right>
9+
<IsBaselineSuppression>true</IsBaselineSuppression>
10+
</Suppression>
411
<Suppression>
512
<DiagnosticId>CP0006</DiagnosticId>
6-
<Target>P:Asv.Drones.Gui.Api.ILocalizationService.Accuracy</Target>
13+
<Target>M:Asv.Drones.Gui.Api.IMavlinkDevicesService.GetRfsaByFullId(System.UInt16)</Target>
714
<Left>lib/net8.0/Asv.Drones.Gui.Api.dll</Left>
815
<Right>lib/net8.0/Asv.Drones.Gui.Api.dll</Right>
916
<IsBaselineSuppression>true</IsBaselineSuppression>

src/Asv.Drones.Gui.Api/RS.Designer.cs

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Asv.Drones.Gui.Api/RS.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,4 +190,7 @@
190190
<data name="Anchor_Editor_Action_Paste" xml:space="preserve">
191191
<value>Paste</value>
192192
</data>
193+
<data name="AnchorsEditorView_TextBlock_Actions" xml:space="preserve">
194+
<value>Actions</value>
195+
</data>
193196
</root>

src/Asv.Drones.Gui.Api/RS.ru.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,4 +186,7 @@
186186
<data name="Anchor_Editor_Action_Paste" xml:space="preserve">
187187
<value>Вставить</value>
188188
</data>
189+
<data name="AnchorsEditorView_TextBlock_Actions" xml:space="preserve">
190+
<value>Действия</value>
191+
</data>
189192
</root>

src/Asv.Drones.Gui.Api/Services/LogService/ILogService.cs

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,36 @@
1+
using ReactiveUI;
2+
13
namespace Asv.Drones.Gui.Api;
24

5+
public static class LogHelper
6+
{
7+
public static IDisposable CatchToLog<TParam, TResult>(this ReactiveCommand<TParam, TResult> cmd, ILogService log, string sender)
8+
{
9+
return cmd.ThrownExceptions.Subscribe(ex=>log.Error(sender, ex.Message,ex));
10+
}
11+
}
12+
13+
314
public interface ILogService
415
{
516
IObservable<LogMessage> OnMessage { get; }
617
void SaveMessage(LogMessage logMessage);
718
IEnumerable<LogItemViewModel> LoadItemsFromLogFile();
819
void DeleteLogFile();
920

21+
public IDisposable CatchToLog<TParam, TResult>( ReactiveCommand<TParam, TResult> cmd, string sender)
22+
{
23+
return cmd.ThrownExceptions.Subscribe(ex=>Error(sender, ex.Message,ex));
24+
}
25+
1026
public void Fatal(string sender, string message,
11-
Exception ex = default)
27+
Exception? ex = default)
1228
{
1329
SaveMessage(new LogMessage(DateTime.Now, LogMessageType.Fatal, sender, message, ex?.Message));
1430
}
1531

1632
public void Error(string sender, string message,
17-
Exception ex = default)
33+
Exception? ex = default)
1834
{
1935
SaveMessage(new LogMessage(DateTime.Now, LogMessageType.Error, sender, message, ex?.Message));
2036
}

src/Asv.Drones.Gui.Api/Services/Mavlink/IMavlinkDevicesService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,13 @@ public interface IMavlinkDevicesService
5454
/// <param name="id">Id of searched vehicle</param>
5555
/// <returns>Vehicle object</returns>
5656
IVehicleClient? GetVehicleByFullId(ushort id);
57-
5857
IObservable<IChangeSet<IGbsClientDevice, ushort>> BaseStations { get; }
5958
IGbsClientDevice? GetGbsByFullId(ushort id);
6059
IObservable<IChangeSet<ISdrClientDevice, ushort>> Payloads { get; }
6160
ISdrClientDevice? GetPayloadsByFullId(ushort id);
6261
IObservable<IChangeSet<IAdsbClientDevice, ushort>> AdsbDevices { get; }
6362
IAdsbClientDevice? GetAdsbVehicleByFullId(ushort id);
63+
IObservable<IChangeSet<IRfsaClientDevice, ushort>> RfsaDevices { get; }
64+
IRfsaClientDevice? GetRfsaByFullId(ushort id);
6465
}
6566
}

0 commit comments

Comments
 (0)