Commit 0643a9b9 authored by Eric - kg6wxc's avatar Eric - kg6wxc
Browse files

Merge branch 'USB150fixes' into 'master'

bugfix: Fix for USB150 device (and probably some others)

See merge request !7
parents e958150d d1354c21
......@@ -327,6 +327,8 @@ if ($getNodeInfo) {
$noise = 0;
$freq = "";
//quick hack for USB150 devices
$eth3975 = 0;
//check a couple of things at first
if(isset($result['meshrf']['status']) && $result['meshrf']['status'] == "off") {
......@@ -356,7 +358,7 @@ if ($getNodeInfo) {
$wifi_mac_address = $value2['mac'];
break;
}
if(isset($value2['ip']) && $value2['ip'] != "none") {
if(isset($value2['ip']) && $value2['ip'] != "none" && !$eth3975) {
switch($value2['name']) {
case $wlanInf:
$wlan_ip = $value2['ip'];
......@@ -367,9 +369,11 @@ if ($getNodeInfo) {
break;
case "eth1.3975":
$wlan_ip = $value2['ip'];
$eth3975 = 1;
break;
case "eth0.3975":
$wlan_ip = $value2['ip'];
$eth3975 = 1;
break;
}
}
......
......@@ -118,6 +118,9 @@ if($sysinfoJson === FALSE) {
$noise = 0;
$freq = "";
//quick hack for USB150 devices
$eth3975 = 0;
//check a couple of things at first
if(isset($result['meshrf']['status']) && $result['meshrf']['status'] == "off") {
$meshRF = "off";
......@@ -146,7 +149,7 @@ if($sysinfoJson === FALSE) {
$wifi_mac_address = $value2['mac'];
break;
}
if(isset($value2['ip']) && $value2['ip'] != "none") {
if(isset($value2['ip']) && $value2['ip'] != "none" && !$eth3975) {
switch($value2['name']) {
case $wlanInf:
$wlan_ip = $value2['ip'];
......@@ -157,9 +160,11 @@ if($sysinfoJson === FALSE) {
break;
case "eth1.3975":
$wlan_ip = $value2['ip'];
$eth3975 = 1;
break;
case "eth0.3975":
$wlan_ip = $value2['ip'];
$eth3975 = 1;
break;
}
}
......
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