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

F/A-18C UFC Option Cueing showing incorrect characters #346

Closed
damien022 opened this issue Sep 14, 2020 · 19 comments
Closed

F/A-18C UFC Option Cueing showing incorrect characters #346

damien022 opened this issue Sep 14, 2020 · 19 comments
Assignees
Labels
bug Something isn't working fixed Code is complete, waiting for release
Milestone

Comments

@damien022
Copy link

When using the Helios F-18 UFC, the character representing the "Active" selection for the 5 screens on the right is showing a 0 or a 1, rather than blank and :

Space characters on the top left screen are shown as _

image

@derammo
Copy link

derammo commented Sep 14, 2020

either a bad merge when I recently integrated BFB's work on that or maybe the encoding is actually changed in DCS. Recommend testing with 1.4 first to rule out DCS actually changed it.

@BlueFinBima
Copy link

BlueFinBima commented Sep 14, 2020

DCS handling appears unchanged for UFC_OptionCueingx. This looks like 2087-2091 have been changed to a "Lua" boolean somewhere which suggests that the issue is in the Driver file. As for the spaces, again the handling by DCS seems to be unchanged. (checked with DCS/2.5.6.54046).
I checked master and this is what I'd expect in the ExportsFunctions.lua and the UFC. Not currently in a position to test with Helios unfortunately.

@derammo
Copy link

derammo commented Sep 14, 2020

when you say unchanged, does that mean you tested it with 1.4 and 1.4 works correctly with the current latest DCS OpenBeta?

just asking because that's the first thing I would check otherwise :)

@derammo
Copy link

derammo commented Sep 14, 2020

oh I just saw your comment about you can't test. never mind :)

@BlueFinBima
Copy link

I meant that the results from parse_indication(6) at 2.5.6.54046 are nothing peculiar.
It is almost as if UFC_OptionCueingx are going through helios.textureToString rather than helios.ensureString, but none of the code I looked at had a change like this.

@BlueFinBima
Copy link

https://forums.eagle.ru/showpost.php?p=4500814&postcount=225 also reporting the IFEI nozzle indicators not working.

@Denver29
Copy link

Hello

I confirm I have the same problem with UFC option cueing with 1 and 0 instead of : and blank.
I also encounter problems with the UEFI nozzle needle that doesn't move

@Denver29
Copy link

And i also notice a problem with the HUD symbology in the main DCS view that became very wide and almost unreadable whereas DDI and AMPCD viewport in helios profile are very thin but quite readable.

@BlueFinBima
Copy link

@Denver29 HUD symbology is definitely unrelated to the previous problems you describe. Happy for you to open a new issue and include screenshots to demonstrate the problem.

@BlueFinBima
Copy link

BlueFinBima commented Sep 26, 2020

UFC cueing bug is caused by the optional "format" argument of helios.send which is not equating to nil when not specified but is picking up the count from the gsub in the caller.

BlueFinBima added a commit that referenced this issue Sep 26, 2020
… problems added to that ticket are unrelated. Also fixes a similar problem with the AV-8B cueing.
@derammo
Copy link

derammo commented Sep 26, 2020

@BlueFinBima I added the optional argument to support some existing ExportFunctions.lua. I did not anticipate that there were calls out there that were erroneously sending extra arguments. Sorry about that.

@BlueFinBima could you explain or comment why the cueing is changed from character 200 to the exclamation point in the second file?

@derammo
Copy link

derammo commented Sep 26, 2020

also: during any review that I did, I would not have noticed that gsub returns two arguments which are then sent on. ugh. nice debugging!

@BlueFinBima
Copy link

It was not easy to debug. I hate debugging Lua. I did briefly consider also checking for "%" in the formatting string because of the subtlety of this problem.

The value of 200 still works, but harks back to the days when I was mapping character codes in the exports. The code to map "!" to the 200 is already implemented in the textdisplay dictionary for the field, so that mapping change was just cosmetic. If I recall, this was another improvement you guilted me into doing.

@derammo
Copy link

derammo commented Sep 26, 2020

I won't use optional arguments in Lua again. This is really unsafe stuff. There is nothing in the code that would tell you that two arguments are being filled from two return values of the previous call. If I had been aware this was a thing in Lua, I would have just ported the ExportFunctions code instead of making an optional argument to keep the old code working.

@BlueFinBima BlueFinBima reopened this Sep 27, 2020
@BlueFinBima
Copy link

Missed Damien's comment about spaces "Space characters on the top left screen are shown as _" which is generated by helios.send(2094, string.format("%7s", helios.ensureString(li.UFC_ScratchPadNumberDisplay)))
I have not seen this problem myself, but it will not be fixed by the option cueing fix. Hmmm....

@BlueFinBima
Copy link

@damien022 I was not able to reproduce the underscore problem in the scratchpad. Any thoughts?
image

@BlueFinBima
Copy link

BTW @Denver29 & @damien022 please let me know if you want the fix for the option cueing and IFEI nozzle needles and I'll make it available.

@Denver29
Copy link

If it's not too much work for you sure i would love to hace that problem fix!!
Thanks

@derammo derammo added this to the Release1634 milestone Oct 1, 2020
@BlueFinBima BlueFinBima added bug Something isn't working fixed Code is complete, waiting for release labels Oct 20, 2020
@BlueFinBima
Copy link

@damien022 please open a new issue if you continue to see the underscore problem
image
Closing this issue because the cueing problem has been fixed.

@derammo derammo changed the title Formatting issue with UFC and F-18 Font UFC F-18 Option Cueing showing incorrect characters Dec 25, 2020
@derammo derammo changed the title UFC F-18 Option Cueing showing incorrect characters F/A-18C UFC Option Cueing showing incorrect characters Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed Code is complete, waiting for release
Projects
None yet
Development

No branches or pull requests

4 participants