Browse Source

* Add FindBox led color to Label API

Giancarlo Voci 8 years ago
parent
commit
c8cdc6a8b5

+ 1 - 1
src/Modules/Dimatec/Pages.php

@@ -44,7 +44,7 @@ class Pages extends Controller
       $msgBlink = new QueueCommand($labelid);
       $msgSaveP = new QueueCommand($labelid);
 
-      $msgBlink->setLeds(2, 1, 1000, 16);
+      $msgBlink->setLeds(2, 1, 1000, 16, 2);
       $msgSaveP->saveProducts($commessa['descrizione'], [
         'Q.ta' => $commessa['qta_prelevare'],
         'Commessa' => $commessa['commessa']

+ 1 - 1
src/OpenMind/FindBox/FindBoxService.php

@@ -111,7 +111,7 @@ class FindBoxService
           $esl = new SmartESL($this->findBoxCore, [$label->id]);
           $ledParams = $label->params;
 
-          $esl->BlinkSpecial($ledParams['pattern'], $ledParams['repeat'], $ledParams['iter_time'], $ledParams['iterations'], 0);
+          $esl->BlinkSpecial($ledParams['pattern'], $ledParams['repeat'], $ledParams['iter_time'], $ledParams['iterations'], $ledParams['color']);
           $label->tsLastLongBlink = time();
         }
       }

+ 3 - 2
src/OpenMind/FindBox/QueueCommand.php

@@ -29,14 +29,15 @@ class QueueCommand
     $this->tsFirstBlink = time();
   }
 
-  public function setLeds(int $pattern, int $repeat, int $iter_time, int $iterations)
+  public function setLeds(int $pattern, int $repeat, int $iter_time, int $iterations, int $color)
   {
     $this->operation = Q_BLINK_ON;
     list(
       $this->params['pattern'],
       $this->params['repeat'],
       $this->params['iter_time'],
-      $this->params['iterations']
+      $this->params['iterations'],
+      $this->params['color']
       ) = func_get_args();
   }