Compare commits

...

2 Commits

Author SHA1 Message Date
e26bb637ad Add target script for nightstand buttons 2025-03-06 12:50:02 -05:00
71f5c95cfc Remove debug echo statements 2025-03-06 12:49:39 -05:00
3 changed files with 13 additions and 2 deletions

View File

@ -6,7 +6,6 @@ $command = 0x00;
$target = intval($_SESSION['LEDTARGETID']);
$unique = mt_rand(1, 2000000000);
echo "Target: ", $target;
$data = pack("LLLCL", PACKETFILTER[0], PACKETFILTER[1], $unique, $command, $target);
transmitMessage($data);

View File

@ -13,7 +13,6 @@ $red = hexdec(substr($hex, 0, 2));
$green = hexdec(substr($hex, 2, 2));
$blue = hexdec(substr($hex, 4, 2));
var_dump($targets);
foreach ( $targets as $target ) {
$target = intval($target);
$unique = mt_rand(1, 2000000000);

13
toggleleds.php Normal file
View File

@ -0,0 +1,13 @@
<?php
require 'header.php';
$targets = [1, 2, 3];
$command = 0x00;
foreach ( $targets as $target ) {
$target = intval($target);
$unique = mt_rand(1, 2000000000);
$data = pack("LLLCL", PACKETFILTER[0], PACKETFILTER[1], $unique, $command, $target);
transmitMessage($data);
}