Gtld recorder: различия между версиями
Перейти к навигации
Перейти к поиску
(Новая страница: « let recorder = gtl.add_recorder( { "src":[ gtl.analog_inputs[0], gtl.analog_inputs[1] ], "time" : 1, "prehistory" : 0.5, "comment" : "no comments", "dir" : "d:/", "file_name" : "record from script" } ); if(!recorder.is_success()) gtl.diagnostic.stop(); recorder.finished.connect( function() { gtl.log.info("file", "finished"); gtl.free(recorder); gtl.diagnostic.stop(); } ); gtl.diagnostic.interval = .1; fun...») |
Нет описания правки |
||
| Строка 1: | Строка 1: | ||
<code style="color: purple> | |||
let recorder = gtl.add_recorder( | let recorder = gtl.add_recorder( | ||
| Строка 48: | Строка 49: | ||
} | } | ||
</code> | |||
Версия от 04:22, 12 января 2024
let recorder = gtl.add_recorder(
{
"src":[
gtl.analog_inputs[0],
gtl.analog_inputs[1]
],
"time" : 1,
"prehistory" : 0.5,
"comment" : "no comments",
"dir" : "d:/",
"file_name" : "record from script"
}
);
if(!recorder.is_success())
gtl.diagnostic.stop();
recorder.finished.connect(
function()
{
gtl.log.info("file", "finished");
gtl.free(recorder);
gtl.diagnostic.stop();
}
);
gtl.diagnostic.interval = .1;
function diagnose()
{
if(gtl.diagnostic.time > 2)
recorder.start();
else if(gtl.diagnostic.time > 5)
{
gtl.log.info("diagnostic", "stop");
gtl.diagnostic.stop();
}
}