CalgaryToSpace / CTS-SAT-1-OBC-Firmware

Firmware for the CTS-SAT-1 ("FrontierSat") mission. Runs on the STM32-based Onboard Computer.
MIT License
8 stars 0 forks source link

Create function to parse a hex string into a byte array (`TCMD_extract_hex_array_arg`) #89

Closed DeflateAwning closed 4 months ago

DeflateAwning commented 4 months ago
uint8_t TCMD_extract_hex_array_arg(const char *args_str, uint8_t arg_index, uint8_t result_array[], uint16_t result_array_size);

Function should support ignoring spaces and underscores within the string, which are used as delimeters.

You may wish to factor out the hex parsing logic to one or more other functions, to separate it from the comma-searching nature of the TCMD_extract_ functions.

Requires a unit test.

Examples

robotoshi commented 4 months ago

This is a duplicate of #77, but with more details

parker-research commented 4 months ago

Implemented in #111