Skip to content

Commit

Permalink
Update MQTTnet to 3.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
daleghent committed Aug 18, 2022
1 parent 2ba40eb commit 937ac6c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Ground Station

## 1.12.0.0 - 2022-08-16
* Thanks to Stefan Berg for contributing the following:
- *Ground Station* now uses the new *FailedItem* facility, introduced in NINA 2.0.1. This simplifies detection of runtime errors in sequences and makes alerting on them more reliable
- Send to the Windows Text To Speach (TTS) facility. Listen to your errors in addition to reading them!
- All Failures To... instructions will attempt to resend these critical messages 3 times before giving up
<!-- -->
* MQTTnet: Updated to 3.1.2
* Minimum supported NINA version is now 2.0.1 (2.0 HF1)

## 1.11.0.0 - 2022-03-13
* Updated to support changes to DSO containers in NINA 2.0 beta 50
* Minimum supported NINA version is now 2.0 Beta 50
Expand Down
2 changes: 1 addition & 1 deletion Ground Station.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
<Version>3.0.0</Version>
</PackageReference>
<PackageReference Include="MQTTnet">
<Version>3.1.1</Version>
<Version>3.1.2</Version>
</PackageReference>
<PackageReference Include="NINA.Astrometry">
<Version>2.0.1.2019-beta</Version>
Expand Down
14 changes: 9 additions & 5 deletions GroundStation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ This Source Code Form is subject to the terms of the Mozilla Public
using System.Threading.Tasks;

namespace DaleGhent.NINA.GroundStation {

[Export(typeof(IPluginManifest))]
public class GroundStation : PluginBase, ISettings, INotifyPropertyChanged {
private MqttClient mqttClient;
Expand Down Expand Up @@ -94,14 +93,19 @@ private async Task<bool> EmailTest(object arg) {
Attempts = 1
};

await send.Run(default, default);

if (send.Status == SequenceEntityStatus.FAILED) {
if (send.Validate()) {
await send.Run(default, default);
} else {
Notification.ShowExternalError($"Failed to send email:{Environment.NewLine}{string.Join(Environment.NewLine, send.Issues)}", "Email Error");
return false;
} else {
}

if (send.Status == SequenceEntityStatus.FINISHED) {
Notification.ShowSuccess("Email sent");
return true;
} else {
// Something bad happened further down and should have produced an error notification. (runtime exception)
return false;
}
}

Expand Down

0 comments on commit 937ac6c

Please sign in to comment.