mirror of https://github.com/arendst/Tasmota.git
parent
722406a461
commit
79161d3c43
|
@ -17,13 +17,12 @@
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
Example Command: modbussend {"deviceaddress": 1, "functioncode": 3, "startaddress": 1, "type":"uint8", "count":4}
|
||||
*/
|
||||
|
||||
#ifdef USE_MODBUS_BRIDGE
|
||||
/*********************************************************************************************\
|
||||
* Modbus Bridge using Modbus library (TasmotaModbus)
|
||||
*
|
||||
* Example Command:
|
||||
* ModbusSend {"deviceaddress": 1, "functioncode": 3, "startaddress": 1, "type":"uint8", "count":4}
|
||||
\*********************************************************************************************/
|
||||
|
||||
#define XDRV_63 63
|
||||
|
|
|
@ -101,7 +101,7 @@ bool Bh1750Read(uint32_t sensor_index) {
|
|||
if (2 != Wire.requestFrom(Bh1750_sensors[sensor_index].address, (uint8_t)2)) { return false; }
|
||||
|
||||
float illuminance = (Wire.read() << 8) | Wire.read();
|
||||
illuminance /= (1.2 * (69 / (float)Bh1750_sensors[sensor_index].mtreg));
|
||||
illuminance *= 57.5 / (float)Bh1750_sensors[sensor_index].mtreg; // Fix #16022
|
||||
if (1 == Bh1750Resolution(sensor_index)) {
|
||||
illuminance /= 2;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue