Closed aselafernando closed 9 months ago
Thanks @aselafernando! I'll have a proper look at it this weekend
Made the changes, I also corrected a bug in the pro file where it wasn't copying the sensor json files over to the install directory.
I left m_pluginSettings.eventListeners = QStringList() << "AndroidAuto::connected";
in as the plugin does rely on this event to ensure that as soon as a phone is connected it sets the night mode value.
Made the changes, I also corrected a bug in the pro file where it wasn't copying the sensor json files over to the install directory.
I left
m_pluginSettings.eventListeners = QStringList() << "AndroidAuto::connected";
in as the plugin does rely on this event to ensure that as soon as a phone is connected it sets the night mode value.
Perfect, thanks!
Added a plugin to set night mode based on the value read from an i2c light sensor. Different sensors can be added through json files in the sensor folder. Reading of the sensor can be disabled by setting the refresh interval to 0 (default).
It'll read the ambient light level from the specified register in the json file. In addition it has the ability to write a value to a configuration register each time, in case the module needs a write to turn it on.
This requires libi2c-dev be installed to compile (will need the wiki updated).