fix clock.nas formatting
This commit is contained in:
parent
8bf6767e28
commit
e7c939e15d
1 changed files with 72 additions and 83 deletions
|
@ -50,7 +50,6 @@ setlistener("instrumentation/clock/et-selector", func(et){
|
||||||
}
|
}
|
||||||
},0,0);
|
},0,0);
|
||||||
|
|
||||||
|
|
||||||
var start_loop = maketimer(0.1, func {
|
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));
|
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);
|
setprop("instrumentation/clock/utc-date", UTC_date);
|
||||||
|
@ -73,11 +72,6 @@ var start_loop = maketimer(0.1, func {
|
||||||
};
|
};
|
||||||
|
|
||||||
# Chrono
|
# 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");
|
var chr_tmp = getprop("instrumentation/chrono[0]/elapsetime-sec");
|
||||||
if (chr_tmp >= 6000) {
|
if (chr_tmp >= 6000) {
|
||||||
setprop("instrumentation/chrono[0]/elapsetime-sec", 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_min = int(et_tmp * 0.0166666666667);
|
||||||
var et_hr = int(et_min * 0.0166666666667);
|
var et_hr = int(et_min * 0.0166666666667);
|
||||||
et_min = et_min - (et_hr * 60);
|
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-hr",et_hr);
|
||||||
setprop("instrumentation/clock/et-min",et_min);
|
setprop("instrumentation/clock/et-min",et_min);
|
||||||
et_tmp = sprintf("%02d:%02d", et_hr, et_min);
|
et_tmp = sprintf("%02d:%02d", et_hr, et_min);
|
||||||
setprop("instrumentation/clock/elapsed-string", et_tmp);
|
setprop("instrumentation/clock/elapsed-string", et_tmp);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue