Closed weinrank closed 5 years ago
Anything missing to merge this PR?
hiya you did fix some possible div0 but also deleted a bunch of code, which means we have to do a lot more work to review this PR. if you'd like to get the div0 bug fixed sooner, please submit that as a separate standalone PR!
Okay, I'll split this in two PRs
This PR fixes two possible 'Division by Null' cases when the r,g,b values are null which happens if the sensor operates in darkness. See #30 The
calculateColorTemperature
andcalculateColorTemperature_dn40
functions now return with zero.In addition, I've fixed multiple compiler warnings and removed unused variables/code.