… | |
… | |
289 | my ($ob, $arg) = @_; |
289 | my ($ob, $arg) = @_; |
290 | |
290 | |
291 | return $ob->reply (undef, "Output count is presently " . $ob->contr->outputs_count) |
291 | return $ob->reply (undef, "Output count is presently " . $ob->contr->outputs_count) |
292 | unless $arg > 0; |
292 | unless $arg > 0; |
293 | |
293 | |
|
|
294 | $arg = 4 if $arg < 4; |
|
|
295 | |
294 | $ob->contr->outputs_count ($arg); |
296 | $ob->contr->outputs_count ($arg); |
295 | $ob->reply (undef, "Output count now set to " . $ob->contr->outputs_count); |
297 | $ob->reply (undef, "Output count now set to " . $ob->contr->outputs_count); |
296 | |
298 | |
297 | 1 |
299 | 1 |
298 | }; |
300 | }; |
… | |
… | |
300 | cf::register_command 'output-sync' => sub { |
302 | cf::register_command 'output-sync' => sub { |
301 | my ($ob, $arg) = @_; |
303 | my ($ob, $arg) = @_; |
302 | |
304 | |
303 | return $ob->reply (undef, sprintf "Output sync time is presently %.1fs", $ob->contr->outputs_sync * $cf::TICK) |
305 | return $ob->reply (undef, sprintf "Output sync time is presently %.1fs", $ob->contr->outputs_sync * $cf::TICK) |
304 | unless length $arg; |
306 | unless length $arg; |
|
|
307 | |
|
|
308 | $arg = 0.5 if $arg < 0.5; |
305 | |
309 | |
306 | $ob->contr->outputs_sync ($arg / $cf::TICK); |
310 | $ob->contr->outputs_sync ($arg / $cf::TICK); |
307 | $ob->reply (undef, sprintf "Output sync time now set to %.1fs", $ob->contr->outputs_sync * $cf::TICK); |
311 | $ob->reply (undef, sprintf "Output sync time now set to %.1fs", $ob->contr->outputs_sync * $cf::TICK); |
308 | |
312 | |
309 | 1 |
313 | 1 |