MS-PDRLKVHCADMG\Administrator %!s(int64=5) %!d(string=hai) anos
pai
achega
16bff501d1

+ 1 - 1
api/application/controllers/Base_Controller.php

@@ -246,7 +246,7 @@ class Base_Controller extends CI_Controller {
         $seq = '9'.substr($funcode,-1);
         $seq = strtolower($seq);
         set_log('get_load.txt',$seq);
-        // $seq = '';
+        $seq = '';
         return lampMqttCmd('/IDCOL/CmdInput/'.$address,'/IDCOL/CmdOutput/'.$address,pack('H*',$sendData),$timeout,$seq);
     }
 

+ 1 - 1
api/application/helpers/function_helper.php

@@ -116,7 +116,7 @@ function lampMqttCmd($sendTopic,$backTopic,$sendData,$timeout = 5,$seq = ''){
     $t = time();
     while($true == 1){
         $true = $mqtt->proc();
-        if (!empty($seq) && $true != 1){
+        if ($true != 1){
             $res = unpack('H*', $true['msg']);
             set_log('set_load','------------');
             set_log('set_load',substr($res[1], 0,2));