error counting, fix

This commit is contained in:
Wolfgang Hottgenroth 2020-09-07 19:48:07 +02:00
parent 1ca935742a
commit c9acb92466
Signed by: wn
GPG Key ID: 6C1E5E531E0D5D7F

View File

@ -66,7 +66,7 @@ abstract public class MbusDevice {
}
public double getErrorRatio() {
return this.errorCnt / this.successCnt;
return this.errorCnt / (this.successCnt + this.errorCnt);
}
public void parse(byte[] frame) throws MbusException {