-
Notifications
You must be signed in to change notification settings - Fork 18
Make mode manager test more reliable #460
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
Open
nateinaction
wants to merge
5
commits into
main
Choose a base branch
from
dont-die-mode-manager
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f220cbb
Make mode manager more reliable
nateinaction c84e3f6
Merge branch 'main' into dont-die-mode-manager
Mikefly123 b1b4235
test: retry boot-count read after reboot — first 1Hz tick does the la…
Mikefly123 52ed1b8
test: wait for EnteringSafeMode instead of scraping event history
Mikefly123 251a28c
Merge branch 'main' into dont-die-mode-manager
Mikefly123 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Open-Source-Space-Foundation/proves-core-reference
Length of output: 244
🏁 Script executed:
Repository: Open-Source-Space-Foundation/proves-core-reference
Length of output: 541
🏁 Script executed:
Repository: Open-Source-Space-Foundation/proves-core-reference
Length of output: 1626
🏁 Script executed:
Repository: Open-Source-Space-Foundation/proves-core-reference
Length of output: 3639
🏁 Script executed:
Repository: Open-Source-Space-Foundation/proves-core-reference
Length of output: 2042
🏁 Script executed:
Repository: Open-Source-Space-Foundation/proves-core-reference
Length of output: 10900
🌐 Web query:
fprime_gds TimeType set_datetime return value TimeType.TimeBase TB_DONT_CARE💡 Result:
In the F Prime (F´) framework, TimeType is a serializable class used to store timestamp information [1]. The value TB_DONT_CARE is defined as a constant (specifically 0xFFFF) within the TimeBase enumeration [2][3][4], which is used to indicate that a sequence or operation should run regardless of the flight software's specific time base [3]. While the F Prime documentation and source code references for the TimeType class (in both C++ and Python GDS) include various setter methods—such as set for time values or setTimeBase [5]—there is no standard method named set_datetime that returns TB_DONT_CARE as a value. The confusion likely stems from the fact that TimeType objects are associated with time bases, and TB_DONT_CARE is a valid value for the time base field itself [2][4]. If you are encountering code that references a return value of TB_DONT_CARE, it is likely referring to the state or configuration of the TimeBase property rather than the return value of a specific set_datetime method. In F Prime, the TimeBase enumeration includes: - TB_NONE: No time base established [2][4] - TB_PROC_TIME: Processor cycle time [2][4] - TB_WORKSTATION_TIME: Workstation time [2][4] - TB_SC_TIME: Spacecraft time [4] - TB_FPGA_TIME: FPGA/hardware clock [4] - TB_DONT_CARE: A wildcard value used for sequences (0xFFFF) [2][3][4]
Citations:
🌐 Web query:
fprime_gds Python TimeType set_datetime TimeBase TB_DONT_CARE enum💡 Result:
In the F' (F Prime) framework, TimeBase.TB_DONT_CARE is an enumeration member used to indicate that a specific time base requirement should be ignored, typically during sequence execution [1][2][3]. Key details regarding TB_DONT_CARE and the TimeType system include: 1. Usage in Sequencing: TB_DONT_CARE (often with a value of 0xFFFF or 65535) allows sequences to execute regardless of the current flight software time base [1][3]. Other common time bases include TB_PROC_TIME, TB_WORKSTATION_TIME, and TB_SC_TIME [2][4]. 2. TimeType in GDS: The fprime_gds.common.models.serialize.time_type.TimeType class is used to store and manipulate timestamps within the GDS Python environment [5][6]. 3. Initialization: When initializing a TimeType object, the time_base argument expects an integer corresponding to a valid TimeBase enum value [5]. 4. Comparison and Math: While TimeType objects support rich comparison and mathematical operations, operations between objects with different time bases or contexts generally preserve the attributes of the left operand [7][8]. There is no specific method named set_datetime in the standard Python TimeType class provided by fprime_gds; however, the class includes a get_datetime method used to convert a TimeType into a Python datetime object [5]. The time is typically set during the instantiation of the TimeType object or via internal helper methods [5].
Citations:
🌐 Web query:
"TimeType.set_datetime" fprime_gds returns self💡 Result:
In the fprime-gds framework, the
TimeTypeclass does not have a method namedset_datetime[1][2]. The documentation forfprime.common.models.serialize.time_type.TimeTypelistsget_datetime(tz=None)as the method for retrieving a Pythondatetimeobject, but it does not include a correspondingset_datetimemethod [1]. Furthermore,TimeTypeobjects are generally designed to hold timestamp information (seconds and microseconds) and support arithmetic and comparison operations [3][4]. Internal methods such as_TimeTypeset_floatexist for internal helper purposes but are not intended for general modification of existingTimeTypeinstances [1]. The confusion may arise from comparing this to other libraries (such as PHP'sDateTime::setTime[5]) or misremembering the API structure.Citations:
Use a UTC-aware timestamp here.
assert_event(..., start=...)should be anchored withdatetime.now(timezone.utc)to avoid timezone-dependent event matching.🧰 Tools
🪛 Ruff (0.15.21)
[warning] 600-600:
datetime.datetime.now()called without atzargument(DTZ005)
🤖 Prompt for AI Agents
Sources: Coding guidelines, Linters/SAST tools