mirror of https://github.com/arendst/Tasmota.git
Fix incorrect JSON in ID field. Disable active debug statements. Update documentation at beginning of source file
This commit is contained in:
parent
1d4822e6a6
commit
cf19dad985
|
@ -31,6 +31,10 @@
|
|||
* b. Sensor54 12 [full scale current in amperes] e.g. Sensor54 12 3.0
|
||||
* c. Sensor54 2 saves the settings and restarts Tasmota. The device should show up after the system boots again.
|
||||
*
|
||||
*
|
||||
* This driver will not probe I2C bus for INA226 devices unless the full scale current is set for a device number.
|
||||
* It will map device numbers as follows:
|
||||
*
|
||||
* Device number to I2C slave address mapping
|
||||
*
|
||||
* 1 - 0x40
|
||||
|
@ -38,9 +42,6 @@
|
|||
* 3 - 0x44
|
||||
* 4 - 0x45
|
||||
*
|
||||
* This driver will not probe I2C bus for INA226 devices unless the full scale current is set for a device number.
|
||||
* It will map device numbers as follows:
|
||||
*
|
||||
* To set shunt resistance and full scale current, use the Sensor54 command interface as follows:
|
||||
*
|
||||
* Sensor54 10 Return channel 1 shunt resistance and full scale current
|
||||
|
@ -124,7 +125,7 @@ static void _debug_fval(const char *str, float fval, uint8_t prec = 4 )
|
|||
{
|
||||
char fstr[32];
|
||||
dtostrfd(fval, prec, fstr);
|
||||
AddLog_P2( LOG_LEVEL_NONE, PSTR("%s: %s"), str, fstr );
|
||||
//AddLog_P2( LOG_LEVEL_NONE, PSTR("%s: %s"), str, fstr );
|
||||
}
|
||||
|
||||
|
||||
|
@ -237,7 +238,7 @@ void Ina226Init()
|
|||
|
||||
if (!I2cWrite16( addr, INA226_REG_CONFIG, INA226_CONFIG_RESET)){
|
||||
|
||||
AddLog_P2( LOG_LEVEL_DEBUG, "No INA226 at address: %02X", addr);
|
||||
//AddLog_P2( LOG_LEVEL_DEBUG, "No INA226 at address: %02X", addr);
|
||||
continue; // No device
|
||||
}
|
||||
|
||||
|
@ -512,7 +513,7 @@ void Ina226Show(bool json)
|
|||
|
||||
|
||||
if (json) {
|
||||
ResponseAppend_P(PSTR(",\"%s\":{\"Id\":%02x,\"" D_JSON_VOLTAGE "\":%s,\"" D_JSON_CURRENT "\":%s,\"" D_JSON_POWERUSAGE "\":%s}"),
|
||||
ResponseAppend_P(PSTR(",\"%s\":{\"Id\":%d,\"" D_JSON_VOLTAGE "\":%s,\"" D_JSON_CURRENT "\":%s,\"" D_JSON_POWERUSAGE "\":%s}"),
|
||||
name, i, voltage, current, power);
|
||||
#ifdef USE_DOMOTICZ
|
||||
if (0 == tele_period) {
|
||||
|
|
Loading…
Reference in New Issue