Gtld recorder
Перейти к навигации
Перейти к поиску
let recorder = gtl.add_recorder(
{
"src":[
gtl.analog_inputs[0],
gtl.analog_inputs[1]
],
"prehistory" : 15.5,
}
);
recorder.finished.connect(
function()
{
gtl.log.info("file", "finished");
gtl.free(recorder);
gtl.diagnostic.stop();
}
);
gtl.diagnostic.interval = .1;
function diagnose()
{
gtl.log.info("time", recorder.time());
if(gtl.diagnostic.time > 8 && !recorder.is_writing())
{
if(!recorder.start(10, "no comments", "E:/data/gtl", "record from script"))
gtl.log.error("file", "error writing file");
}
if(gtl.diagnostic.time > 20)
{
gtl.log.info("diagnostic", "stop");
gtl.free(recorder);
gtl.diagnostic.stop();
}
}