aboutsummaryrefslogtreecommitdiff
path: root/simplemotion.c
diff options
context:
space:
mode:
authorTero K <tero.k@granitedevices.fi>2016-01-06 20:53:25 +0200
committerTero K <tero.k@granitedevices.fi>2016-01-06 20:53:25 +0200
commit2ce73dbccca8b14e8483ee491b78a0447ef56036 (patch)
tree1719a58798ee477151229ff7af3bc215008e8e6f /simplemotion.c
parentb912f6291444b32015ff302af6669cf2b760e985 (diff)
downloadSimpleMotionV2-2ce73dbccca8b14e8483ee491b78a0447ef56036.tar.gz
SimpleMotionV2-2ce73dbccca8b14e8483ee491b78a0447ef56036.zip
Fix CRC calculation of smFastUpdateCycle function
Diffstat (limited to 'simplemotion.c')
-rw-r--r--simplemotion.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/simplemotion.c b/simplemotion.c
index fb53522..b94f488 100644
--- a/simplemotion.c
+++ b/simplemotion.c
@@ -376,7 +376,7 @@ SM_STATUS smFastUpdateCycle( smbus handle, smuint8 nodeAddress, smuint16 write1,
}
//parse
- if( cmd[5]==calcCRC8Buf(cmd,4,0x52) || cmd[0]!=SMCMD_FAST_UPDATE_CYCLE_RET )
+ if( cmd[5]!=calcCRC8Buf(cmd,5,0x52) || cmd[0]!=SMCMD_FAST_UPDATE_CYCLE_RET )
{
return recordStatus(handle,SM_ERR_COMMUNICATION);//packet error
}