2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-04-05 17:39:39 -04:00

65 Commits

Author SHA1 Message Date
efd0b3e0c0 Journals Now processed in own thread
Some invalid journal data is now handled
Journals now use polymorphic deserialization
Added Event names to all journal events
Remove unused controllers
2024-05-24 19:30:12 +10:00
ae848e036d back to net8 but with nuget! 2024-05-18 00:56:52 +10:00
337a9d5ea0 Update Status Fuel Display
Start working on Explorer Panel
Backend now uses polymorphic de/serialization (net9)
2024-05-17 23:55:55 +10:00
d4f3476ad3 Update Flag handling
Status now shows readable flag names
Updated Power display
Added more missing Journal events
2024-05-16 23:39:16 +10:00
bd811c861c Update Journal File Handling
Now Correctly deserializes Journal events
2024-05-12 14:24:53 +10:00
f3ce62b551 JournalService setup work in progress 2024-05-07 12:02:43 +01:00
b8967814d5 Rework Journal Handling
Stub ModulesInfo
2024-04-21 17:10:45 +10:00
ac30d3cd2a API & WebSocket now working
Can Read Status File & Broadcast contents via websocket
2024-04-18 14:45:16 +10:00
aa368471fe Add initial API & Configuration 2024-04-17 22:03:28 +10:00
256ebb179e Rework Journal File Reading
Remove Explorer
Remove Plugin Architecture
2024-04-14 21:52:11 +10:00
63ed43f4af Initial Commit 2024-04-13 18:10:46 +10:00
F K
9da2ba012b
[Framework] Make the new CoalescingId event arg nullable (#143)
While testing, I discovered that plugins that don't yet support sending the Coalescing ID were not mixing well because the default value of the ID is 0 -- which is also a valid body id. If the default is null, receivers can detect the absent value and apply a sensible default (ie. group them where it makes sense).
2024-02-18 15:43:53 -05:00
Xjph
716e513ab6 uint to handle underflows from elite 2024-02-13 08:57:22 -03:30
F K
231710ca68
[Core + Framework] Performance improvements for re-drawing the grid (#141)
This proposes a *new method* on IObservatoryCore:  `SetGridItems(worker, items)` which does 2 things:
* Clears the grid
* Adds the given items.

Effectively replaces the entire content of the grid -- which is something a handful of plugins now do.

Why add this when you could just call Core's Clear + AddGridItems methods?? So it can all be done within the same rendering suppression "scope" to reduce flickering and increase rendering speed.  Speaking of rendering suppression, I have implemented such rendering suppression "scope" which uses Listview's built-in Begin/EndUpdate() in combination with temporary removal of the sort comparer (as is done for read-alls).  This was also applied to the existing AddGridItems(worker, items) method as well, addressing a TODO.
2024-01-30 20:49:53 -05:00
F K
351dcdb732
[Core] Settings improvements: Grouping w/labels, support for doubles (#137)
* [Core] Settings improvements: Grouping w/labels, support for doubles

Layout improvements:
* Plugins can set `[SettingSuggestedColumnWidth(123)]` on a settings class to adjust the settings view column width to make it wider or narrower to fit things nicely.
* Plugins can set `[SettingNewGroup("label")]` on any setting property to force a "new paragraph", or group, of settings. If "label" is also provided, a grouping header with that text will also be created.
* A double precision up/down numeric control has been added. In support of this, there is now a precision value on the existing `[SettingNumericBounds]` attribute to specify the number of digits of precision the control displays/allows.

Plugins:
* The above have been applied/demonstrated on the Botanist and Explorer plugin settings.
2024-01-29 15:37:00 -05:00
F K
100d5e290a [Framework] Add 3 new properties to NotificationArgs to expand detail (#131)
The new properties are:

* string Sender: The name of the plugin sending the notification.
* string ExtendedDetails: Even more detail than Title and Detail convey. This value will not be spoken nor included in pop-up notifications. However, other notifier plugins may use this value.
* int ColescingId: An id which can be used to correlate multiple notifications together (ie. for sorting/grouping) without depending on arbitrary string values. I recommend reserving -1 for system, 0 .. 1000 for system bodies and anything else is arbitrary and can be agreed upon between Core and Plugin authors, as desired.

While the motivating use is a new notifier plugin I am authoring (my Aggregator plugin, see GitHub), I have tried to make this as general purpose as possible.

I have modified Explorer as an example of usage. After this is merged, I'll follow up with another PR to use this in Botanist as well (I have other changes pending for Botanist; see #120).

Comments welcomed!
2024-01-25 23:19:20 -03:30
Xjph
b42b124884 missing crime types 2024-01-25 23:18:02 -03:30
Xjph
b6d013b3ae add collidedWithDamage crime type 2024-01-25 23:18:02 -03:30
Xjph
97e981bae2 ready for testing 2024-01-25 23:18:02 -03:30
Xjph
d99a190869 WIP: observatory UI overhaul 2024-01-25 23:18:01 -03:30
Xjph
1d62a0ec1d Winforms overhal in progress 2024-01-25 23:18:01 -03:30
Xjph
4dba621d7c New UI framework changes 2024-01-25 23:18:01 -03:30
Xjph
e2c6816d45 Initial overhaul work 2024-01-25 23:18:01 -03:30
F K
ff784b31d1
[Framework] Add a DateTime property for CarrierJumpRequest DepartureTime (#119)
Refactored out the logic backing the JournalBase TimestampDateTime property so it can be used for any DateTime type property, providing a standardized json String -> DateTime conversion for any date-time property. Implemented as an `internal static` method on JournalBase so journal objects which inherit from JournalBase or don't inherit from it can use it.

Used this to provide a DepatureTimeDateTime on CarrierJumpRequest (this property was added in Update 14) and to implement the existing ExpiryDateTime on CurrentGoal.

From a quick search in the journal documentation, I don't see any other applications for this.
2023-08-14 09:35:00 -02:30
Xjph
cff7f0c7cb Updated framework xml 2023-03-01 16:30:58 -03:30
F K
3f2f11bdf3
[Framework + Core] Feature: Add support for adding multiple grid items (#105)
For plugin developers: Adds a new method to the IObservatoryCore interface to add multiple grid items in 1 call -- which only invokes the UI thread once (and potentially only scrolls to bottom once) providing a small performance improvement and providing some modest convenience.
2023-03-01 16:22:20 -03:30
Xjph
e3e019e3f7 Handle missing effect full range of "+"s 2023-01-19 19:24:56 -03:30
Xjph
229e76b87d Add SRV to VehicleSwitchTo 2022-12-13 19:12:34 -03:30
Xjph
eeae99dc2a Migrate to .NET 6 2022-12-04 15:01:56 -03:30
Xjph
388b7110cf U14 Status change 2022-12-04 15:01:24 -03:30
Xjph
e4049d67c1 Update 14 jounal changes 2022-12-04 11:00:07 -03:30
Xjph
3a9b4da2b7 Update framework xml doc 2022-10-30 19:17:01 -02:30
Xjph
796819617b Odyssey Update 13 journal changes 2022-08-29 10:03:51 -02:30
Xjph
0c218ed52b Added framework xml documentation for all "exploration" events. 2022-06-12 14:44:04 -02:30
Xjph
3896621092 Add new FCMaterials file classes. 2022-06-09 21:10:26 -02:30
Xjph
396a5a9217 Journal changes for Odyssey Update 12 2022-06-05 23:09:16 -02:30
Jonathan Miller
8de34a141c
Export version fixes (#83)
* Add file association for .eop, prompt for install dir

* Handle .eop or .aip file passed as arg.

* VS2022 version bump

* Filter neutron stars and black holes from fast spinning criteria.

* Adjustments for new "high value" check

* Refactor herald cache

* Fix element order and namespaces for voice moods.

* Add explicit .Stop() between audio player calls.

* Use nullsafe member access instead of skipping

* Don't queue up a title that's already queued.

* Improve body ordinal handling for explorer speech titles.

* Escape strings being inserted into xml

* Handle flip-flopping JSON type

* Converter for flip-flopping property type

* Use the converter

* Escape characters *before* we wrap it in xml.

* Give Eahlstan his clear button. :D

* Exclude all stars from fast rotation check.

* Close outstanding popup notifications on exit.

* TO DONE

* [Herald] Suppress duplicate notification titles for spoken notifications

If you have notifications from multiple plugins producing notifications with the same title in quick succession (ie. "Body A 1 e" from both Explorer and BioInsights), the title on successive notifications will not be spoken again to save the breath of our friendly Azure speakers.

* Doc update

* Remove unintended member hiding

* Fix export errors when exporting BioInsights data, cleanup

Discovered a couple issues with exporting BioInsights data resulting from using two different types of objects in the data grid; improved error handling as well.

Also cleaned up some old-style read all code.

* Add read-all on launch setting

* Updated framework xml

* Improve high-value body description text

Co-authored-by: Fred Kuipers <mr.fredk@gmail.com>
2022-05-21 13:00:47 -02:30
Jonathan Miller
fb45b5c3e2
Export, plugin archive install, and herald cache race condition fixes (#82)
* WIP: Grid export and plugin extraction

* Tweak export process

* Check for recursion of the same assembly load.

* Individual screens aren't always primary?

* Wait for cache to be writable

* Export selection only.

* Update built xml docs

* Ignore invalid archives.

* Need to ensure task is started.
2022-05-09 11:11:57 -02:30
F K
ab365cd322
Expose core error logger to plugins and report custom criteria errors (#78)
* Expose core error logger to plugins and report custom criteria errors

Fixes #77

This adds an error logging method on the IObservatoryCore interface that writes the exception details to ObservatoryCore's central error log (found in `${Documents}/ObservatoryErrorLog.txt`). In addition, added a timestamp to each error log.

Also updates the Explorer to report Custom Criteria file load errors and execution errors to the log. Also updates HeraldNotifier to report CacheIndex.json parse failures to the error log as well.

* Expand debugging/error logging in Herald; cleanup empty mp3 files

Herald crashes if attempting to play 0-byte mp3s so if detected, delete, re-request (empty files can occur in some azure failure cases (ie. out of quota). Trap and log errors in other places in HeraldQueue to avoid hard crashes due to weird and wonderful unexpected stuff.
2022-05-03 19:02:31 -02:30
Xjph
3fe3ef9901 Updated versioning 2022-04-04 12:29:59 -02:30
Jonathan Miller
1950d477fd
Herald v2 (#74)
* Add speech rate setting

* Add volume slider

* New speech manager skeleton

* User API key from resx

* Implement voice list retrieve via new api

* Rewrite to use ObAPI, remove all dependancies

* Use volume setting

* Clean up using statements

* Volume and timing adjustments

* Lookup rate value

* Use numeric rates for tighter spread

* Manage plugin data folder via core interface

* Add check that nullable settings are not null.

* Get file size before it's deleted.

* Improve old settings migration.

* Ignore cache sizes below 1MB

* Re-index orphaned files in cache, purge legacy wav files.

* Call top level error logging for native voice exception.

* Async title and detail requests to remove pause

* Remove NetCoreAudio use of temp files.

* Remove orphan using.
2022-04-04 11:58:30 -02:30
F K
0c86590f75
Use HasFlag in another spot. (#68)
Just a tiny cleanup.
2022-03-23 08:12:28 -02:30
Xjph
3af9e3ec7b Update 11 journal changes 2022-03-15 11:15:44 -02:30
F K
4f4ba88878
Add event-based LogMonitor state changes to better handle batch reads (#59)
* Add event-based LogMonitor state changes to better handle batch reads

Pre-reading hackily used read-all to suppress notifications. But that broke some assumptions about what read-all meant. Furthermore, the Core UI told plugins about read-all rather than the log monitor telling them -- which is really what should be telling them.

To address these concerns, LogMonitor now provides an event that both the PluginCore and PluginEventHandler listens to or tracking logging state allowing more granular information about the activities of LogMonitor, including distinguishing between ReadAll and Pre-read batches. Plugins no longer need to track if LogMonitor is in batch-read mode or not -- PluginCore now provides it. 

I've also converted all built-in plugins to use the new event-based system. The old system is marked deprecated and will go away once other known contributed plugins have converted to the new system.

* Change LogMonitorState enum to [Flags], drop 'None' state

As requested, and did associated simplifications and cleanup that followed.
2022-03-03 16:39:49 -03:30
F K
b465b3d886
Add missing docs for new NotificationArgs.Rendering enum (#57)
This functionality was originally added in #47.
2022-02-26 17:18:40 -03:30
F K
1e1aeef958
Fix incorrect type for the Cargo.Inventory property (#49)
Discovered when attempting to handle this event for an in-progress plugin.
2022-01-01 03:51:30 -03:30
F K
701f6f0b1c
Add new Rendering controls for notifications, add missing forwarding (#47)
Plugins authors can now optionally specify what ways their notifications are rendered (subject, of course, to user preferences/settings). The default is to render notifications in all available channels. Examples:
- Show native pop-up window only (ie. no voice/plugin notifiers)
- Disallow other plugin notifiers

This does not support selection of notifier plugins.

Furthermore, persistent notification updates were not previously being forwarded to anything but the native popup notifier. Now plugins and native voice are also supported (subject to user preferences) and respect the new rendering controls added here. There is currently no concept of closing notifications for the native voice or plugin-based notifiers.
2021-12-18 17:57:23 -03:30
F K
8c26193aa6
Add missing using (#46)
Caused local build to fail after syncing to commit 714537e58a.
2021-12-18 17:51:46 -03:30
Xjph
714537e58a corrected powerplayvoucher systems type 2021-12-18 13:10:04 -03:30
Xjph
d3315c5c65 docs updated to latest xml tags 2021-11-25 17:21:20 -03:30