Gtld recorder: различия между версиями
Перейти к навигации
Перейти к поиску
Нет описания правки |
Нет описания правки |
||
| Строка 1: | Строка 1: | ||
<pre> | |||
let recorder = gtl.add_recorder( | let recorder = gtl.add_recorder( | ||
{ | { | ||
| Строка 42: | Строка 43: | ||
} | } | ||
} | } | ||
</pre> | |||
Версия от 04:25, 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();
}
}