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

Fix #115, remove conditional compile on time ref #122

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

jphickey
Copy link
Contributor

Checklist (Please check before submitting)

Describe the contribution
Define a SC_TimeAccessor_t object and select the correct value for it at compile time, as opposed to preprocessor #if blocks.

Fixes #115

Testing performed
Build and run all tests

Expected behavior changes
None

System(s) tested on
Debian

Additional context
Removes untested preprocessor branches, but retains functionality

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

/* Look up the time accessor corresponding to the chosen reference */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
SC_TimeAccessor_t SC_LookupTimeAccessor(SC_TimeRef_Enum_t TimeRef)

Check notice

Code scanning / CodeQL

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.
TempTime = CFE_TIME_GetTime();
#endif
/* Use SC defined time */
TempTime = SC_AppData.TimeRef.GetTime();

Check notice

Code scanning / CodeQL

Use of non-constant function pointer Note

This call does not go through a const function pointer.
Define a SC_TimeAccessor_t object and select the correct value for it
at compile time, as opposed to preprocessor #if blocks.
@dzbaker dzbaker merged commit 4d77822 into nasa:main Oct 26, 2023
17 checks passed
@jphickey jphickey deleted the fix-115-timeref branch October 26, 2023 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove #if preprocessor conditional for time source
2 participants