Small bug fixes and emergency recovery from sun.#4
Open
Wauxadd wants to merge 4 commits intoStumpii:mainfrom
Open
Small bug fixes and emergency recovery from sun.#4Wauxadd wants to merge 4 commits intoStumpii:mainfrom
Wauxadd wants to merge 4 commits intoStumpii:mainfrom
Conversation
…ization editor, GUI, waypoint editor, key bindings, autopilot logic, and OCR functionality.
New method _is_in_supercruise_or_space() — Checks ship state using both journal and status.json flags to avoid race conditions where the journal reader is slower than status flags. Refactored status checks — Replaced inline jn.ship_state()['status'] == 'in_supercruise' or ... == 'in_space' checks in nav_align(), mnvr_to_target(), and jump() with the new helper. mnvr_to_target() retry loop — Instead of immediately throwing, waits up to 5 seconds (10 × 0.5s) for the ship to reach supercruise/space before raising an exception. New method recover_from_sc_drop(scr_reg) — Handles unexpected supercruise drops near a star: pitches away, boosts clear, waits for FSD cooldown, re-enters supercruise, and escapes the star. fsd_assist() — sun-ahead check on manual restart — If already in supercruise when FSD assist starts and the sun is dead ahead, performs refuel + position sequence. fsd_assist() — SC drop recovery integration — Detects sc_exit_body_type == 'Star' at three points in the jump loop (after jump, after refuel, after position) and triggers recover_from_sc_drop(). Reset nav correction offsets — Clears _nav_cor_x / _nav_cor_y before each alignment pass. EDJournal.py (staged) New ship state field sc_exit_body_type — Initialized to '', cleared on SupercruiseEntry/FSDJump, and set from SupercruiseExit event's BodyType field. Used to detect drops near stars. StatusParser.py (staged) Reduced log noise — Only logs retry messages from attempt 2+; success message only from attempt 3+. Capped retry backoff — backoff is now capped at 1.0s via min(backoff * 2, 1.0). Added else clause — Handles the case where the for loop exhausts all attempts without a successful read.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have made some small bug fixes and also added emergency recovery if rammed to the sun.