Changeset 751 for trunk/Modules/NetworkConfigRouterOS/Generators/Signal.php
- Timestamp:
- Oct 5, 2015, 11:11:38 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/NetworkConfigRouterOS/Generators/Signal.php
r738 r751 39 39 } else $Interface = null; 40 40 41 $Parts = explode('@', $Properties['signal-strength']); 42 $Strength = substr($Parts[0], 0, -3); // without dBm 41 if(strpos($Properties['signal-strength'], '@') === false) 42 { 43 $Strength = $Properties['signal-strength']; 44 } else { 45 $Parts = explode('@', $Properties['signal-strength']); 46 if(substr($Parts[0], -3) == 'dBm') 47 $Strength = substr($Parts[0], 0, -3); // without dBm 48 else $Strength = $Parts[0]; 49 } 50 echo($Properties['signal-strength'].' '.$Strength."\n"); 43 51 $RateRx = substr($Properties['rx-rate'], 0, -3); // without MHz 44 52 $RateTx = substr($Properties['tx-rate'], 0, -3); // without MHz
Note:
See TracChangeset
for help on using the changeset viewer.