Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Off be one error in getSerialNumber #11

Closed
ogni4247 opened this issue Mar 26, 2021 · 1 comment
Closed

Off be one error in getSerialNumber #11

ogni4247 opened this issue Mar 26, 2021 · 1 comment

Comments

@ogni4247
Copy link

In getSerial number, there is an off by one error when terminating the string:
{
// request from SCD30
if (ReadFromSCD30(CMD_READ_SERIALNBR, (uint8_t *) val, SCD30_SERIAL_NUM_WORDS * 2) != SCD30_SERIAL_NUM_WORDS * 2) return(false);
val[(SCD30_SERIAL_NUM_WORDS * 2) + 1] = 0x0; // terminate
return(true);
}

It should be:
val[(SCD30_SERIAL_NUM_WORDS * 2)] = 0x0; // terminate

@paulvha
Copy link
Owner

paulvha commented Jan 26, 2023

closing old issues

@paulvha paulvha closed this as completed Jan 26, 2023
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

No branches or pull requests

2 participants