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

Don't zero out 'Show Mirrors' flag when writing 'Show Pilot Model' flag. #98

Merged
merged 1 commit into from
Aug 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ protected override void SavePop()
if (mainWindow.Misc_SmartScalingOverride.IsChecked == true)
bs[12] = 0x05;

// Smart Scaling
// Pilot Model
bs[0] = 0x13;
if (mainWindow.Misc_PilotModel.IsChecked == true)
bs[0] = 0x33;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,13 @@ protected override void SavePop()
if (mainWindow.Misc_SmartScalingOverride.IsChecked == true)
bs[12] = 0x05;

// Smart Scaling
bs[0] = 0x13;
// Pilot Model -- bit #6; NB: in v4.37 and later, 'Show Mirrors' is bit #7 so don't overwrite that.
//TODO: consider adding separate checkbox for 'Show Mirrors'?
//TODO: consider AL should get out of the business of duplicating these settings, if BMS 2d UI is not dead code?
bs[0] &= 0b01110011; //turn off bits 3,4 and 8.. maybe necessary if older pop file is ported forward from older BMS? not sure
bs[0] |= 0b00010011; //turn on bits 1,2 and 5
if (mainWindow.Misc_PilotModel.IsChecked == true)
bs[0] = 0x33;
bs[0] |= 0b00100000; //turn on bit 6

fs = new FileStream
(filename, FileMode.Create, FileAccess.Write);
Expand Down