|
@@ -108,8 +108,9 @@ $ws_worker->onWorkerStart = function($ws_worker)
|
|
|
$file_path .= '0';
|
|
|
}
|
|
|
// $cmd .= $file_path;
|
|
|
- $crc = crc16(pack('H*', $cmd).$file_path);
|
|
|
- $mqtt->publish($topick.$address, pack('H*', $cmd).$file_path.pack('H*',).$crc);
|
|
|
+ $cmd = pack('H*', $cmd);
|
|
|
+ $crc = crc16($cmd.$file_path);
|
|
|
+ $mqtt->publish($topick.$address, $cmd.$file_path.pack('H*',$crc));
|
|
|
|
|
|
$index = strtolower($address);
|
|
|
$devUpdateList[$index] = array('client'=>$client,'lamp_id'=>$v['lamp_id'],'time'=>time(),'type'=>0,'step'=>0,'number'=>$number);
|