Don't use a define for MAX_PRESETS so that we can include control_functions multiple times
parent
2ed6ca0c0c
commit
05554757bc
|
@ -149,7 +149,7 @@ function controlPanTilt($monitor, $cmds) {
|
||||||
function controlPresets($monitor, $cmds) {
|
function controlPresets($monitor, $cmds) {
|
||||||
$control = $monitor->Control();
|
$control = $monitor->Control();
|
||||||
// MAX_PRESETS IS PER LINE
|
// MAX_PRESETS IS PER LINE
|
||||||
define('MAX_PRESETS', '12');
|
$max_presets = 12;
|
||||||
|
|
||||||
$sql = 'SELECT * FROM ControlPresets WHERE MonitorId = ?';
|
$sql = 'SELECT * FROM ControlPresets WHERE MonitorId = ?';
|
||||||
$labels = array();
|
$labels = array();
|
||||||
|
@ -157,7 +157,7 @@ function controlPresets($monitor, $cmds) {
|
||||||
$labels[$row['Preset']] = $row['Label'];
|
$labels[$row['Preset']] = $row['Label'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$presetBreak = (int)(($control->NumPresets()+1)/((int)(($control->NumPresets()-1)/MAX_PRESETS)+1));
|
$presetBreak = (int)(($control->NumPresets()+1)/((int)(($control->NumPresets()-1)/$max_presets)+1));
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue