error counting, fix
This commit is contained in:
@ -66,7 +66,7 @@ abstract public class MbusDevice {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public double getErrorRatio() {
|
public double getErrorRatio() {
|
||||||
return this.errorCnt / this.successCnt;
|
return this.errorCnt / (this.successCnt + this.errorCnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void parse(byte[] frame) throws MbusException {
|
public void parse(byte[] frame) throws MbusException {
|
||||||
|
Reference in New Issue
Block a user