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

fix(simulator): incorrect initialisation of preflight checks #5170

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

philmoz
Copy link
Collaborator

@philmoz philmoz commented Jun 12, 2024

When creating a new model for the T15 in the simulator the pre-flight checks state for the switches is incorrect.
SA is set to down instead of up.

Happens on MacOS, not tested on Linux or Windows.

@pfeerick pfeerick changed the title fix(simulator): incorrect initialisation of preflight checks. fix(radio): incorrect initialisation of preflight checks in simulator Jun 12, 2024
@pfeerick pfeerick added bug 🪲 Something isn't working simulator labels Jun 12, 2024
@pfeerick pfeerick added this to the 2.11 milestone Jun 12, 2024
@pfeerick pfeerick changed the title fix(radio): incorrect initialisation of preflight checks in simulator fix(simulator): incorrect initialisation of preflight checks Jun 12, 2024
@pfeerick pfeerick modified the milestones: 2.11, 2.10.2 Jun 12, 2024
@pfeerick
Copy link
Member

Colorlcd specific issue - can reproduce on simulator with TX16S and EL18 in addition to T15 on Linux. PR appears to resolve this, no impact on hardware (since this is changing firmware, not just simulator). Seems somewhat hit and miss when it will occur... TX16S doesn't always have this issue, but T15 is pretty consistent.

@philmoz
Copy link
Collaborator Author

philmoz commented Jun 12, 2024

It depends on the number of switches - as soon as it goes over 11 it can happen.
On TX16S you would need to have SI, SJ and some EXT switches configured.

@pfeerick
Copy link
Member

pfeerick commented Jun 12, 2024

It's more than just that. 2.10.1 simulator does not do this with TX16S with default settings (but does for T15 - but only for SA), but 2.11 main does (and complains about all the switches)... even with the 2.10.1 ETX, which has no SI/SJ/ETX/FLx switches configured.

@philmoz
Copy link
Collaborator Author

philmoz commented Jun 12, 2024

It depends on how many switches pass the SWITCH_EXISTS() check.

The issue is the way different compilers handle the code - for some reason when building the simulator it is not correctly expanding the shifts to 64 bits.

@pfeerick
Copy link
Member

Yeah, there have been quite a few occasions where firmware code acts differently for simulator than when built for radio... 😢

@pfeerick
Copy link
Member

There is some sort of inconsistently / hard to reproduce occurrence whereby on with TX16S, if SI/SJ are configured 2POS, the simulator may sometimes still show the warning just for those switches if even if in the correct position, but it will not consistencly reproduce yet... i.e. it happened first run of simulator after restarting Companion with blank ETX + SI/SJ enabled, and then wouldn't do it for subsequent runs, and on a repeat run it wouldn't do it then either. However, the default settings for both TX16S and T15 are good now. 🤷

@pfeerick pfeerick merged commit 9c625fa into main Jun 13, 2024
46 checks passed
@pfeerick pfeerick deleted the philmoz/fix-sim-preflightchecks branch June 13, 2024 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working simulator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants