WIP: txpower feature

This commit is contained in:
billz
2021-04-20 15:19:00 +01:00
parent 07ea4d2519
commit 6c674537bb
6 changed files with 29 additions and 5 deletions

View File

@@ -152,15 +152,16 @@ function getDefaultNetValue($svc,$iface,$key)
* Returns default options for the specified service
*
* @param string $svc
* @param string $key
* @return object $json
*/
function getDefaultNetOpts($svc)
function getDefaultNetOpts($svc,$key)
{
$json = json_decode(file_get_contents(RASPI_CONFIG_NETWORK), true);
if ($json === null) {
return false;
} else {
return $json[$svc]['options'];
return $json[$svc][$key];
}
}
@@ -774,4 +775,4 @@ function preg_only_match($pat,$haystack) {
function qr_encode($str)
{
return preg_replace('/(?<!\\\)([\":;,])/', '\\\\\1', $str);
}
}