Skip to content

Commit

Permalink
Don't zero out 'Show Mirrors' flag when writing 'Show Pilot Model' fl…
Browse files Browse the repository at this point in the history
…ag. (#98)

Co-authored-by: arithex <arithex@users.noreply.github.com>
  • Loading branch information
arithex and arithex authored Aug 19, 2023
1 parent 87921d8 commit b5d1b4b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
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

0 comments on commit b5d1b4b

Please sign in to comment.