fix contract in standard mode

This commit is contained in:
Charles 2022-10-22 15:51:12 +02:00
parent 203b040ca2
commit a982c560dc

View File

@ -409,13 +409,22 @@ void DataCallback(struct _ValueList * me, uint8_t flags)
AddLog(LOG_LEVEL_DEBUG, PSTR("TIC: Contract changed, now '%s'"), me->value);
}
// Contract subscribed (Power)
else if (ilabel == LABEL_ISOUSC || ilabel == LABEL_PREF)
// Contract subscribed (I Max)
else if (ilabel == LABEL_ISOUSC)
{
isousc = atoi( me->value);
AddLog(LOG_LEVEL_DEBUG, PSTR("TIC: ISousc set to %d"), isousc);
}
// Contract subscribed (Power in KVA)
else if (ilabel == LABEL_PREF)
{
// Convert KVA to A
isousc = atoi( me->value) * 5 ;
AddLog(LOG_LEVEL_DEBUG, PSTR("TIC: ISousc set to %d"), isousc);
}
// Serial Number of device
else if (ilabel == LABEL_ADCO || ilabel == LABEL_ADSC)
{