mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-14 15:31:31 +10:00
I thought git would be smart enough to understand all the whitespace changes but even with all the flags I know to make it ignore theses it still blows up if there are identical changes on both sides.
I have a solution but it require creating a new commit at the merge base for each conflicting PR and merging it into develop.
I don't think blowing up all PRs is worth for now, maybe if we can coordinate this for V3 let's say.
This reverts commit 0d11331d18.
This commit is contained in:
@@ -11,42 +11,44 @@
|
||||
|
||||
DFRobotLarkSensor::DFRobotLarkSensor() : TelemetrySensor(meshtastic_TelemetrySensorType_DFROBOT_LARK, "DFROBOT_LARK") {}
|
||||
|
||||
bool DFRobotLarkSensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) {
|
||||
LOG_INFO("Init sensor: %s", sensorName);
|
||||
lark = DFRobot_LarkWeatherStation_I2C(dev->address.address, bus);
|
||||
bool DFRobotLarkSensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)
|
||||
{
|
||||
LOG_INFO("Init sensor: %s", sensorName);
|
||||
lark = DFRobot_LarkWeatherStation_I2C(dev->address.address, bus);
|
||||
|
||||
if (lark.begin() == 0) // DFRobotLarkSensor init
|
||||
{
|
||||
LOG_DEBUG("DFRobotLarkSensor Init Succeed");
|
||||
status = true;
|
||||
} else {
|
||||
LOG_ERROR("DFRobotLarkSensor Init Failed");
|
||||
status = false;
|
||||
}
|
||||
initI2CSensor();
|
||||
return status;
|
||||
if (lark.begin() == 0) // DFRobotLarkSensor init
|
||||
{
|
||||
LOG_DEBUG("DFRobotLarkSensor Init Succeed");
|
||||
status = true;
|
||||
} else {
|
||||
LOG_ERROR("DFRobotLarkSensor Init Failed");
|
||||
status = false;
|
||||
}
|
||||
initI2CSensor();
|
||||
return status;
|
||||
}
|
||||
|
||||
bool DFRobotLarkSensor::getMetrics(meshtastic_Telemetry *measurement) {
|
||||
measurement->variant.environment_metrics.has_temperature = true;
|
||||
measurement->variant.environment_metrics.has_relative_humidity = true;
|
||||
measurement->variant.environment_metrics.has_wind_speed = true;
|
||||
measurement->variant.environment_metrics.has_wind_direction = true;
|
||||
measurement->variant.environment_metrics.has_barometric_pressure = true;
|
||||
bool DFRobotLarkSensor::getMetrics(meshtastic_Telemetry *measurement)
|
||||
{
|
||||
measurement->variant.environment_metrics.has_temperature = true;
|
||||
measurement->variant.environment_metrics.has_relative_humidity = true;
|
||||
measurement->variant.environment_metrics.has_wind_speed = true;
|
||||
measurement->variant.environment_metrics.has_wind_direction = true;
|
||||
measurement->variant.environment_metrics.has_barometric_pressure = true;
|
||||
|
||||
measurement->variant.environment_metrics.temperature = lark.getValue("Temp").toFloat();
|
||||
measurement->variant.environment_metrics.relative_humidity = lark.getValue("Humi").toFloat();
|
||||
measurement->variant.environment_metrics.wind_speed = lark.getValue("Speed").toFloat();
|
||||
measurement->variant.environment_metrics.wind_direction = GeoCoord::bearingToDegrees(lark.getValue("Dir").c_str());
|
||||
measurement->variant.environment_metrics.barometric_pressure = lark.getValue("Pressure").toFloat();
|
||||
measurement->variant.environment_metrics.temperature = lark.getValue("Temp").toFloat();
|
||||
measurement->variant.environment_metrics.relative_humidity = lark.getValue("Humi").toFloat();
|
||||
measurement->variant.environment_metrics.wind_speed = lark.getValue("Speed").toFloat();
|
||||
measurement->variant.environment_metrics.wind_direction = GeoCoord::bearingToDegrees(lark.getValue("Dir").c_str());
|
||||
measurement->variant.environment_metrics.barometric_pressure = lark.getValue("Pressure").toFloat();
|
||||
|
||||
LOG_INFO("Temperature: %f", measurement->variant.environment_metrics.temperature);
|
||||
LOG_INFO("Humidity: %f", measurement->variant.environment_metrics.relative_humidity);
|
||||
LOG_INFO("Wind Speed: %f", measurement->variant.environment_metrics.wind_speed);
|
||||
LOG_INFO("Wind Direction: %d", measurement->variant.environment_metrics.wind_direction);
|
||||
LOG_INFO("Barometric Pressure: %f", measurement->variant.environment_metrics.barometric_pressure);
|
||||
LOG_INFO("Temperature: %f", measurement->variant.environment_metrics.temperature);
|
||||
LOG_INFO("Humidity: %f", measurement->variant.environment_metrics.relative_humidity);
|
||||
LOG_INFO("Wind Speed: %f", measurement->variant.environment_metrics.wind_speed);
|
||||
LOG_INFO("Wind Direction: %d", measurement->variant.environment_metrics.wind_direction);
|
||||
LOG_INFO("Barometric Pressure: %f", measurement->variant.environment_metrics.barometric_pressure);
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user