Page 9 of 9

Re: Xenon HUD

Posted: Wed Jul 01, 2020 4:58 am
by Milo

Code: Select all

00:32:35.767 [script.javaScript.timeLimit] OperationCallback: ***** ERROR: Script "(nil)" ran for 0.167818 seconds and has been terminated.
00:32:35.767 [script.javaScript.stackTrace] OOJSDumpStack:  0 (../AddOns/XenonHUD_beta.oxz/Config/script.js:1200) <anonymous function>
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     this: null
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     delta: 0.015000104904174805
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     calc: undefined
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     mode: undefined
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     deviation: undefined
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     cf: undefined
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     radius: undefined
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     dist: undefined
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     rng: undefined
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     endpoint: undefined
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     startpoint: undefined
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     s: [Sun ID: 107 position: (235828, 1.75511e+006, -1.00936e+006) radius: 71.205km]
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     switchNrml: false
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     switchHi: false
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     w: [Script "XenonHUD" version 3.8.4]
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     p: [PlayerShip "Cobra Mark IV" position: (226823, 1.03096e+006, -291893) scanClass: CLASS_PLAYER status: STATUS_IN_FLIGHT]

Code: Select all

22:33:15.562 [script.javaScript.timeLimit] OperationCallback: ***** ERROR: Script "(nil)" ran for 0.49869 seconds and has been terminated.
22:33:15.562 [script.javaScript.stackTrace] OOJSDumpStack:  0 (../AddOns/XenonHUD_beta.oxz/Config/script.js:1237) <anonymous function>
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     this: null
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     delta: 0.03100001811981201
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     calc: 0.1584473228026798
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     mode: ""
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     deviation: 0.15734993771546968
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     cf: 0.07500400000000004
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     radius: 71205.4609375
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     dist: 449395.1660273537
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     rng: 6.5
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     endpoint: 6.5
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     startpoint: 22
22:33:15.563 [script.javaScript.stackTrace] DumpVariable:     s: [Sun ID: 107 position: (235828, 1.75511e+006, -1.00936e+006) radius: 71.205km]
22:33:15.563 [script.javaScript.stackTrace] DumpVariable:     switchNrml: false
22:33:15.563 [script.javaScript.stackTrace] DumpVariable:     switchHi: true
22:33:15.563 [script.javaScript.stackTrace] DumpVariable:     w: [Script "XenonHUD" version 3.8.4]
22:33:15.563 [script.javaScript.stackTrace] DumpVariable:     p: [PlayerShip "Cobra Mark IV" position: (366230, 1.52243e+006, -647675) scanClass: CLASS_PLAYER status: STATUS_IN_FLIGHT]
Note the different line numbers 1200 and 1237 in script.js.

Re: Xenon HUD

Posted: Tue Jul 07, 2020 12:02 am
by phkb
Those two points in the code are where I would expect that sort of thing to happen. The first one is a calculation, the second is the HUD switch point. I've put some improvements into the code to hopefully mitigate the first one. The second one, though, is tougher. The issue appears to be relating to how Oolite handles bitmaps and images. The more images it has to keep a reference to, the more likely it's going to stutter when retrieving one, and Xenon HUD has a few. I've been meaning to dive into the source to see if there are any obvious bottlenecks when processing images, but I haven't had any luck so far.

In any case, here's the latest beta: XenonHUD_beta.oxz.

This version hopefully makes the Hi-Contrast auto-switching process a bit better (shouldn't flicker as much, better calcs for determining when mode should be switched on). I've also added the speed and space compass distance values to the HUD, which requires the Combat MFD to be installed.

Re: Xenon HUD

Posted: Tue Jul 07, 2020 9:36 am
by Milo
I think the switching delay could be reduced to 1 second, it feels a bit slow. Otherwise, very nice.

I noticed the speed numeric indicator disappeared in interstellar space however.

And, the MISSILE warning near the crosshair got stuck somehow (even after going through witchspace, it remains).

Re: Xenon HUD

Posted: Wed Jul 08, 2020 4:48 pm
by dybal
Thanks for the changes, phkb!

Does something tell the alert condition? I saw in the wiki that part of the crosshairs will go red on red condition, but is there something to make if clear if the alert condition is green or yellow? (apart from the MFD set, of trying to Torus)

Re: Xenon HUD

Posted: Wed Jul 08, 2020 4:51 pm
by Milo
In yellow, mass-lock text appears near the crosshair.

Re: Xenon HUD

Posted: Sat Jul 11, 2020 5:02 pm
by dybal
Small nitpicks:

- the components of the Space Compass are off-center in relation of each other (in the amber version at least): the backgound, the external circle, the internal circles, the roll/pitch/yall indicators (at zero)
- I find the text in green over the "Weapons systems off/online" too small, but I guess it would "collide" with the comm area to its right if bigger
- when docking, the speed dial moves to the screen border but the numeric speed value doesn't move with it (it stays near the center)

Re: Xenon HUD

Posted: Sun Jul 12, 2020 11:28 am
by phkb
Thanks for the reports. I’ve got a fix in the works so I’ll add these issues to the mix.

Re: Xenon HUD

Posted: Thu Jul 16, 2020 6:54 am
by phkb
OK, next beta release is here: XenonHUD_beta.oxz. Should address most of the issues raised so far (fingers-crossed).

Re: Xenon HUD

Posted: Mon Jul 26, 2021 5:55 am
by phkb
After a lot of fiddling, I think I've been able to stabilise the automatic hi-contrast switching system. So, version 3.8.7 is now the official release, and available via the download manager. Here's a list of all the changes since 3.7:

3.8.7
- Removed joystick sensitivity indicator.
- Improved calculations to determine when to auto-switch to Hi-Contrast mode.

3.8.6 (beta)
- HUD warning elements will now switch off correctly when threat/event is gone.
- Auto-switch anti-flickering time set to 1 second (down from 2 seconds).
- Combat MFD speed value no longer visible on docking HUD.
- Better alignment of space compass elements.
- Added current status text (GREEN, YELLOW, RED) to HUD.

3.8.5 (beta)
- Moved script.js to xenonhud.js (to reduce clutter in Config folder).
- Added code to prevent flickering when in auto-Hi-Contrast mode.
- Improved calculations to determine when to auto-switch to Hi-Contrast mode.
- Added some interfaces for Combat MFD values (speed, distance to space compass target).

3.8.4 (beta)
- Added selected missile name to area under missile display (Oolite 1.89 required).
- Cleaned up warning/indicators around crosshairs.

3.8.3 (beta)
- Fixed issue that was stopping the auto-Hi-Contrast mode from engaging correctly.
- Rearranged the warning indicators around the central HUD, and changed the masslock light into a similar label.
- Re-worked method for adding warning and indicator texts to the HUD.

3.8.2 (beta)
- Better alignment of MFD underlays with MFD frames.
- Further increased the distance at which checking for Hi-Contrast mode begins.
- Attempt to correct issue where MFD underlay was shown even when no MFD was in the slot.

3.8.1 (beta)
- Improved visibility of MFD's when in Hi-Contrast mode.
- Fixed issue with jump fuel required marker disappearing from fuel gauge when in Hi-Contrast mode.
- Reduced font size in comms log and message GUI panels.
- Slightly increased the distance at which checking for Hi-Contrast mode begins.

3.8 (beta)
- Added 2 additional MFD slots, making 9 in total.
- When prime-able equipment is removed (via Library Config), the Hi-Contrast mode will be automatically engaged when glare increases (Oolite 1.89 required).
- Changing the setting for removing the prime-able equipment is now being saved correctly.
- Made Library OXP a requirement for the OXP.

Re: Xenon HUD

Posted: Mon Jul 26, 2021 8:49 am
by Cody
Removed joystick sensitivity indicator.
This had me scratching my head earlier... 'til I realised I was looking at Xenon HUD, not Xenon GUI.
That'll teach me not to read posts before I've had my morning caffeine shot!

Re: Xenon HUD

Posted: Mon Jul 26, 2021 8:52 am
by phkb
Cody wrote: Mon Jul 26, 2021 8:49 am
That'll teach me not to read posts before I've had my morning caffeine shot!
:D

Re: Xenon HUD

Posted: Sat Aug 07, 2021 5:58 pm
by Milo
I'm seeing a lot of these:

13:53:46.545 [script.javaScript.exception.unexpectedType] ReportJSError: oolite.oxp.phkb.XenonHUD.oxz/Scripts/xenonhud.js, line 1225.
13:53:46.563 [script.javaScript.exception.unexpectedType] ReportJSError: ***** JavaScript exception (<unidentified script>): TypeError: s.position is undefined

Also some of these:

13:37:27.054 [script.javaScript.exception.ooliteDefined] ReportJSError: oolite.oxp.phkb.XenonHUD.oxz/Scripts/xenonhud.js, line 1228.
13:37:27.068 [script.javaScript.exception.ooliteDefined] ReportJSError: ***** JavaScript exception (<unidentified script>): Error: Vector3D.subtract: Could not construct vector from parameters (undefined) -- expected Vector, Entity or array of three numbers.

Re: Xenon HUD

Posted: Sun Aug 08, 2021 5:48 am
by phkb
Milo wrote: Sat Aug 07, 2021 5:58 pm
I'm seeing a lot of these:
Thanks Milo. Should be fixed in new version 3.8.8, which is out now.

Re: Xenon HUD

Posted: Tue Jul 12, 2022 6:15 pm
by Slartibartfast
hello

i have just installed "XenonHUD 3.8.9"

... i miss the line with "selected missile: ...... "
// lower left part of the display //

matthias

Re: Xenon HUD

Posted: Wed Jul 13, 2022 5:52 am
by phkb
Slartibartfast wrote: Tue Jul 12, 2022 6:15 pm
... i miss the line with "selected missile: ...... "
// lower left part of the display //
Fixed in 3.8.10, now available. Thanks for the bug report!