This commit is contained in:
2024-07-03 10:37:01 +03:00
parent 618b4f4b4d
commit 8022f2e4e7

View File

@@ -159,11 +159,11 @@ READ:
} }
if (_init_config.operation_mode == HIGH_RESOLUTION_2) if (_init_config.operation_mode == HIGH_RESOLUTION_2)
{ {
*data = raw_data * (1 / 1.2 * (69.0 / _sensivity) / 2); *data = raw_data * (1 / 1.2 * ((float)SENSITIVITY_DEFAULT / _sensivity) / 2);
} }
else else
{ {
*data = raw_data * (1 / 1.2 * (69.0 / _sensivity)); *data = raw_data * (1 / 1.2 * ((float)SENSITIVITY_DEFAULT / _sensivity));
} }
ESP_LOGI(TAG, "BH1750 read success."); ESP_LOGI(TAG, "BH1750 read success.");
return ESP_OK; return ESP_OK;