1
0
Fork 0

Change some Nasal logging to use logprint()

- avoids console output at default (WARN) log level from the C172P
This commit is contained in:
James Turner 2015-06-07 18:07:57 +02:00
parent e74da4001e
commit 563c098452
7 changed files with 10 additions and 10 deletions

View file

@ -117,11 +117,11 @@ var apPower = func {
# print("v_test = ", v_test);
if (valueTest > 0.5) {
# autopilot just powered up
print("CENTURY IIB power up");
logprint(3, "CENTURY IIB power up");
apInit();
} elsif (valueTest < -0.5) {
# autopilot just lost power
print("CENTURY IIB power lost");
logprint(3, "CENTURY IIB power lost");
apInit();
# note: all button and knobs disabled in functions below
}

View file

@ -170,11 +170,11 @@ var apPower = func {
# print("v_test = ", v_test);
if (valueTest > 0.5) {
# autopilot just powered up
print("CENTURYIII power up");
logprint(3, "CENTURYIII power up");
apInit();
} elsif (valueTest < -0.5) {
# autopilot just lost power
print("CENTURYIII power lost");
logprint(3, "CENTURYIII power lost");
apInit();
# note: all button and knobs disabled in functions below
}

View file

@ -254,12 +254,12 @@ var apPower = func {
# print("v_test = ", v_test);
if (valueTest > 0.5) {
# autopilot just powered up
print("KAP140 power up");
logprint(3, "KAP140 power up");
apInit();
altAlert();
} elsif (valueTest < -0.5) {
# autopilot just lost power
print("KAP140 power lost");
logprint(3, "KAP140 power lost");
apInit();
annunciatorAltAlert.getNode("state").setBoolValue(0);
annunciatorBeep.getNode("state").setBoolValue(0);

View file

@ -36,7 +36,7 @@ init_electrical = func {
# Request that the update function be called next frame
settimer(update_electrical, 0);
print("Electrical system initialized");
logprint(3, "Electrical system initialized");
}

View file

@ -52,7 +52,8 @@ ki266.new = func(idx) {
obj.update();
print( "KI266 dme indicator #" ~ idx ~ " initialized" );
# 3 = SG_INFO log level
logprint( 3, "KI266 dme indicator #" ~ idx ~ " initialized" );
return obj;
};

View file

@ -34,7 +34,7 @@ kma20.new = func(rootPath) {
setlistener(rootPath ~ "/adf", func(v) {setprop("/instrumentation/adf/ident-audible", (v.getValue() != 0));}, 1);
setlistener(rootPath ~ "/dme", func(v) {setprop("/instrumentation/dme/ident", (v.getValue() != 0));}, 1);
setlistener(rootPath ~ "/mkr", func(v) {setprop("/instrumentation/marker-beacon/audio-btn",(v.getValue() != 0));}, 1);
print( "KMA20 audio panel initialized" );
logprint(3, "KMA20 audio panel initialized" );
return obj;
};

View file

@ -70,7 +70,6 @@ var visibilityOverrideProp = nil;
var auxvisibilityProp = nil;
_setlistener("/sim/signals/nasal-dir-initialized", func {
print ("environment init");
visibilityProp = props.globals.initNode("/environment/config/presets/visibility-m", 0, "DOUBLE" );
visibilityOverrideProp = props.globals.initNode("/environment/config/presets/visibility-m-override", 0, "BOOL" );
auxvisibilityProp = props.globals.initNode("/local-weather/config/aux-max-vis-range-m", 0, "DOUBLE" );