FACTORS FOR CALCULATION OF LUX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

Factors for calculation of lux β€” like, the whole rundown on how lux actually gets calculated, straight out of the Kernel API Manual bestie ✨

(also it's filed under Factors for ...ation of lux(9) in the header/footer if you're looking for it, no cap πŸŽ€)


🌸 DESCRIPTION 🌸

Okay so first thing: static const int veml6046x00_it_gains β€” that's the array, and it contains the factors for calculation of lux. That's its whole job. Iconic of it honestly πŸ’…

Here's the vibe: depending on the set up integration time (IT), the gain, and the photodiode size (PD), the measured raw values come out different even when the light is literally constant. Like, same light, different numbers?? that's just how it is bestie 😭

But plot twist β€” the gain and the PD are already coupled together in the driver (peep struct veml6046x00_gain_pd), so that leaves only two dimensions remaining:

  • IT
  • gain(driver)

Periodt. Two.

The array of available factors for a certain IT are grouped together in the same form as expected by the callback of scale_available (IIO_CHAN_INFO_SCALE) β€” so it just slots right in, no drama 🫢

And the factors for lux / raw count? Taken directly from the datasheet. fr fr, no guessing, no vibes-based math πŸ”₯

No cap: the raw count only means something once you've got the right factor for your IT + gain situation, so don't skip this part πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹


That's the whole page, bestie, go read the related ones too, iykyk πŸ‘‘

Source path: ./drivers/iio/light Β· dated October 2026 Β· shown as Factors for ...ation of lux(9) β€” mwah, bye! πŸ’‹πŸŽ€πŸŒˆ

πŸ“¦ where this page comes from