Skip to content

Commit

Permalink
Merge branch 'shorten-error-messages' into 'main'
Browse files Browse the repository at this point in the history
Make all error messages shorter then 64 bytes

See merge request MSO-SW/drivers/arduino/arduino-core!35
  • Loading branch information
Rol-la committed Nov 28, 2022
2 parents c994f16 + db59864 commit 41fd02c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/SensirionErrors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,21 +97,16 @@ void errorToString(uint16_t error, char errorMessage[],
strncpy(errorMessage, "Wrong CRC found", errorMessageSize);
return;
case LowLevelError::WrongNumberBytesError:
strncpy(errorMessage,
"The number of bytes to be read are "
"not a multiple of 3",
strncpy(errorMessage, "Number of bytes not a multiple of 3",
errorMessageSize);
return;
case LowLevelError::NotEnoughDataError:
strncpy(errorMessage, "Not enough data received",
errorMessageSize);
return;
case LowLevelError::InternalBufferSizeError:
strncpy(
errorMessage,
"Can't execute this command on this board, internal "
"I2C buffer is too small",
errorMessageSize);
strncpy(errorMessage, "Internal I2C buffer too small",
errorMessageSize);
return;
}
break;
Expand Down

0 comments on commit 41fd02c

Please sign in to comment.