Browse Source

added more paranthesis

pull/1190/head
lumapu 1 year ago
parent
commit
44399bd483
  1. 4
      src/hm/miPayload.h

4
src/hm/miPayload.h

@ -477,8 +477,8 @@ class MiPayload {
uint16_t prntsts = statusMi == 3 ? 1 : statusMi;
if ( statusMi != mPayload[iv->id].sts[stschan] ) { //sth.'s changed?
iv->alarmCnt = 1; // minimum...
if (iv->type != INV_TYPE_1CH && ( statusMi != 3 //sth is or was wrong!
|| ( mPayload[iv->id].sts[stschan] && statusMi == 3 && mPayload[iv->id].sts[stschan] != 3) )
if ((iv->type != INV_TYPE_1CH) && ((statusMi != 3) //sth is or was wrong!
|| ((mPayload[iv->id].sts[stschan] && statusMi == 3) && (mPayload[iv->id].sts[stschan] != 3)))
) {
iv->lastAlarm[stschan] = alarm_t(prntsts, mPayload[iv->id].ts,mPayload[iv->id].ts);
iv->alarmCnt = iv->type == INV_TYPE_2CH ? 3 : 5;

Loading…
Cancel
Save