Commit d1354c21 authored by Eric's avatar Eric
Browse files

Fix for USB150 device (and probably some others)

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