diff options
| author | Tero K <tero.k@granitedevices.fi> | 2016-01-06 20:53:25 +0200 |
|---|---|---|
| committer | Tero K <tero.k@granitedevices.fi> | 2016-01-06 20:53:25 +0200 |
| commit | 2ce73dbccca8b14e8483ee491b78a0447ef56036 (patch) | |
| tree | 1719a58798ee477151229ff7af3bc215008e8e6f | |
| parent | b912f6291444b32015ff302af6669cf2b760e985 (diff) | |
| download | SimpleMotionV2-2ce73dbccca8b14e8483ee491b78a0447ef56036.tar.gz SimpleMotionV2-2ce73dbccca8b14e8483ee491b78a0447ef56036.zip | |
Fix CRC calculation of smFastUpdateCycle function
| -rw-r--r-- | simplemotion.c | 2 |
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
}
|
