Skip to content

Commit

Permalink
fix cpm value
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
  • Loading branch information
mblaschke committed Aug 17, 2021
1 parent e176a89 commit cc4aedb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion serial.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (d *GqGmcDevice) GetCpm() (cpm *float64) {
}

if buf, err := d.read(2); err == nil {
if len(buf) == 1 {
if len(buf) == 2 {
val := float64(binary.BigEndian.Uint16(buf))
cpm = &val
}
Expand Down

0 comments on commit cc4aedb

Please sign in to comment.