|
@@ -98,10 +98,11 @@ $ws_worker->onWorkerStart = function($ws_worker)
|
|
|
$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);
|
|
|
- $websocketDB->update('lampinfo')->cols(array('is_update'=>1))->where('id='.$v['lamp_id']);
|
|
|
+ // $devUpdateList[$index] = array('client'=>$client,'lamp_id'=>$v['lamp_id'],'time'=>time(),'type'=>0,'step'=>0,'number'=>$number);
|
|
|
+ // $websocketDB->update('lampinfo')->cols(array('is_update'=>1))->where('id='.$v['lamp_id']);
|
|
|
unset($devList[$k]);
|
|
|
- continue;
|
|
|
+ $data = ['code'=>'0000','status'=>2,'msg'=>'Successful operation','data'=>['type'=>'updateDev','id'=>$v['lamp_id'],'status'=>2,'step'=>100,'number'=>$number]];
|
|
|
+ // continue;
|
|
|
}else{
|
|
|
$data = ['code'=>'9999','status'=>2,'msg'=>'No firmware file found, please contact your administrator','data'=>['type'=>'updateDev','id'=>$v['lamp_id'],'status'=>2,'number'=>$number]];
|
|
|
}
|