Commit 66100b63 authored by Björn Strausmann's avatar Björn Strausmann

Fix Bugs

parent e10581c7
......@@ -53,9 +53,14 @@ class MeshviewerGenerator{
private function addLink($device){
$this->link[$device->serial]["type"] = "other";
$this->link[$device->serial]["source"] = strtolower($device->serial);
$this->link[$device->serial]["target"] = getenv('GATEWAY_ID');
$this->link[$device->serial]["source_tq"] = 1;
$this->link[$device->serial]["target_tq"] = 1;
$this->link[$device->serial]["target"] = $this->getGatewayId();
if ($device->state == 1){
$this->link[$device->serial]["source_tq"] = 1;
$this->link[$device->serial]["target_tq"] = 1;
} else {
$this->link[$device->serial]["source_tq"] = 0;
$this->link[$device->serial]["target_tq"] = 0;
}
$this->link[$device->serial]["source_addr"] = $device->mac;
$this->link[$device->serial]["target_addr"] = $this->getGatewayMac();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment