Closed jrw429 closed 1 year ago
Sorry, should have made a separate branch for pull request. It is putting all my commits into the pull request.
Sign might potentially be used in the future: https://github.com/adafruit/Adafruit_AS7341/blob/e62011db6d15cab6748b78c44d3296b6352c6fe3/Adafruit_AS7341.cpp#L249C9-L251
What issues is the current parameter type causing?
It is not causing any problem I'm aware of. However, I compile with -Wall and this was shown as a warning. It is fine to keep it as a signed int and change "elapsedMillis < waitTime" to "elapsedMillis < (uint32_t)waitTime". That gets rid of the warning, explicitly says we know what we are doing, and retains the future use of negative values.
Oh, OK, I see in the PR better what's going on. Just need a local explicit cast in a conditional. Originally thought the suggestion was to change the parameter type in the function itself.
Closing. Fixed with #23.
Need to cast variable to be compatible with Arduino millis in Adafruit_AS7341::delayForData.