Closed vikram-gaur closed 7 years ago
In the file minicps/examples/swat-s1/plc1.c:
elif lit101 <= LIT_101_M['L']: # OPEN mv101 print "INFO PLC1 - lit101 under L -> open mv101." self.set(MV101, 1) self.send(MV101, 1, PLC1_ADDR) elif lit101 <= LIT_101_M['LL']: print "WARNING PLC1 - lit101 under LL: %.2f <= %.2f." % ( lit101, LIT_101_M['LL'])
The last elif condition can never be reached since if second condition in this snippet is true then the first condition is also true.
Hi @vikram-gaur ,
Thanks for spotting this bug.
Can you please open a PR with the two elif swapped?
elif
Fixed by #5
In the file minicps/examples/swat-s1/plc1.c:
The last elif condition can never be reached since if second condition in this snippet is true then the first condition is also true.