Skip to content

Fix #90, standardize patterns across all internal functions - #510

Open
jphickey wants to merge 2 commits into
nasa:devfrom
jphickey:fix-90-chan-access-patterns
Open

Fix #90, standardize patterns across all internal functions#510
jphickey wants to merge 2 commits into
nasa:devfrom
jphickey:fix-90-chan-access-patterns

Conversation

@jphickey

@jphickey jphickey commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Checklist (Please check before submitting)

Describe the contribution
Updates all code to follow the same pattern:

  • channel numbers are used only in CMD/TLM/Tables (external)
  • channel number is converted to a pointer, with error checking
  • only channel pointer is used therein

This change removes all ambiguity about whether the passed-in value is range checked or not. Repeated conversions between channel number and channel pointer are removed, and code is much simpler as a result.

Fixes #90
Fixes #288

Testing performed
Execute file transfers to verify operation

System(s) tested on
Linux

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

Updates all code to follow the same pattern:
 - channel numbers are used only in CMD/TLM/Tables (external)
 - channel number is converted to a pointer, with error checking
 - only channel pointer is used therein

This change removes all ambiguity about whether the passed-in value is
range checked or not.  Repeated conversions between channel number and
channel pointer are removed, and code is much simpler as a result.

Also fixes nasa#288
@jphickey
jphickey force-pushed the fix-90-chan-access-patterns branch from d6e5adf to d82f543 Compare August 6, 2026 11:59
@chillfig
chillfig self-requested a review August 6, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace CF_UnionArgs_Payload_t union with correct payload definition Inconsistent parameter passing (chan_num vs. channel pointer)

2 participants