[x] I signed and emailed the appropriate Contributor License Agreement to GSFC-SoftwareRelease@mail.nasa.gov and copied cfs-program@lists.nasa.gov.
Describe the contribution
Fixes #15
Refactors LC_HousekeepingReq() (previously named LC_SampleAPReq()) to combine 4 switch blocks into 1 for the watch results, and 4 switch blocks into 2 for the action points.
Minor update to LC_SampleAPReq() to reduce nesting a little (early continue in for loop)
The only other thing I can see to simplify LC_SampleAPReq is to add an early return to the first if condition, or to combine the 1st if condition with the 2nd (which results in a triple if-condition which is less clear than the current implementation) - it did not seem worth making these changes.
Testing performed
GitHub CI actions all passing successfully (incl. Build + Run, Unit/Coverage Tests etc.).
Checklist
Describe the contribution
LC_HousekeepingReq()
(previously namedLC_SampleAPReq()
) to combine 4switch
blocks into 1 for the watch results, and 4switch
blocks into 2 for the action points.LC_SampleAPReq()
to reduce nesting a little (early continue infor
loop)LC_SampleAPReq
is to add an early return to the firstif
condition, or to combine the 1stif
condition with the 2nd (which results in a triple if-condition which is less clear than the current implementation) - it did not seem worth making these changes.Testing performed GitHub CI actions all passing successfully (incl. Build + Run, Unit/Coverage Tests etc.).
Expected behavior changes No change to behavior.
Contributor Info Avi Weiss @thnkslprpt