LCD hobbs meter (instead of the previous "static" hobbs meter that was pretty
but didn't ever change.) This requires some aircraft specific nasal support
since the hobbs meter isn't implemented in the same way on every aircraft:
# initialize the hobbs meter and configure to save every 5 minutes
var hobbs = aircraft.timer.new("/instrumentation/clock/hobbs-meter-sec");
aircraft.data.save(5);
hobbs.stop();
setlistener( "/engines/engine[0]/running",
func {
var running = getprop("/engines/engine[0]/running");
if ( running ) {
hobbs.start();
} else {
hobbs.stop();
}
}
);
setlistener( "/instrumentation/clock/hobbs-meter-sec",
func {
var secs = getprop("/instrumentation/clock/hobbs-meter-sec");
setprop("/instrumentation/clock/hobbs-meter-hours", secs / 3600);
},
1
);