Fix deprecated printlog warning
Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
parent
cb3b573367
commit
0e89bc9bcd
5 changed files with 10 additions and 10 deletions
|
@ -55,7 +55,7 @@ canvas.Group.setColor = func(){
|
|||
canvas.Map.addLayer = func(factory, type_arg=nil, priority=nil, style=nil, opts=nil, visible=1)
|
||||
{
|
||||
if(contains(me.layers, type_arg))
|
||||
printlog("warn", "addLayer() warning: overwriting existing layer:", type_arg);
|
||||
logprint("warn", "addLayer() warning: overwriting existing layer:", type_arg);
|
||||
var options = opts;
|
||||
# Argument handling
|
||||
|
||||
|
@ -105,7 +105,7 @@ canvas.Symbol.formattedString = func(frmt, model_props){
|
|||
var tp = typeof(val);
|
||||
if(tp != "scalar"){
|
||||
val = "";
|
||||
#printlog("warn", "formattedString: invalid type for "~prop~" (" ~ tp ~ ")");
|
||||
#logprint("warn", "formattedString: invalid type for "~prop~" (" ~ tp ~ ")");
|
||||
} else {
|
||||
append(args, val);
|
||||
}
|
||||
|
@ -280,7 +280,7 @@ canvas.LineSymbol.new = func(group, layer, model, controller=nil) {
|
|||
canvas.LineSymbol.draw = func() {
|
||||
me.callback("draw_before");
|
||||
if (!me.needs_update) return;
|
||||
#printlog(_MP_dbg_lvl, "redrawing a LineSymbol "~me.layer.type);
|
||||
#logprint(_MP_dbg_lvl, "redrawing a LineSymbol "~me.layer.type);
|
||||
me.element.reset();
|
||||
var cmds = [];
|
||||
var coords = [];
|
||||
|
|
|
@ -170,7 +170,7 @@ canvas.NavDisplay.newMFD = func(canvas_group, parent=nil, nd_options=nil, update
|
|||
if(!layer["isMapStructure"]) # set up an old INEFFICIENT and SLOW layer
|
||||
the_layer = me.layers[layer.name] = canvas.MAP_LAYERS[layer.name].new( me.map, layer.name, controller );
|
||||
else {
|
||||
printlog(_MP_dbg_lvl, "Setting up MapStructure-based layer for ND, name:", layer.name);
|
||||
logprint(_MP_dbg_lvl, "Setting up MapStructure-based layer for ND, name:", layer.name);
|
||||
var opt = me.options != nil and me.options[layer.name] != nil ? me.options[layer.name] :nil;
|
||||
if(opt == nil and contains(layer, "options"))
|
||||
opt = layer.options;
|
||||
|
@ -205,7 +205,7 @@ canvas.NavDisplay.newMFD = func(canvas_group, parent=nil, nd_options=nil, update
|
|||
l.predicate = func {
|
||||
var t = systime();
|
||||
call(_predicate, arg, me);
|
||||
printlog(_MP_dbg_lvl, "Took "~((systime()-t)*1000)~"ms to update layer "~l.name);
|
||||
logprint(_MP_dbg_lvl, "Took "~((systime()-t)*1000)~"ms to update layer "~l.name);
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
@ -594,6 +594,6 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec
|
|||
me.symbols["status.arpt"].setVisible( me.get_switch("toggle_airports") and me.in_mode("toggle_display_mode", ["MAP"]));
|
||||
me.symbols["status.sta"].setVisible( me.get_switch("toggle_stations") and me.in_mode("toggle_display_mode", ["MAP"]));
|
||||
# Okay, _how_ do we hook this up with FGPlot?
|
||||
printlog(_MP_dbg_lvl, "Total ND update took "~((systime()-_time)*100)~"ms");
|
||||
logprint(_MP_dbg_lvl, "Total ND update took "~((systime()-_time)*100)~"ms");
|
||||
setprop("instrumentation/navdisplay["~ canvas.NavDisplay.id ~"]/update-ms", systime() - _time);
|
||||
};
|
||||
|
|
|
@ -22,7 +22,7 @@ var new = func(layer) {
|
|||
return m;
|
||||
};
|
||||
var del = func() {
|
||||
printlog(_MP_dbg_lvl, "VOR.lcontroller.del()");
|
||||
logprint(_MP_dbg_lvl, "VOR.lcontroller.del()");
|
||||
foreach (var l; me.listeners)
|
||||
removelistener(l);
|
||||
};
|
||||
|
|
|
@ -48,7 +48,7 @@ var last_result = [];
|
|||
|
||||
var searchCmd = func {
|
||||
# FIXME: do we return the active route even if it isn't active?
|
||||
printlog(_MP_dbg_lvl, "Running query: ", name);
|
||||
logprint(_MP_dbg_lvl, "Running query: ", name);
|
||||
var plans = [];
|
||||
var driver = me.route_driver;
|
||||
if(!driver.shouldUpdate()) return me.last_result;
|
||||
|
|
|
@ -40,7 +40,7 @@ var new = func(layer) {
|
|||
return m;
|
||||
};
|
||||
var del = func() {
|
||||
printlog(_MP_dbg_lvl, name,".lcontroller.del()");
|
||||
logprint(_MP_dbg_lvl, name,".lcontroller.del()");
|
||||
foreach (var l; me.listeners)
|
||||
removelistener(l);
|
||||
};
|
||||
|
@ -59,4 +59,4 @@ var changed_freq = func(update=1) {
|
|||
if (update) me.layer.update();
|
||||
};
|
||||
|
||||
var searchCmd = NavaidSymbolLayer.make('vor');
|
||||
var searchCmd = NavaidSymbolLayer.make('vor');
|
||||
|
|
Loading…
Add table
Reference in a new issue