Fix #2657, Remove duplication in CFE_TIME_ToneSendGPS/Time functions#2658
Open
thnkslprpt wants to merge 1 commit intonasa:mainfrom
Open
Conversation
| *-----------------------------------------------------------------*/ | ||
| #if (CFE_PLATFORM_TIME_CFG_SRC_GPS == true) | ||
| int32 CFE_TIME_ToneSendGPS(CFE_TIME_SysTime_t NewTime, int16 NewLeaps) | ||
| #if (CFE_PLATFORM_TIME_CFG_SRC_GPS == true) || (CFE_PLATFORM_TIME_CFG_SRC_TIME == true) |
Check notice
Code scanning / CodeQL
Conditional compilation Note
| *-----------------------------------------------------------------*/ | ||
| #if (CFE_PLATFORM_TIME_CFG_SRC_GPS == true) | ||
| int32 CFE_TIME_ToneSendGPS(CFE_TIME_SysTime_t NewTime, int16 NewLeaps) | ||
| #if (CFE_PLATFORM_TIME_CFG_SRC_GPS == true) || (CFE_PLATFORM_TIME_CFG_SRC_TIME == true) |
Check notice
Code scanning / CodeQL
Conditional compilation Note
| */ | ||
| #if (CFE_MISSION_TIME_CFG_DEFAULT_UTC == true) | ||
| NewSTCF.Seconds += NewLeaps; | ||
| #if (CFE_PLATFORM_TIME_CFG_SRC_TIME == true) |
Check notice
Code scanning / CodeQL
Conditional compilation Note
| CFE_TIME_Global.ToneDataCmd.Payload.AtToneSTCF.Seconds = CFE_MAKE_BIG32(NewSTCF.Seconds); | ||
| CFE_TIME_Global.ToneDataCmd.Payload.AtToneSTCF.Subseconds = CFE_MAKE_BIG32(NewSTCF.Subseconds); | ||
| CFE_TIME_Global.ToneDataCmd.Payload.AtToneLeapSeconds = CFE_MAKE_BIG16(NewLeaps); | ||
| #if (CFE_PLATFORM_TIME_CFG_SRC_TIME == true) |
Check notice
Code scanning / CodeQL
Conditional compilation Note
| CFE_TIME_Global.ToneDataCmd.Payload.AtToneMET = NewMET; | ||
| CFE_TIME_Global.ToneDataCmd.Payload.AtToneSTCF = NewSTCF; | ||
| CFE_TIME_Global.ToneDataCmd.Payload.AtToneLeapSeconds = NewLeaps; | ||
| #if (CFE_PLATFORM_TIME_CFG_SRC_TIME == true) |
Check notice
Code scanning / CodeQL
Conditional compilation Note
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.
Checklist
Describe the contribution
CFE_TIME_ToneSendGPSandCFE_TIME_ToneSendTimeare almost identical #2657#ifdef's (so it doesn't come for free).Testing performed
GitHub CI actions all passing successfully (incl. Build + Run, Unit/Functional Tests etc.).
Coverage is maintained as the same level as before these changes.
Expected behavior changes
No change.
System(s) tested on
Debian 12 using the current main branch of cFS bundle.
Contributor Info
Avi Weiss @thnkslprpt