Telemetry
Telemetry copied to clipboard
TM_transport size inconsistency (telemetry_utils.h)
struct TM_transport {
int32_t (*read)(uint8_t * buf, uint32_t sizeToRead);
int32_t (*readable)();
int32_t (*write)(uint8_t * buf, uint32_t sizeToWrite);
int32_t (*writeable)();
};
Return types for each should match the potential 'readable' or 'writeable'. For instance, if 'sizeToRead' is an uint32_t, then the return should also be a uint32_t. This issue is present in the examples, source code, and wiki.
Good catch Jason, I was planning to eventually return negative error code but returning 0 should be enough to signal an error.