Repository navigation
v0.5.5.1-test Archived Fixes, Code Cleanup and Claude Audit
Pre-releaseMSFS Compatibility: 1.39.12.0, 1.9.24.0.
MSFS Widget Version: 1.6.3
Release notes for 0.5.5.1-test
NOTAM: The majority of the large number of changes in this release are from a code audit that I had Claude perform on the 0.5.5.0 release baseline. Please don't be alarmed by the length of the list below, as no major issues were found. The changes are mostly defensive in nature: extra error handling and retries for rare situations (e.g. a file being locked or part written when it is read, a companion app like GPU-Z or OFXR closing mid-flight, or MSFS closing at an unusual moment), small fixes for edge cases that most users would never encounter, and tidying up of old code, including removing the now deprecated FPS Tolerance and FPS Cap modes. In normal use you should notice little difference, other than the new features and fixes listed separately. As with any test release, please report anything unusual and include your log file.
Test12:
- Reduce label now shows DynSet or Inactive for only 15 seconds
- Previously the Reduce label showed DynSet XX or Inactive for the whole flight whenever settings reduction was enabled and nothing was being reduced
- After 15 seconds it goes back to showing the cloud state (Clouds: with its normal colours, including cloud increase green and night orange), unless settings reduction is active (reduction level, LODs reduction, VRAM+ reduction or the Disabled warning), when it still shows Reduce
- ServiceModel: new ReduceLabelShowStartTickMs, ReduceLabelShowSeconds (15) and ReduceLabelShowActive
- LODController constructor: the display period starts when a flight session starts, as a new LODController is created for each flight session
- MainWindow (Reduce label): the Reduce label is used only while settings reduction is active or ReduceLabelShowActive is true, and DynSet XX is shown only while ReduceLabelShowActive is true
- ServiceModel UpdateDynamicSettingsState: the 15 second period restarts when MSFS dynamic settings are switched on or off during a flight (expert options only, as this check only runs with expert options on)
- ServiceModel ResetCloudsLODs: the 15 second period also restarts on every full reset (the Reset button, changing settings, profile or graphics mode changes and similar)
- MainWindow btnDynSet_Click: the 15 second period also restarts when the test mode DynSet button is used
- TLOD changes are now allowed while taxiing at up to 20 knots, but not during a takeoff roll
- LODController UpdateVariables (criticalFlightPhaseActive): on the ground it was active above 5 knots ground speed. It is now active above 20 knots, or above 5 knots while accelerating
- Accelerating means the ground speed has gained 3.5 knots or more over the last 2 seconds (about 0.09 g, one sample per tick), so it ends as soon as the acceleration drops
- Normal taxiing is below that acceleration and takeoff rolls are above it. A brisk taxi start may briefly exceed it, which only means the old 5 knot limit applies while it lasts
- TaxiMaxSpeedKnots (20), TakeoffRollAccelKnots (3.5) and TakeoffRollAccelWindowSeconds (2) are constants at the top of LODController
- The same flag also gates cloud quality increases and settings reduction recovery, so those follow the new ground speed rule as well
- Landing rollout: changes are allowed once the ground speed drops below 20 knots, where before they waited until 5 knots
- Behaviour in the air is unchanged
- Widget fixes (in-game widget and web page widget, widget version 1.6.3)
- Fixed the Flight Type label still showing the Expert pairing marker (for example IFR ↔1) after unticking Expert. The list was rebuilt but the selected label was only refreshed when the profile index changed, and IFR stays at index 0. The label is now refreshed whenever the profile list changes
- Flight Type list: it is now rebuilt each time it is opened, and the selected item is scrolled into view
- Flight Type list: added a mouse wheel handler that scrolls the list directly, in case the host swallows the default scroll (the list was seen once not responding to the mouse wheel in the in-game widget)
- Flight Type list: added overscroll-behavior: contain so scrolling stays inside the list
- Flight Type list: added a wide, visible scrollbar (track and thumb with hover), so the list can also be scrolled by clicking or dragging when the mouse wheel does not work, and it is clear when there are more items
- HtmlWidgetPanel.js and HtmlWidgetPanel.css (in-game widget) and the embedded web page in AutoFpsWebServer.cs were changed the same way
Test11:
- Fixed settings reduction recovery raising night cloud reduction clouds by a level
- After a settings reduction cycle at night, the recovery step raised clouds one level (for example Medium to High) and night cloud reduction never re-applied, as it only applies when clouds are at or above default, leaving clouds one level too high until day
- LODController RunTick (recovery): clouds are no longer raised above default minus the night cloud reduction level while night cloud reduction is active (2D uses NightCloudReduceLevelsGlobal, VR uses NightCloudReduceLevelsGlobalVR)
- LODController RunTick (reduction): at reduction depth 0 the first cloud reduction step now uses the lower of the current cloud level and default minus 1, so it can no longer raise clouds that night cloud reduction already holds lower
- Settings reduction can still lower clouds as far as its own floor allows at night; recovery then returns them to the night cloud level and stops there until day
- Tested at night with Max Levels 2 (Floor Medium) and Max Levels 3 (Floor Lowest): clouds stayed at the night level or lower throughout and returned to the night level after recovery
- Daytime behaviour is unchanged
Test10:
- Day/night switch hold now counts sim time instead of real time, with a configurable length and a brightness release
- The hold after each day/night flip is measured in sim time (ZULU TIME), so it runs faster at higher sim rates
- The hold is now 5 minutes of sim time instead of 60 seconds. New config key DayNightSwitchHoldMinutes (global, one value per sim config file, 1 to 30, default 5)
- The hold ends early if brightness moves a set number of day/night levels past the switch level, so a real change in light still gets through while a wobble around the threshold (for example flying in and out of broken cloud) does not. New config key DayNightSwitchHoldLevels (global, one value per sim config file, 0 to 2, default 2). 0 is a strict time lock with no brightness release
- While held at night, brightness above the threshold of (switch level minus DayNightSwitchHoldLevels) releases the hold. While held at day, brightness at or below the threshold of (switch level plus DayNightSwitchHoldLevels) releases it
- The levels are geometric, so the release is asymmetric: it takes a large brightness rise to release back to day, and a small fall to release to night. This favours lower settings when descending into gloom
- Measured at dusk (switch level 5), cloud changes moved brightness by 0.23 to 0.37, and one level is about 0.2. The default of 2 levels holds these swings and lets only a very large change release early
- The release thresholds continue the same two curves beyond levels 0 to 10, so they exist for every switch level. Where one cannot be reached (for example the darkest levels under a full moon, or the brightest levels above the sim's 100% ceiling) the hold simply runs out
- Replaces the test9 early break on a large brightness change (doubling/halving relative to the threshold), which needed a sim time change of about 10 minutes
- Failsafe: the hold also ends after twice the hold length in real time (10 minutes at the default), in case ZULU TIME is unavailable
- Night profile pair switching follows the same hold and release
- ServiceModel: added DayNightHoldMinutes, DayNightHoldLevels, NightReleaseToDayThreshold and NightReleaseToNightThreshold, and DayNightThresholdForLevel (the threshold curve, shared by the switch level and the release levels). DayNightSwitchHoldMinutes and DayNightSwitchHoldLevels are loaded and range checked in LoadConfiguration, invalid values are corrected and logged
- LODController UpdateNightTime: hold tracked by ZULU TIME at the flip, with the midnight UTC wrap handled. It logs each switch, the first held switch of each hold, the hold ending when a switch was held or it ended early, and the hold being released early by brightness
- MobiSimConnect: added SubscribeEnvVar and ReadEnvVar for E: environment variables
- IPCManager: subscribes E:ZULU TIME in seconds
- Day/night switching waits for manual sim time changes to settle
- A sim time change (ZULU TIME moving more than 20 s away from real time x sim rate in one tick) ends any day/night hold, at every DayNightSwitchHoldLevels setting including 0
- Day/night is not decided until 3 s after the last change, so dragging the time slider no longer flips day/night (and night clouds) on every move, and the decision uses a settled brightness reading
- A day/night flip decided right after a manual time change settles does not start a hold, as it is not a brightness wobble. The next flip after that starts a hold as normal
- LODController UpdateNightTime: tracks ZULU TIME and real time per tick to detect changes (midnight UTC wrap handled), and logs the change detected, the time settling and the resulting switch. A flag set when the time settles and cleared at the first decision after it skips starting a hold, and that flip is logged as "Switched to ... after a manual time change, no hold started"
- Fixed night cloud reduction not reapplying after a night → day → night sequence
- On the tick day returned, Increase Cloud Quality could run before the night cloud restore, leaving clouds at default with Increase Cloud Quality marked active, which then blocked the next night reduction
- LODController AutoIncreaseCloudQuality: no longer runs while night cloud reduction is still active
- LODController night cloud reduction: now applies when clouds are at or above default, instead of exactly default (+1 if Increase Cloud Quality was active)
- Night cloud reduction levels now have a separate VR setting
- New config key NightCloudReduceLevelsGlobalVR (global, one value per sim config file, 1 to 3, default 1), used instead of NightCloudReduceLevelsGlobal while in VR, as VR cloud quality defaults are usually lower than 2D on the same system
- Default behaviour change: VR night cloud reduction is now 1 level instead of following the 2D value (default 2). Set NightCloudReduceLevelsGlobalVR to match the old behaviour if preferred.
- ServiceModel: added NightCloudReduceLevelsVR (loaded and range checked in LoadConfiguration, invalid values corrected and logged), ActiveNightCloudReduceLevels (VR or 2D value depending on live VR mode), IsVrGraphicsMode and NightCloudReduceLevelsForMode
- LODController: VR night cloud reduction uses NightCloudReduceLevelsVR, and the night cloud checks use ActiveNightCloudReduceLevels
- MainWindow: the Night mode dropdown Clds-x label shows the VR or 2D value for the graphics mode selected in Target (VR, OFXR and VXR use the VR value) and updates when Target changes, the LoadSettings log TNight value uses the active graphics mode, and the night cloud status text uses the live VR state
Test9:
- Day/night switch level thresholds rebased to darker values, keeping the old default reachable at level 0
- Level 0 = 25% (the previous default, about sunrise/sunset), level 5 = 15.15% (about the end of civil twilight, new default), level 10 = 15.01% (near total darkness)
- Levels 0 to 10 = 25, 19.32, 16.86, 15.81, 15.35, 15.15, 15.087, 15.051, 15.030, 15.017, 15.01
- Default behaviour change: with the default level 5, night now starts at about the end of civil twilight instead of about sunset. This applies to all profiles, Non-Expert included (Non-Expert TLOD halving at night switches correspondingly later). Set DayNightSwitchLevel=0 for the previous timing.
- ServiceModel LoadConfiguration: replaced the 50/25/15.2 offset exponential curve with two geometric halves above the 15% brightness floor (0 to 5 from 25 to 15.15, 5 to 10 from 15.15 to 15.01), because dusk brightness above 15% was measured to decay exponentially at a steady rate per location (about 10%/min Oslo, about 16%/min Cairns), giving equal time steps within each half
- ServiceModel NightBrightnessThreshold property initial value changed from 25 to 15.15 to match the new default (overwritten on load)
- Day/night switch level automatically migrated from the test8 scale, once per sim config file
- test8 levels 0 to 6 become 0, 7 and 8 become 1, 9 becomes 2, 5 and 10 become 5 (nearest new threshold, except the old default 5 goes to the new default 5)
- ServiceModel: added MigrateDayNightSwitchLevel, called from LoadConfiguration when the DayNightSwitchLevelMigrated key is missing. It converts an existing DayNightSwitchLevel, logs "Day/night switch level migrated to new scale: old -> new", and adds DayNightSwitchLevelMigrated=true. Fresh configs just get the marker and the default 5.
- DayNightSwitchLevelMigrated added to the dead-key cleanup list for the formal release
- Day/night switch hold to stop flip-flopping around the threshold
- After each day/night flip, further flips are held for 60 seconds, so small brightness fluctuations near the threshold no longer switch night settings on and off repeatedly
- The hold is broken early by a clear change back the other way (brightness above the 15% floor at least doubled for back to day, or at most halved for back to night, relative to the threshold's), so a manual sim time change of about 10 minutes or more still switches straight away
- LODController: added UpdateNightTime, replacing the inline brightness check in UpdateVariables. It logs each switch, the first held switch of each hold, and any early break. The initial check in the constructor is unchanged.
- Night profile pair switching follows the same hold, as it is driven by the same day/night state
Test8:
- New global day/night switch level, to make the switch to night (and back to day) earlier or later
- New DayNightSwitchLevel key in MSFS2020_AutoFPS.config / MSFS2024_AutoFPS.config, 0 to 10, default 5 (unchanged behaviour); values outside this are corrected and logged
- 0 switches to night earliest (about 10 to 20 minutes before sunset), 5 is about sunset, and 10 latest (about the end of civil twilight); the spread is wider at higher latitudes and in summer
- Night is detected from the sim's GLASSCOCKPIT AUTOMATIC BRIGHTNESS, so the timing follows the actual light level, including latitude, season and cloud cover
- A later switch to night also means a later switch back to day in the morning
- ServiceModel.cs: added DayNightSwitchLevel and NightBrightnessThreshold, loaded in LoadConfiguration; levels follow an offset exponential curve through 50% (level 0), 25% (level 5) and 15.2% (level 10), so the steps get smaller towards the 15% night floor where the sim's brightness changes more slowly (level thresholds: 50, 43, 37.2, 32.3, 28.3, 25, 22.3, 20, 18.1, 16.5, 15.2)
- Level 10 calibrated against the end of civil twilight in Singapore and Frankfurt (both 15.16%); night brightness bottoms out at 15.0%, including under a full moon
- LODController.cs: both night checks use NightBrightnessThreshold instead of the fixed 25%
- MainWindow.xaml.cs: LoadSettings log line shows DNSw:N when the level is not the default 5
- Night cloud reduction levels are now one global setting per sim config file, used by all profiles including Non-Expert
- New NightCloudReduceLevelsGlobal key in MSFS2020_AutoFPS.config / MSFS2024_AutoFPS.config, default 2, valid 1 to 3 (values outside this are corrected and logged)
- One-time migration when the new key does not exist: if all old per-profile values match, that value is used; otherwise the most common value other than 2, with ties going to the lower value; the result is logged
- Old per-profile NightCloudReduceLevels keys are left in the config file, unused, so older versions still work
- ServiceModel.cs: removed the per-profile NightCloudReduceLevels loads for IFR and VFR; LoadConfiguration now loads the global value and applies it to the Non-Expert, IFR and VFR profile slots
- ServiceModel.cs: added MigrateNightCloudReduceLevels()
- Fixed the Expert Settings label being clipped behind the Reset button after switching out of Expert mode with the title bar shown
- The checkbox label now stays "Expert", and a separate "Settings" word shows after it in non-Expert mode, in the same spot Log+ uses in Expert mode, so the Reset button and Flight Type stay in the same position in both modes
- Clicking "Settings" toggles Expert the same as clicking the "Expert" label
- MainWindow.xaml: Log+ and the new txtExpertSettings TextBlock (left margin 4) now share one grid cell
- MainWindow.xaml.cs: removed the four chkUseExpertOptions.Content assignments in LoadSettingsCore and chkLOGPlus_Click
- MainWindow.xaml.cs: new SetLogPlusVisible() method sets Log+ and "Settings" visibility, used in LoadSettingsCore, chkLOGPlus_Click and ApplyMonitorModeLayout (Log+ is now hidden rather than collapsed)
- MainWindow.xaml.cs: new txtExpertSettings_MouseLeftButtonUp handler toggles Expert
Test7:
- Licence changes
- A new MSFS_AutoFPS Licence starts with this release (LICENSE.txt, now included in the app folder).
- Main points: free personal use only; no redistribution or derivative works without my written permission; no decompiling or reverse engineering; the original and previous authors must be credited; the app name and icon are not licensed.
- Documents updated: LICENSE.txt, README.md, README (Original Format).md and README.pdf (licence section added).
- README changes
- Restored credits to the earlier authors, colours and symbols explanations, main controls, Auto Target FPS, graphics mode usage, install and uninstall notes, and extra FAQ entries.
- Full technical detail moved into collapsed drop-downs in a Detailed Reference section.
- Documents updated: README.md and README.pdf.
Test6:
- VRAM+ changes
- Start Max is now cancelled automatically if VRAM reaches the reduce threshold while the FPS settle after it is still running
- When VRAM reaches the VRAM+ reduce threshold (current reading, not two consecutive readings) during the settle that follows Start Max, the Start Max extra is cleared and TLOD is dropped straight to Base Min instead of stepping down, and a log line is written: "Start Max cancelled: VRAM at X% reached the Y% reduce threshold during FPS settle, TLOD returned to Base Min"
- VRAM is now monitored throughout the settle, previously VRAM+ did not run during the settle so an overflow at the start could continue unchecked for the whole settle
- Normal VRAM+ hold and reduce behaviour is unchanged otherwise, including the two consecutive readings for hold and reduce
- ServiceModel.cs: added StartMaxActive, set when Start Max is applied and cleared when it is not applied or when the FPS settle ends
- LODController.cs: RunTick checks StartMaxActive straight after the FPS settle handling, outside the section that skips the TLOD calculation during the settle, so it runs every tick while the settle is active
- LODController.cs: RunTick clears StartMaxActive when the FPS settle is no longer active
- LODController.cs: the cancel only runs when VRAM+ is enabled, the app is not paused and a valid VRAM reading exists; when it fires it clears StartMaxActive, MinTLODExtraAmount and MinTLODExtraActive, recalculates the active LODs and range, and sets TLOD directly to the active minimum (Base Min) within the TLOD range
- LODController.cs: added a commented debug line (DEBUG builds only) before the cancel check to force VRAM to 99% for testing
- Start Max skip at session start simplified
- Start Max is now skipped only if VRAM at session start is above the VRAM+ recovery threshold, with no reduction for the starting TLOD, so systems with plenty of headroom, such as in VR, are no longer skipped unnecessarily
- The log line is now: "Start Max skipped: VRAM at X% is above the Y% recovery threshold"
- ServiceModel.cs: removed the starting TLOD calculation and the 1% per 100 TLOD reduction from the Start Max skip check in ResetCloudsLODs
- Start Max is now cancelled automatically if VRAM reaches the reduce threshold while the FPS settle after it is still running
Test5:
- Monitor only flight type
- Fixed Clouds showing Low in Sim Values when the app was started with Monitor only already selected
- ServiceModel.cs: in Monitor only, ResetCloudsLODs now sets the tracked cloudQ and cloudQ_VR values to the defaults (no sim writes), as it already did for tlod and olod; previously cloudQ stayed at 0 (Low) unless Monitor only had been selected during the run
- Fixed Clouds reading not showing green in Monitor only when it matches the sim default, as TLOD and OLOD already do
- MainWindow.xaml.cs: the in-session Clouds reading is green in Monitor only while it matches the default, and white if it ever differs
- MainWindow.xaml.cs: the Reduce readout (for example DynSet 30) from the underlying profile is no longer shown in Monitor only; Clouds is shown instead
- MSFS settings can now be changed freely at any time, in or out of a flight session
- Changes to TLOD, OLOD (PC and VR) and cloud quality made in the MSFS options update the stored defaults and the readings in the app, widget and web server immediately once saved, the same as when outside a flight session
- Nothing is logged for these changes and nothing is restored or reapplied in Monitor only
- Other flight types are unchanged: changes to managed settings during a flight session are still restored by AutoFPS and logged as before
- UserCfgQuickCheck.cs: in Monitor only, the MSFS config file is now read and parsed for changes during a flight session as well as outside one; previously in a flight session it only re-sent the previous values
- MainWindow.xaml.cs: OnUserCfgValuesChanged no longer ignores config changes in Monitor only; it updates DefaultTLOD, DefaultTLOD_VR, DefaultOLOD, DefaultOLOD_VR, DefaultCloudQ and DefaultCloudQ_VR and the tracked tlod, olod, cloudQ and cloudQ_VR values, with no logging
- MainWindow.xaml.cs: in Monitor only, the in-session settings mismatch check and restore is not used
- Fixed Clouds showing Low in Sim Values when the app was started with Monitor only already selected
Test4:
- Fixed default TLOD and OLOD not showing green when they are the sim defaults: when MSFS is connected but no flight session has started, and always in Monitor only (regression since 0.5.3.0)
- MainWindow.xaml.cs: default TLOD/OLOD are now assigned to the labels as text rather than a number, because a numeric label Content ignores the label colour
- MainWindow.xaml.cs: the connected-but-no-session branch of the live value update sets TLOD and OLOD green
- VRAM+ changes
- Start Max is now skipped when VRAM is already high at the start of a session (VRAM+ users with GPU-Z running)
- VRAM is read from GPU-Z just before Start Max is applied, and Start Max is skipped if VRAM is above the VRAM+ recovery threshold less 1% for every 100 of starting TLOD (e.g. with the default 93% recovery threshold, skipped at 94% or more at a starting TLOD of 50, and at 90% or more at a starting TLOD of 400)
- The starting TLOD used is Base Min plus the Start Max extra, including the Night TLOD÷2 limit
- When skipped, the profile starts at Base Min TLOD with the normal FPS settle, and a log line is written: "Start Max skipped: VRAM at X% is above the Y% limit for a Start Max TLOD of Z"
- No change when VRAM+ is off or no GPU-Z VRAM reading is available
- ServiceModel.cs: ResetCloudsLODs works out Start Max once (startMax) and uses it for both the extra amount and the starting TLOD
- ServiceModel.cs: added ReadVRAMUsageNow, set by LODController
- LODController.cs: added ReadVRAMUsageNow(), which reads the GPU-Z memory sensor only, with no connection check or other state changes, and returns 0 if unavailable
- LODController.cs: ReadVRAMUsageNow is assigned in the LODController constructor, after the GPU-Z check and before the initial reset
- VRAM+ tooltip and limit symbol changes
- MainWindow.xaml.cs: VRAM+ dropdown tooltip is now set in code from the live loaded hold, reduce and recovery thresholds and explains Max and Set (including that Auto Reduce Settings need not be ticked); the static tooltip was removed from MainWindow.xaml
- MainWindow.xaml.cs: the VRAM+ padlock beside TLOD in Sim Values is replaced by the limit symbol (⊤) already used when the sim's maximum TLOD is reached, since VRAM+ limits TLOD rather than locking it
- MainWindow.xaml.cs: the TLOD value has a tooltip while the limit symbol is shown, explaining that VRAM+ is limiting TLOD (holding it so it cannot increase, or reducing it) and that it is not locked at that value
- README.md: expanded VRAM+ section (modes, hold, reduce and recovery behaviour, limit symbol, Start Max advice and skip rule), corrected the thresholds config file reference to MSFS2020_AutoFPS.config / MSFS2024_AutoFPS.config, and added a Start Max advice note to the Expert section
- Start Max is now skipped when VRAM is already high at the start of a session (VRAM+ users with GPU-Z running)
- Monitor only flight type
- New "Monitor only" entry at the end of the Flight Type list, in both Expert and Non-Expert
- AutoFPS stops changing any sim settings and only monitors (status line shows Monitor Mode)
- On selecting it, the sim is first returned to your own default TLOD, OLOD, cloud quality and key settings
- It is a global state and is remembered between sessions until another flight type is chosen
- Choosing any other flight type leaves Monitor only, reloads that profile and does a full reset
- It is not a profile: the active profile and all its settings are left untouched underneath
- It cannot be renamed
- Expert panel is hidden while in Monitor only
- General panel becomes a single line in Monitor only: On top (left aligned), Dark, Log+ and Flight Type
- Target FPS controls (mode, graphics mode, FPS) and the Expert checkbox are hidden while in Monitor only
- Reset is hidden while in Monitor only, except when no sim is running (where it still switches the MSFS 2020/2024 view)
- Log+ is forced on and locked (ticked and greyed out) while in Monitor only; your saved Log+ setting is restored on leaving
- The same changes are mirrored in the in-game widget and web server: Target FPS, Expert and Reset hidden, Dark moved to the Flight Type line, Log+ locked on and dimmed
- Widget Target FPS, mode, Target, Expert and Log+ changes are ignored while in Monitor only
- VR, sim rate and Night profile auto-switching are suspended while in Monitor only
- Flight Type tooltip updated to describe it
- Previous MonitorMode config file method removed as the way to enable it; the config key is now only where the selection is saved
- ServiceModel.cs: added SetMonitorMode(bool), which resets clouds/LODs to defaults on entry, clears VRAM hold/reduce state, saves the MonitorMode key and forces Log+ on (restoring the saved Log+ setting on exit); ResetCloudsLODs does nothing in Monitor only
- LODController.cs: RunTick returns early in Monitor only; sim rate, Night profile and VR auto-switching are guarded
- MainWindow.xaml.cs: Monitor only is a pseudo-entry added to the Flight Type dropdown with its own selection handling; LoadSettings split into a wrapper and LoadSettingsCore; added ApplyMonitorModeLayout(); the Reset button visibility is overridden after the live value update
- MainWindow.xaml: named the General panel rows so the layout can be changed in code; Flight Type tooltip extended
- AutoFpsWebServer.cs: added ids for the Target row and label and the third General row; applyControls handles the monitor flag; disabled checkbox dimming style added
- Widget (HtmlWidgetPanel.html, .js, .css): same layout changes as the web server (applyMonitorLayout, panel height re-snap, disabled checkbox style)
- Widget controls data now includes a monitor flag so the widget can adapt its layout
- Widget version rolled to 1.6.2
Test3:
- Profile auto-switch matching (VR, Night and sim rate) now ignores capitalisation and unusual spacing, e.g. 'IFR night', 'IFR vr', 'IFR 2x' and 'IFR Night' now pair
- ServiceModel.cs: added NormalizeProfileName(), which turns any kind of space (e.g. a non-breaking space copied from a web page) into a normal space, removes invisible zero-width characters, reduces repeated spaces to one and removes leading/trailing spaces
- ServiceModel.cs: profile names are cleaned with NormalizeProfileName() on load, so existing names are fixed in memory
- ServiceModel.cs: added ProfileNameEndsWith(), ProfileNameWithoutSuffix() and FindProfileIndex(), used by all profile name matching
- ServiceModel.cs: IsInVRPair, GetNightPairIndex, IsNightPairedNightProfile, ApplyNightPairNightMode and the -profile command line option use the new matching
- LODController.cs: sim rate, VR and Night profile switching use the new matching
- MainWindow.xaml.cs: Flight Type list pair markers, VR rename warning and VR target mode selection use the new matching
- MainWindow.xaml.cs: profile names are cleaned with NormalizeProfileName() when renamed
Test2:
- Added Day/Night profile pairing (expert mode)
- Name two profiles the same, with one ending in " Night" (e.g. 'IFR' and 'IFR Night'), and AutoFPS uses the Night profile at night and the other profile during the day
- The pairing is checked every tick while in a flight, so the correct profile is always used, including at the start of a flight, after a manual profile change and after a reset. Outside a flight, either profile can be selected to edit its settings
- As the pairing is enforced in a flight, selecting the inactive profile of a pair to change its settings will switch straight back. To change it, either exit the flight first, or temporarily rename the Night profile so it no longer ends in " Night" (e.g. 'IFR Nite'), make the changes, then rename it back
- A profile can only have one auto-switch partner: if either profile is also part of a VR pair, the VR pair takes priority and there is no Night pairing
- Night mode is not used on the day profile of a pair (shown greyed out), and the Night profile can only use its cloud reduction (Clds), as TLOD halving is not needed on a dedicated night profile. The saved Night mode settings are kept and return if the profiles are unpaired
- The switch carries current settings over to the new profile (no reset) when both profiles use the same auto method and Manual/Auto/Fixed option, and either it is turning to night, no settings reduction is active, or the new profile can recover any active reductions itself (Auto Reduce Settings on, or VRAM+ doing the reducing). Otherwise a full reset is done, as for VR and sim rate profile switching, so reduced settings are not left stuck on a profile that cannot recover them
- Paired profiles show the ↔ marker in the Flight Type list, and renaming a profile into a pair shows an auto-switch warning
- The status line and log show Day or Night when on a Night paired profile
- ServiceModel.cs: added IsInVRPair(), GetNightPairIndex(), IsNightPaired and IsNightPairedNightProfile
- ServiceModel.cs: added ApplyNightPairNightMode(), called in LoadConfiguration for the IFR and VFR profile slots, which sets Night mode to Off on the day profile and Clds-only on the Night profile in memory (saved Both treated as Clds, TLOD÷2 as Off)
- LODController.cs: added SwitchNightPairedProfile(), called every tick
- LODController.cs: on a soft switch, TLOD Base Extra and Mountains amounts are kept within the new profile's limits, the target FPS is set for the new profile, and when switching to day, clouds reduced at night by the Night profile are restored (as the day profile does not use Night mode)
- LODController.cs: Day/Night shown in the log line for Night paired profiles
- MainWindow.xaml.cs: Night pairs added to the Flight Type list markers
- MainWindow.xaml.cs: Night mode dropdown greyed out with tooltip on the day profile, and TLOD÷2 and Both greyed out with tooltip on the Night profile (tooltips shown while disabled)
- MainWindow.xaml.cs: auto-switch warning on renaming a profile into a Night pair
- MainWindow.xaml.cs: Day/Night shown on the status line for Night paired profiles
- Night mode cloud reduction (and its daytime restore) now applies straight away instead of after FPS settle, on all profiles
- LODController.cs: night cloud reduction block moved out of the main automation block (which waits for FPS settle), with the same paused checks
- Fixed widget checkbox ticks being invisible in light mode (e.g. Expert appeared unticked), rolling the widget version to 1.6.1.
- HtmlWidgetPanel.css: checkbox tick now uses the theme text colour instead of a fixed light grey
- AutoFpsWebServer.cs: same fix in the browser version of the widget page
- Code clean up
- AutoFpsWebServer.cs
- Request now read until the headers and the full POST body (per Content-Length) have arrived, as the body can arrive in a separate packet
- Request reads now time out after 2s (socket timeouts do not apply to async reads)
- Request method and path now parsed culture-invariant
- MainWindow.xaml.cs
- GetTelemetryJson: UI thread call now times out after 500ms, so widget polls cannot pile up on the web server while the UI is busy
- HtmlWidgetPanel.js
- Startup retry check moved before event listeners are added, so a retry cannot add them twice
- AutoFpsWebServer.cs
Test1:
- Reduced Alt TLOD Top in Auto TLOD mode from 1000 to 100 ft as it was unnecessarily restrictive.
- Deprecated FPS Tolerance and FPS Cap auto methods
- Auto Method dropdown now only lists FPS Sensitivity and Auto TLOD, tooltip updated to match
- Dropdown maps index 0 to method 0 (Sensitivity) and index 1 to method 2 (Auto TLOD). Saved method numbers are unchanged (0 Sens, 1 Tol, 2 Auto TLOD, 3 FPS Cap)
- Dropdown selection is ignored while the saved method is 1 or 3, until LoadSettings converts it
- Profiles on FPS Tolerance are automatically switched to FPS Sensitivity, with a message box
- Profiles on FPS Cap are force converted using the existing FPS Cap conversion with no confirmation prompt, then a message box
- Removed the old once-per-profile FPS Cap migration offer (Yes/No prompt) and the FPSCapMigrationOffered setting
- Removed all FPS Cap specific code
- MainWindow.xaml: removed chkTLODBaseMinus, chkMaxTLODExtra, lblMaxTLODExtra and cbMaxTLODExtraCapMult
- MainWindow.xaml.cs: removed chkTLODBaseMinus_Click, chkMaxTLODExtra_Click and cbMaxTLODExtraCapMult_SelectionChange handlers
- MainWindow.xaml.cs: removed FPS Cap UI visibility logic in LoadSettings, and the FPS Cap multiplier from the TLOD Top Max, Alt TLOD Top and Base Extra multiplier tooltips
- MainWindow.xaml.cs: removed FPS Cap entries from the LoadSettings settings log line (TBXtraFPSCap, TTopXtra)
- MainWindow.xaml.cs: removed " | TLOD+ Seek" and " | FPSCap" status message text
- LODController: removed all FPS Cap and TLOD seek code (seeking, re-seek, iterations, step sizes, FPS Cap breach handling, Base Extra auto-reduce, FPS Cap cloud quality adjustment, LODScale)
- LODController: removed FPS Cap "Recalibrating TLOD Base Extra on arrival at new location" reset
- LODController: removed FPS Cap specific FPS settle handling while seeking
- LODController: removed seek headroom from TLOD clamps, TLOD now clamped to SimMaxLOD
- LODController: removed FPS Cap halving of non-expert default Max TLOD, FPS Cap term from non-expert Alt TLOD Top, and "Pri:FPSCap" from the log line
- ServiceModel: removed MinTLODExtraSeeking, MinTLODExtraIterations, MinTLODExtraIterationsMax, MinTLODExtraSeekingInitial, AboveAltTLODTopPlusTolerance, AboveAltTLODBase, TLODBaseMinus, MaxTLODExtra, TLODBasePlusReSeekEnabled, TLODBasePlusSeekStepSize, TLODBasePlusSeekMinHeadroom, TLODBasePlusSeekHeadroom, MinTLODExtraAltTLODTopTol, perfLogForInitialSeekDone, perfLogForFirstReseekDone and FPSCapMigrationOffered
- ServiceModel: TLODBaseMinus, TLODBasePlusReSeekEnabled and TLODBasePlusSeekMinHeadroom config settings no longer read (left in existing config files)
- ServiceModel: removed FPS Cap forcing of MinTLODExtra on and TLODExtraMtns off when loading profiles
- ServiceModel: removed FPS Cap "TLOD Base Extra cannot exceed TLOD Top Extra" check and message box in LoadConfiguration
- ServiceModel: kept MaxTLODExtraCapMult and its config load, as the FPS Cap conversion uses it (non-expert default of 2 removed)
- ServiceModel: ResetCloudsLODs FPS Cap parts removed (Base Extra start above Alt TLOD Top, seek and iteration resets)
- ServiceController: removed the NonExpert TLODAutoMethod reset
- Installer backs up config files when upgrading from 0.5.5.0 or earlier
- Parameters.cs: added configBackupMaxVersion = 0.5.5.0
- InstallerWorker.cs: config files (common, 2020 and 2024) backed up to ConfigBackup_ before any config reset. Previous version read from Install.log only, missing log or version treated as older (folder ConfigBackup_pre-log)
- InstallerWorker.cs: if the backup folder already exists it is left alone and logged
- InstallerWorker.cs: a backup failure is logged and does not stop the installation
- Target FPS option (Manual, Auto, Fixed) now saved per graphics mode for each profile
- ServiceModel.cs: new targetFpsOption keys (e.g. targetFpsOptionFG7, targetFpsOptionFGVFR), 0 Manual, 1 Auto, 2 Fixed, using the same mode names as the target FPS keys
- ServiceModel.cs: if a mode's key does not exist yet, it is created from the profile's legacy AutoTargetFPS / FixedTargetFPS settings
- ServiceModel.cs: legacy AutoTargetFPS / FixedTargetFPS keys kept in step with the active mode's option (for rollback to older versions)
- ServiceModel.cs: new TargetFPSOption property is the single source of truth, AutoTargetFPS and FixedTargetFPS are now read-only and derived from it
- ServiceModel.cs: LoadConfiguration now loads the active graphics mode and the one-time FG mode migration before the target FPS option
- ServiceModel.cs: added GetTargetFPSOption, GetEffectiveTargetFPSOption, SetTargetFPSOption, SetTargetFPSOptionAllModes, GetGraphicsModeKeyName and GetGraphicsModeTargetFPS
- ServiceModel.cs: reset profile to defaults sets every mode to Manual
- LODController.cs: when the graphics mode changes in flight and the new mode's option differs, the config is reloaded and the target FPS set for the new mode before the reset
- MainWindow.xaml.cs: option dropdown applies to the mode shown in the Target FPS type dropdown. For a non-active mode it is saved for later, not applied
- MainWindow.xaml.cs: selecting a non-active mode in flight shows that mode's option
- MainWindow.xaml.cs: changing graphics mode outside flight (or Man FG in flight) reloads the option for the new mode, with a reset if in flight
- MainWindow.xaml.cs: Man FG multiplier "Auto" (back to NFR) now reloads the config so the NFR option applies
- MainWindow.xaml.cs: option dropdown updates from LoadSettings and mode selection no longer count as user changes
- MainWindow.xaml.cs: FPS Cap conversion now also sets Fixed for every graphics mode of the profile
- Fixed graphics mode not returning to FG / FSR FG when Lossless Scaling is closed (also in 0.5.5.0)
- LODController.cs: when Lossless Scaling closes, the MSFS FG type is now force re-read from UserCfg.opt, as the FG flags were forced off while it ran and the file timestamp had not changed
- ServiceModel.cs: added ResetLSModeState() and ResetMSMModeState(), which clear the adaptive flag and reset the settings file timestamp so settings are re-read when the app next starts
- LODController.cs: LSFG and MSM adaptive flags now cleared when Lossless Scaling / MFG Super Motion close, so the status line no longer stays on "LSFG Adapt 1X" or "MSM Adapt 1X"
- LODController.cs: MSFS FG type now also force re-read when leaving VR, so it goes straight to FG / FSR FG instead of briefly dropping to NFR first
- LODController.cs: Man FG is now remembered when entering VR and restored when returning to 2D (previously fell back to the detected FG / FSR FG / NFR mode)
- Fixed settings reduction display being hidden by night cloud reduction in Sim Values
- MainWindow.xaml.cs: active (or disabled) settings reduction now takes priority over night cloud reduction in the Clouds/Reduce display, with the night cloud reduction shown in the tooltip
- MainWindow.xaml.cs: Clouds tooltip now cleared when night cloud reduction is not active
- Code clean up
- MainWindow.xaml.cs
- HttpClient timeouts added: 15s for the releases.json download, 5 minutes for the installer download, 15s for the installer HEAD request
- DownloadFile now has a showErrors parameter, errors are always logged, and error popups are suppressed for silent updates
- OnTick now has a re-entrancy guard so it cannot run again while one of its own message boxes is open
- OnTick errors are now caught and logged once per distinct error instead of crashing the app
- FindCompatibleReleaseUrl returns null with a logged warning if releases.json is missing or invalid, instead of throwing
- SU version label now parses the MSFS version with TryParse instead of int.Parse
- UserCfg.opt watcher creation moved to CreateLodChecker(), and its handler moved from a constructor lambda to OnUserCfgValuesChanged() (handler code unchanged)
- UserCfg.opt watcher is recreated if the active sim changes (24>20 button, or the other sim being started)
- LODController.cs
- tlod_increased now compared against tlodBefore
- Spike verification still blocks all TLOD changes (behaviour unchanged)
- GPU-Z: added CloseGpuz(), process check every 10s once connected, retry every 30s when unavailable
- GPU-Z: missing GPU Load sensor now logged once, and no longer reported as a successful connection
- Night cloud reduction flag now always cleared at daytime
- SetActiveLODs: night/day transition steps and Mountains extra ramp/timer now only advance once per tick (stepAllowed / activeLODsStepTick), as SetActiveLODs can be called several times per tick
- SetActiveLODs: night/day transitions now step from saved unadjusted TLOD Min/Max values (transitionMinTLOD / transitionMaxTLOD), so the TLOD Min reduction, Mountains residual and spike reduction are applied once per pass instead of compounding during the transition
- Hysteresis decay changed to 5 minutes on the ground and 2 minutes airborne
- Auto Target FPS now has a minimum of 10
- Perf buffer resize now resets _currentIndex to 0
- Removed dead Auto Target FPS branch, duplicate !FGInactive check and "- 000" in the Mountains trigger
- ServiceModel.cs
- ResetCloudsLODs: mid altitude reset TLOD now only uses halved Max TLOD at night (NightTime check was missing)
- Power plan: original and applied plan GUIDs saved to the common config (PowerPlanRestoreGuid, PowerPlanAppliedGuid) when the plan is switched, and cleared on restore
- Power plan: at startup, if restore info was left by an unclean exit, the original plan is restored, but only if the applied plan is still active
- Power plan: plan name now parsed with ParsePowerPlanName(), which returns null instead of throwing if the powercfg output has no name in brackets
- Priority and affinity: the delayed 500ms re-set now only runs for the most recent apply/restore (generation counter), so a quick off/on toggle can't be undone by the earlier delayed re-set
- ApplyPerfOptAffinity: full mask now correct at 64 or more logical processors
- ApplyPerfOptAffinity: skipped and logged if the built mask is 0 (no hyperthreaded cores found)
- GetLSModeMultiplier: XML load failure now keeps the current multiplier and retries next tick
- GetLSModeMultiplier: missing LSFG3Multiplier element returns 1 instead of throwing, and short mode values are guarded
- GetMSMMultiplier: retries next tick after a read failure
- ReadOFXRStatusJson: if status.json stops updating for more than 4s, it is treated as stale (inactive, output FPS 0, build reset, falls back to legacy detection), logged once
- ReadVXRStatusJson: if the status file stops updating for more than 4s, it is treated as stale (inactive), logged once
- IsOFXRArmed: retries the log read after a failure instead of waiting for the log to change
- LoadConfiguration: AltTLODBase below 10 now corrected in memory as well as in the config, for IFR and VFR. VFR no longer uses SetSetting, which reloaded the config from inside LoadConfiguration
- LoadConfiguration: VRAMOverflowSettingsRecovery fallback is now Min(ReduceTLOD - 5, HoldTLOD - 1), so it always ends up below the hold threshold
- LoadConfiguration: VFR AltTLODTop key no longer has profileSuffix appended, which was creating unused AltTLODTop_VFR# and AltTLODTop_SensTol_VFR# entries while a user profile was active
- LoadConfiguration: removed superfluous profileSuffix from the CloudRecoverGPUPct_VFR key (no effect, as it only applied to the VFR profile)
- ServiceController.cs
- Wait() in the Run loop wrapped in a try/catch, logged as critical, with a 5s sleep after an error
- Outer catch now logs and sets Model.ServiceExited = true so the app shuts down normally
- Compat test wait loop now exits if MSFS closes, logs a warning, sets IsSimRunning false and returns false if the test didn't complete
- MemoryManager.cs
- RestoreUserCfgOptSettings: a failed format check is now logged, the temp file deleted, and it falls back to RestoreUserCfgOptFile()
- RestoreUserCfgOptFile: catch block log labels corrected
- SetTLOD / SetOLOD: non-finite values are ignored with a logged warning and the current value is returned
- SetTLOD / SetOLOD: values now clamped to SimMaxLOD
- IPCManager.cs
- RefreshCamState returns early if SimConnect is null or not connected
- IsSim2024 result cached for 5s
- App.xaml.cs
- Removed the 0.5.4.x widget onboarding block
- ConfigurationFile.cs
- All access now locked
- Saves now write to .tmp then replace the config file, with up to 5 retries, and the temp file is deleted if the replace fails
- Repair regex now allows empty values
- UserCfgQuickCheck.cs
- Tick: a failure reading the file's last write time is skipped until next tick
- Tick: read errors (file locked or part written by MSFS) are now caught and logged once, and retried next tick
- Tick: lastWriteTime now only advanced after a successful read
- CpuHeadroom.cs
- Uses PdhAddEnglishCounter, so it works on non-English Windows
- PopCount now on ulong
- Process objects now disposed
- 1s sleep in the PdhCoreSampler constructor kept as is
- AutoFpsWebServer.cs
- Host and Origin request headers now parsed
- Requests not addressed to localhost/127.0.0.1, or with an http(s) Origin other than this server, are rejected with 403 (OPTIONS requests not checked), logged once per session
- Added using System.Linq
- MobiSimConnect.cs
- Receive thread now sleeps before continuing after an error
- Logger.cs
- No longer adds log entries to MessageQueue
- Installer
- InstallerWorker.cs: Run() now wraps RunCore() in a try/catch, and an unexpected error shows the reason and next steps instead of leaving the installer stuck
- InstallerWorker.cs: added ParseVersion
- InstallerFunctions.cs: Unblock-File path now quoted, with apostrophes escaped. EXE.xml handling unchanged
- InstallerWindow.xaml.cs: return after each Shutdown in the constructor
- InstallerWindow.xaml.cs: -quickupdate now detected with args.Any
- InstallerWindow.xaml.cs: uninstall now removes auto-start entries and the desktop link before deleting the app folder
- Unchanged files
- GpuzWrapper.cs, ConfigParser.cs, NotifyIconViewModel.cs
- Deliberately not changed
- EXE.xml encoding code in InstallerFunctions
- 1s sleep in the PdhCoreSampler constructor
- Sim-rate profile not switching back at 1X (intended)
- MainWindow.xaml.cs