invernyx / smartcars-3-bugs

The bug tracker for the smartCARS 3 application
3 stars 0 forks source link

[BUG] - {aircraftType} log entry issues #180

Closed walkerairtrans closed 1 year ago

walkerairtrans commented 1 year ago

Describe the bug

I'm seeing a couple issues here -- they seem to be related to X-Plane maybe?

Log Logic for 'Flying'

This logic is only firing once -- therefore it does not detect any livery changes or aicraft changes.

{ "condition": "{aircraftType} changed or {aircraftType} not_equals ''", "message": "Flying {aircraftType}" },

image

image

aircraftType Missing in XP

It appears the first time you load the simulator, launch smartCARS, the full aircraftType + livery shows.

image

When you change a livery or an aircraft it no longer has the aircraftType prefixed to the livery line; this does not fire a change log as indication above either.

This is the same C172 SP with Scratches livery image

This is the Rotate MD11 with WAT livery image

How do you reproduce this bug?

  1. Load into a flight, livery, and start tracking.
  2. Change livery while tracking is running (example XP, just open aircraft settings and flip to another livery)
  3. Log doesn't indicate change even though the data does.

Expected behavior

If aircraftType changes it should print the log entry--aircraft or livery while SC3 is running (just like SC2.)

Screenshots

No response

Operating system

Windows 11

Community airline

Walker Air Transport

smartCARS Version

Latest

Plugins installed

chat, map, flight center, flight tracker, logbook

Additional context

No response

turbofandude commented 1 year ago

@walkerairtrans The name being wrong is likely a bug in XPUIPC. That said, the not logging issue, I BELIEVE, is due to a tracking config mistake on our part. The {aircraftType} changed or {aircraftType} not_equals ''", "message": "Flying {aircraftType} line evaluates to true when either it's not blank OR it changed, but once that condition has been tripped (i.e. once), it'll never be false again (because it will never be blank) and will never re-log. Can you try replacing that with the two I sent below and testing?

{ "condition": "{simulatorVersion} changed and {simulatorVersion} not_equals ''", "message": "Using {simulatorVersion}" }, { "condition": "{aircraftType} changed and {aircraftType} not_equals ''", "message": "Flying {aircraftType}" },

Please let me know how that works for you.

walkerairtrans commented 1 year ago

@walkerairtrans The name being wrong is likely a bug in XPUIPC. That said, the not logging issue, I BELIEVE, is due to a tracking config mistake on our part. The {aircraftType} changed or {aircraftType} not_equals ''", "message": "Flying {aircraftType} line evaluates to true when either it's not blank OR it changed, but once that condition has been tripped (i.e. once), it'll never be false again (because it will never be blank) and will never re-log. Can you try replacing that with the two I sent below and testing?

{ "condition": "{simulatorVersion} changed and {simulatorVersion} not_equals ''", "message": "Using {simulatorVersion}" }, { "condition": "{aircraftType} changed and {aircraftType} not_equals ''", "message": "Flying {aircraftType}" },

Please let me know how that works for you.

simulatorVersion doesn't work -- didn't give me any output.

Using "OR" statement on aircraftType resulted in no entry in the log at initial start.

Doing this resulted in this log when changing liveries.

{ "condition": "{aircraftType} changed or {aircraftType} not_equals ''", "message": "Flying {aircraftType}" }, { "condition": "{aircraftType} changed and {aircraftType} not_equals ''", "message": "Flying {aircraftType}" },

image

I'll need to check but the missing aircraft name might be XP12 bug. I don't think I ever saw this in XP11 with SC2.

walkerairtrans commented 1 year ago

@turbofandude further testing and discovered this is definitely an XP12 problem. The lack of aircraft name doesn't disappear in XP11 with SC3.

I still had to do the code above to get it to log initially and every change.

turbofandude commented 1 year ago

@walkerairtrans How does this work?

{ "condition": "{simulatorVersion} not_equals ''", "message": "Using {simulatorVersion}" }, { "condition": "{aircraftType} not_equals ''", "message": "Flying {aircraftType}" }, { "condition": "{aircraftType} changed", "message": "Aircraft changed to {aircraftType}" },

I realize the mistake in the code I sent - changed events are suppressed initially (how could it have changed from nothing?), meaning the transition from blank to set won't trigger a changed event. Then, the not_equals '' happens but once it becomes true, is either true forever or if it's an and, depends on changed, which doesn't happen.

The code I sent above should log sim version initially, as well as aircraft, then subsequent aircraft changes correctly.

walkerairtrans commented 1 year ago

@walkerairtrans How does this work?

{ "condition": "{simulatorVersion} not_equals ''", "message": "Using {simulatorVersion}" }, { "condition": "{aircraftType} not_equals ''", "message": "Flying {aircraftType}" }, { "condition": "{aircraftType} changed", "message": "Aircraft changed to {aircraftType}" },

I realize the mistake in the code I sent - changed events are suppressed initially (how could it have changed from nothing?), meaning the transition from blank to set won't trigger a changed event. Then, the not_equals '' happens but once it becomes true, is either true forever or if it's an and, depends on changed, which doesn't happen.

The code I sent above should log sim version initially, as well as aircraft, then subsequent aircraft changes correctly.

That worked.

image

The missing airplane name seems to be XP12 only, it's not happening in XP11.

turbofandude commented 1 year ago

Gotta love third party libraries (XPUIPC, etc.). I'll get that change to the tracking config set as default going forward.

walkerairtrans commented 1 year ago

@turbofandude I found out what is happening -- XPRealistic for XP12 is wiping the offset. I spent 30 minutes testing each plugin 1-by-1 until I could find it. I noticed on a plain install of XP12 the aircraft/livery switching would retain the aircraft name.

FSInterrogate2std_1dJvRxZmGx

And once I put XPRealistic in -- poof

image

I've notified them of this issue.

Also, your code you gave me is causing this to happen randomly in all sims.

smartcars3_YeX2sk6eZb

walkerairtrans commented 1 year ago

I thought about adding this but it resulted in obviously not working. I was thinking along the lines of if a change is triggered but the value still matches previous don't report. I think for some reason, maybe split second, the variable is going "blank" and then showing AC again?

Aircraft changed to {aircraftType} not_equals {aircraftType}