Skip to content

Commit

Permalink
https://github.com/bareboat-necessities/bbn_esp32_sensors_hub/issues/1
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrouch committed Dec 18, 2024
1 parent 2ab8b67 commit 3cccaa6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions i2c_ain_4_20ma.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ MODULE_4_20MA i2c_ain_4_20ma_sensor_1; // I2C additional bus

void i2c_ain_4_20ma_report(MODULE_4_20MA *i2c_ain_4_20ma_sensor) {
if (i2c_ain_4_20ma_sensor == &i2c_ain_4_20ma_sensor_0) {
gen_nmea0183_xdr("$BBXDR,I,%.5f,A,AMPS", (float)(i2c_ain_4_20ma_sensor.getCurrentValue(0)) / 100.0 / 1000.0); // Amp
gen_nmea0183_xdr("$BBXDR,I,%.5f,A,AMPS", (float)(i2c_ain_4_20ma_sensor->getCurrentValue(0)) / 100.0 / 1000.0); // A
} else {
gen_nmea0183_xdr("$BBXDR,I,%.5f,A,AMPS_1", (float)(i2c_ain_4_20ma_sensor.getCurrentValue(0)) / 100.0 / 1000.0);
gen_nmea0183_xdr("$BBXDR,I,%.5f,A,AMPS_1", (float)(i2c_ain_4_20ma_sensor->getCurrentValue(0)) / 100.0 / 1000.0);
}
}

Expand Down

0 comments on commit 3cccaa6

Please sign in to comment.