1
0
Fork 0

fix clock.nas formatting

This commit is contained in:
vezza 2020-04-12 22:40:49 +02:00 committed by Jonathan Redpath
parent 8bf6767e28
commit e7c939e15d

View file

@ -50,7 +50,6 @@ setlistener("instrumentation/clock/et-selector", func(et){
}
},0,0);
var start_loop = maketimer(0.1, func {
var UTC_date = sprintf("%02d %02d %02d", getprop("sim/time/utc/month"), getprop("sim/time/utc/day"), substr(sprintf("%2d", getprop("sim/time/utc/year")),1,2));
setprop("instrumentation/clock/utc-date", UTC_date);
@ -73,11 +72,6 @@ var start_loop = maketimer(0.1, func {
};
# Chrono
# var chr_tmp = getprop("instrumentation/chrono/elapsetime-sec");
# if(chr_tmp == 0)
# {
# chr_tmp = getprop("instrumentation/chrono/elapsetime-sec");
# }
var chr_tmp = getprop("instrumentation/chrono[0]/elapsetime-sec");
if (chr_tmp >= 6000) {
setprop("instrumentation/chrono[0]/elapsetime-sec", chr_tmp-6000);
@ -98,13 +92,8 @@ var start_loop = maketimer(0.1, func {
var et_min = int(et_tmp * 0.0166666666667);
var et_hr = int(et_min * 0.0166666666667);
et_min = et_min - (et_hr * 60);
#et_tmp = et_hr * 100 + et_min;
#et_tmp = int(et_tmp * 0.0166666666667);
#et_hr = int(et_tmp * 0.0166666666667);
#et_min = et_tmp - (et_hr * 60);
setprop("instrumentation/clock/et-hr",et_hr);
setprop("instrumentation/clock/et-min",et_min);
et_tmp = sprintf("%02d:%02d", et_hr, et_min);
setprop("instrumentation/clock/elapsed-string", et_tmp);
});