Skip to content

Commit 36e3b6f

Browse files
committed
Added a printout of the Mux address, Mux Port, and Device address in
the "Help text" for the TMP102 temp sensor. This allows setups with multiple TMP102 devices on multiple busses to disambiguate between all of the sensors. (To associate the correct lake depth with the correct sensor in my particular use case.)
1 parent e4ca556 commit 36e3b6f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Firmware/OpenLog_Artemis/Sensors.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1481,10 +1481,14 @@ static void getHelperText(char* helperText, size_t lenText)
14811481
break;
14821482
case DEVICE_TEMPERATURE_TMP102:
14831483
{
1484+
14841485
struct_TMP102 *nodeSetting = (struct_TMP102 *)temp->configPtr;
14851486
if (nodeSetting->log)
14861487
{
1487-
strlcat(helperText, "TMP102 degC,", lenText);
1488+
// Include unique ID's for bus/port/address for each TMP102 temp sensor
1489+
char tempTxt[25];
1490+
sprintf(tempTxt,"TMP102 %02X-%d-%02X DegC,", temp->muxAddress, temp->portNumber, temp->address);
1491+
strlcat(helperText, tempTxt, lenText);
14881492
}
14891493
}
14901494
break;

0 commit comments

Comments
 (0)