wpilibsuite / allwpilib

Official Repository of WPILibJ and WPILibC
https://wpilib.org/
Other
1.08k stars 611 forks source link

AHRS decodeDataSetResponse doesn't correctly return type and subtype #928

Closed kjaget closed 6 years ago

kjaget commented 6 years ago

Function signature is

static int decodeDataSetResponse( char *buffer, int length, AHRS_DATA_TYPE type, AHRS_TUNING_VAR_ID subtype, uint8_t& status )

Type and subtype are set in the function but since the param types aren't references the values aren't actually returned.

Not sure if this code is used anywhere but since it came up as a warning I figured I'd mention it.

Kevin-OConnor commented 6 years ago

That doesn't look like WPIlib code. NavX code perhaps?

kjaget commented 6 years ago

You are correct. Sorry for the false alarm. I'm off to figure out why the students dropped it into the wpilib tree instead of where it belongs...