Pretty up the v4l field names
This commit is contained in:
parent
f737e3e945
commit
6609c154f2
|
@ -38,7 +38,7 @@ if ($zmuOutput) {
|
|||
$ctls = shell_exec('v4l2-ctl -d '.$monitor->Device().' --list-ctrls');
|
||||
|
||||
if (!$ctls) {
|
||||
ZM\Warning("Guessing v4l ctrls. We need v4l2-ctl please install it");
|
||||
ZM\Warning('Guessing v4l ctrls. We need v4l2-ctl please install it');
|
||||
$ctls = '
|
||||
brightness 0x00980900 (int) : min=-10 max=10 step=1 default=0 value=8
|
||||
contrast 0x00980901 (int) : min=0 max=20 step=1 default=10 value=12
|
||||
|
@ -83,10 +83,15 @@ foreach ($ctls as $line) {
|
|||
}
|
||||
}
|
||||
|
||||
$label = translate($setting_uc);
|
||||
if ($label == $setting_uc) {
|
||||
$label = ucwords(str_replace('_', ' ', $label));
|
||||
}
|
||||
|
||||
if ($setting == 'brightness' or $setting == 'colour' or $setting == 'contrast' or $setting == 'hue') {
|
||||
echo '
|
||||
<tr>
|
||||
<th scope="row">'.translate($setting_uc).'</th>
|
||||
<th scope="row">'.$label.'</th>
|
||||
<td>'.$min.'</td><td><input type="range" title="'.$value.'" min="'.$min.'" max="'.$max.'" step="'.$step.'" default="'.$default.'" value="'.$value.'" id="new'.$setting_uc.'" name="new'.$setting_uc.'" '.(canEdit('Control') ? '' : 'disabled="disabled"') .'/></td><td>'.$max.'</td>
|
||||
</tr>
|
||||
';
|
||||
|
@ -94,7 +99,7 @@ foreach ($ctls as $line) {
|
|||
if ($type == '(bool)') {
|
||||
echo '
|
||||
<tr>
|
||||
<th scope="row">'.translate($setting_uc).'</th>
|
||||
<th scope="row">'.$label.'</th>
|
||||
<td></td><td>'.html_radio('new'.$setting_uc, array('0'=>translate('True'), '1', translate('False')), $value, array('disabled'=>'disabled')).'
|
||||
</td><td></td>
|
||||
</tr>
|
||||
|
@ -102,14 +107,14 @@ foreach ($ctls as $line) {
|
|||
} else if ($type == '(int)') {
|
||||
echo '
|
||||
<tr>
|
||||
<th scope="row">'.translate($setting_uc).'</th>
|
||||
<th scope="row">'.$label.'</th>
|
||||
<td></td><td><input type="range" '.$ctl[1].' disabled="disabled"/></td><td></td>
|
||||
</tr>
|
||||
';
|
||||
} else {
|
||||
echo '
|
||||
<tr>
|
||||
<th scope="row">'.translate($setting_uc).'</th>
|
||||
<th scope="row">'.$label.'</th>
|
||||
<td></td><td>'.$value.'</td><td></td>
|
||||
</tr>
|
||||
';
|
||||
|
|
Loading…
Reference in New Issue