Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 0.5.0 #300

Merged
merged 54 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
a412db7
fix: remove intermediate mission element enum, use standard command t…
asv-soft-u02 Jan 29, 2024
da8efc3
fix(asv-drones): update download code, mission elements handling
asv-soft-u02 Jan 31, 2024
ff7d1aa
feat(asv-drones): implement right-click handling for "ShowTargetDialog"
asv-soft-u02 Jan 31, 2024
b7beeae
Merge branch 'develop' into hotfix/rmb-show-target-dialog
asv-soft-u02 Feb 1, 2024
c6e69a8
fix: Merge develop after merging main
asv-soft-u02 Feb 1, 2024
7053a35
fix(asv-drones): adjust vibration threshold values, normalize to 0-10…
asv-soft-u02 Feb 1, 2024
e71659f
Merge pull request #277 from asv-soft/hotfix/mission-planing-unknown-…
asv-soft-u01 Feb 2, 2024
91a2bf5
fix: merge develop
asv-soft-u02 Feb 2, 2024
40c4bd9
Merge pull request #278
asv-soft-u01 Feb 2, 2024
395bfb3
Merge pull request #279
asv-soft-u01 Feb 2, 2024
63068c2
fix (core): add deselect behaviour for map anchors
asv-soft-u01 Feb 2, 2024
82a7c1d
Merge pull request #280 from asv-soft/hotfix/fix-selected-anchor-beha…
asv-soft-u01 Feb 2, 2024
7d77a63
feat(asv-drones): remove browser platform
asv-soft-u04 Feb 7, 2024
9803193
Merge pull request #281 from asv-soft/feature/remove-browser-platform
asv-soft-u01 Feb 7, 2024
79b599e
fix(asv-drones): fix mica effect
asv-soft-u04 Feb 12, 2024
4990ab9
Merge pull request #282 from asv-soft/feature/fix-mica-effect
asv-soft-u01 Feb 12, 2024
1d969c2
fix(asv-drones): fix redundant object of type MainWindow creation and…
asv-soft-u03 Feb 18, 2024
86c9460
Merge pull request #288 from asv-soft/fix/redundant-mainwindow-creation
asv-soft-u01 Feb 19, 2024
d0695da
hotfix: fix ruler off on left mouse button
asv-soft-u03 Feb 19, 2024
7f932e8
Merge pull request #289 from asv-soft/hotfix/setup-ruler-bug
asv-soft-u01 Feb 20, 2024
788aa74
feat: BREAKING CHANGES!!!
asv-soft-u01 May 13, 2024
9e678cc
Merge pull request #290 from asv-soft/feature/update-to-new-version
asv-soft-u01 May 15, 2024
ba7ed3b
feat (asv-drones) add packet loss simulation
BR7RKR May 14, 2024
bea4147
Merge pull request #291 from asv-soft/feature/packet-loss-simulation
asv-soft-u01 May 15, 2024
3d4d998
feat(mover): remove hotkey from MapMoverActionView
asv-soft-u04 May 16, 2024
6f71ae5
Merge pull request #292 from asv-soft/feature/remove-hotkey-from-MapM…
asv-soft-u01 May 17, 2024
370eb40
feat: add app args from 'app.args' file or command line
asvol May 19, 2024
4925159
Merge pull request #293 from asv-soft/feature/parse_args
asvol May 19, 2024
8295c57
feat: update mavlink nuget
asvol May 19, 2024
a6d7e4c
feat: add api scripts for build and publish
asvol May 19, 2024
39cbbe9
fix: publish script
asvol May 19, 2024
842a9f3
feat(planning): Change the size of Anchors proportional to the scale …
asv-soft-u04 May 21, 2024
9c1db87
feat(planning): improve logic to dynamically resize markers depending…
asv-soft-u04 May 21, 2024
c1b82d7
feat (asv-drones): add new measure unit Accuracy
asv-soft-u05 May 21, 2024
2f25d24
Merge pull request #295 from asv-soft/feature/new-measurement-unit
asv-soft-u01 May 22, 2024
a53401c
feat(planning): refactor logic to dynamically resize markers dependin…
asv-soft-u04 May 22, 2024
2239933
feat(anchor-editor): add vehicle actions and new style
asv-soft-u03 May 22, 2024
55de7be
feat (map): add base size property
asv-soft-u01 May 23, 2024
42c62aa
feat (asv-drones): add workflow for api to publish packet on GitHub
asv-soft-u05 May 22, 2024
8b7b383
feat(map): add BaseSize property to all anchors
asv-soft-u04 May 23, 2024
7006e0d
Merge pull request #297 from asv-soft/feature/api-workflow
asv-soft-u01 May 24, 2024
74bf09f
feat: bump api version
asv-soft-u01 May 27, 2024
eca4b50
feat(map): add constant variables and logic to dynamically resize Str…
asv-soft-u04 May 29, 2024
4fb871e
feat(anchor-editor): changed button icon pozition to horizontal and r…
asv-soft-u03 May 30, 2024
aefbd31
feat (gui): add message source list limit (3) to show only 3 messages…
etogood May 31, 2024
fd27ad8
feat(anchor-editor): update Asv.Avalonia.Toolkit version
asv-soft-u03 Jun 3, 2024
e478cf5
feat(anchor-editor): update Asv.Drones.Gui.Api version to 0.3.2
asv-soft-u03 Jun 3, 2024
bdb2fda
Merge pull request #296
asv-soft-u01 Jun 3, 2024
88e9c6e
feat (map): update API version and clean up code
asv-soft-u01 Jun 4, 2024
50bbbbf
Merge branch 'refs/heads/develop' into feature/change-size-anchors
asv-soft-u01 Jun 4, 2024
210e383
Removed unnecessary suppressions from CompatibilitySuppressions.xml
asv-soft-u01 Jun 4, 2024
d7d9b97
Merge pull request #294 from asv-soft/feature/change-size-anchors
asv-soft-u01 Jun 4, 2024
4790529
Merge pull request #298 from asv-soft/feature/popup-messages
asv-soft-u01 Jun 4, 2024
db119e1
Merge branch 'refs/heads/main' into develop
asv-soft-u01 Jun 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add app args from 'app.args' file or command line
--data-folder=
--plugin-folder=
--logs-folder=
--config-file=

Asana:https://app.asana.com/0/1203851531040615/1207070178648910/f
  • Loading branch information
asvol committed May 19, 2024
commit 370eb4043276a7b2798bcdb8268debc748f2c0f8
3 changes: 3 additions & 0 deletions src/Asv.Drones.Gui.Android/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Avalonia;
using Avalonia.Android;
using Avalonia.ReactiveUI;
using Environment = System.Environment;

namespace Asv.Drones.Gui.Android;

Expand All @@ -17,6 +18,8 @@ public class MainActivity : AvaloniaMainActivity<App>
{
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
{
AppArgs.Instance.TryParse(Environment.GetCommandLineArgs());
AppArgs.Instance.TryParseFile();
// this is required to use the AndroidHttpClientHandler in main thread
StrictMode.SetThreadPolicy(new StrictMode.ThreadPolicy.Builder().PermitAll().Build());

Expand Down
7 changes: 7 additions & 0 deletions src/Asv.Drones.Gui.Api/CompatibilitySuppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@
<Right>lib/net8.0/Asv.Drones.Gui.Api.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0006</DiagnosticId>
<Target>P:Asv.Drones.Gui.Api.IApplicationHost.Args</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.IApplicationHost.Shell</Target>
Expand Down
12 changes: 12 additions & 0 deletions src/Asv.Drones.Gui.Api/Services/AppHost/IAppArgs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace Asv.Drones.Gui.Api;

public interface IAppArgs
{
IReadOnlyDictionary<string,string> Args { get; }
IReadOnlySet<string> Tags { get; }

bool TryParse(IEnumerable<string> args);
bool TryParseFile(string argsFile = "app.args");

string this[string key, string defaultValue] { get; }
}
6 changes: 6 additions & 0 deletions src/Asv.Drones.Gui.Api/Services/AppHost/IApplicationHost.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Collections.Specialized;
using System.Composition.Hosting;
using Asv.Cfg;
using Asv.Common;
Expand All @@ -10,6 +11,10 @@ namespace Asv.Drones.Gui.Api;
/// </summary>
public interface IApplicationHost
{
/// <summary>
/// Application args
/// </summary>
IAppArgs Args { get; }
/// <summary>
/// Base information about current application
/// </summary>
Expand Down Expand Up @@ -65,4 +70,5 @@ public interface IApplicationHost
/// Try to restart application
/// </summary>
void RestartApplication();

}
5 changes: 0 additions & 5 deletions src/Asv.Drones.Gui.Browser/AppBundle/Logo.svg

This file was deleted.

74 changes: 0 additions & 74 deletions src/Asv.Drones.Gui.Browser/AppBundle/app.css

This file was deleted.

Binary file removed src/Asv.Drones.Gui.Browser/AppBundle/favicon.ico
Binary file not shown.
30 changes: 0 additions & 30 deletions src/Asv.Drones.Gui.Browser/AppBundle/index.html

This file was deleted.

13 changes: 0 additions & 13 deletions src/Asv.Drones.Gui.Browser/AppBundle/main.js

This file was deleted.

28 changes: 0 additions & 28 deletions src/Asv.Drones.Gui.Browser/Asv.Drones.Gui.Browser.csproj

This file was deleted.

19 changes: 0 additions & 19 deletions src/Asv.Drones.Gui.Browser/Program.cs

This file was deleted.

13 changes: 0 additions & 13 deletions src/Asv.Drones.Gui.Browser/Properties/launchSettings.json

This file was deleted.

11 changes: 0 additions & 11 deletions src/Asv.Drones.Gui.Browser/runtimeconfig.template.json

This file was deleted.

15 changes: 0 additions & 15 deletions src/Asv.Drones.Gui.Custom.props

This file was deleted.

2 changes: 2 additions & 0 deletions src/Asv.Drones.Gui.Desktop/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ sealed class Program
[STAThread]
public static void Main(string[] args)
{
AppArgs.Instance.TryParse(args);
AppArgs.Instance.TryParseFile();
// This is for catch unhandled exception
// https://docs.avaloniaui.net/ru/docs/concepts/unhandledexceptions
try
Expand Down
2 changes: 2 additions & 0 deletions src/Asv.Drones.Gui.iOS/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public class Application
// This is the main entry point of the application.
static void Main(string[] args)
{
AppArgs.Instance.TryParse(args);
AppArgs.Instance.TryParseFile();
// This is done to catch unhandled exceptions
// https://docs.avaloniaui.net/ru/docs/concepts/unhandledexceptions
try
Expand Down
36 changes: 20 additions & 16 deletions src/Asv.Drones.Gui/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public App()
// order of init members is important !!!
Paths = InitApplicationPaths();
Info = InitApplicationInfo();
Logs = new LogService(Paths);
Configuration = new JsonOneFileConfiguration(Path.Combine(Paths.AppDataFolder, "config.json"), true,
Logs = new LogService(Args["logs-folder", Path.Combine(Paths.AppDataFolder, "logs")]);
Configuration = new JsonOneFileConfiguration(Args["config-file",Path.Combine(Paths.AppDataFolder, "config.json")], true,
TimeSpan.FromMilliseconds(100));
Localization = new LocalizationServiceBase(Configuration);
var conventions = new ConventionBuilder();
Expand All @@ -58,15 +58,15 @@ public App()

PluginManager = Design.IsDesignMode
? NullPluginManager.Instance
: new PluginManager(containerCfg, Paths.AppDataFolder, Configuration);
: new PluginManager(containerCfg, Args["plugin-folder", Paths.AppDataFolder], Configuration);
containerCfg = containerCfg
.WithExport(typeof(IPluginManager), PluginManager)
.WithAssemblies(DefaultAssemblies.Distinct()); // load dependencies from default assemblies
Container = containerCfg.CreateContainer();
DataTemplateHost.DataTemplates.Add(new ViewLocator(Container));
}


private IEnumerable<Assembly> DefaultAssemblies
{
get
Expand All @@ -81,6 +81,7 @@ private IEnumerable<Assembly> DefaultAssemblies

public ILocalizationService Localization { get; }
public ILogService Logs { get; }
public IAppArgs Args => AppArgs.Instance;
public IAppInfo Info { get; }
public IAppPathInfo Paths { get; }
public IDataTemplateHost DataTemplateHost => this;
Expand All @@ -96,29 +97,30 @@ public void RestartApplication()
Environment.Exit(0);
}


#endregion

#region Init functions

private static IAppPathInfo InitApplicationPaths()
private IAppPathInfo InitApplicationPaths()
{
#if DEBUG
var appDataBaseDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
#else
var appDataBaseDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
#endif
var appData = appDataBaseDirectory == null
? "asv-data-folder"
: Path.Combine(appDataBaseDirectory, "asv-data-folder");

var processFolder = Environment.ProcessPath ?? Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

#endif



// if (OperatingSystem.IsAndroid() || OperatingSystem.IsIOS()) // TODO: Check correct folders for OperatingSystem.IsAndroid() and OperatingSystem.IsIOS() ?

var defaultPath = appDataBaseDirectory == null
? "asv-data-folder"
: Path.Combine(appDataBaseDirectory, "asv-data-folder");

var info = new AppPathInfo
{
AppDataFolder = appDataBaseDirectory == null
? "asv-data-folder"
: Path.Combine(appDataBaseDirectory, "asv-data-folder"),
AppDataFolder = Args["data-folder",defaultPath],
};
if (Directory.Exists(info.AppDataFolder) == false) Directory.CreateDirectory(info.AppDataFolder);
return info;
Expand Down Expand Up @@ -293,5 +295,7 @@ public override void OnFrameworkInitializationCompleted()
#endregion
}



#endregion
}
Loading