Change some Nasal logging to use logprint()
- avoids console output at default (WARN) log level from the C172P
This commit is contained in:
parent
e74da4001e
commit
563c098452
7 changed files with 10 additions and 10 deletions
|
@ -117,11 +117,11 @@ var apPower = func {
|
||||||
# print("v_test = ", v_test);
|
# print("v_test = ", v_test);
|
||||||
if (valueTest > 0.5) {
|
if (valueTest > 0.5) {
|
||||||
# autopilot just powered up
|
# autopilot just powered up
|
||||||
print("CENTURY IIB power up");
|
logprint(3, "CENTURY IIB power up");
|
||||||
apInit();
|
apInit();
|
||||||
} elsif (valueTest < -0.5) {
|
} elsif (valueTest < -0.5) {
|
||||||
# autopilot just lost power
|
# autopilot just lost power
|
||||||
print("CENTURY IIB power lost");
|
logprint(3, "CENTURY IIB power lost");
|
||||||
apInit();
|
apInit();
|
||||||
# note: all button and knobs disabled in functions below
|
# note: all button and knobs disabled in functions below
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,11 +170,11 @@ var apPower = func {
|
||||||
# print("v_test = ", v_test);
|
# print("v_test = ", v_test);
|
||||||
if (valueTest > 0.5) {
|
if (valueTest > 0.5) {
|
||||||
# autopilot just powered up
|
# autopilot just powered up
|
||||||
print("CENTURYIII power up");
|
logprint(3, "CENTURYIII power up");
|
||||||
apInit();
|
apInit();
|
||||||
} elsif (valueTest < -0.5) {
|
} elsif (valueTest < -0.5) {
|
||||||
# autopilot just lost power
|
# autopilot just lost power
|
||||||
print("CENTURYIII power lost");
|
logprint(3, "CENTURYIII power lost");
|
||||||
apInit();
|
apInit();
|
||||||
# note: all button and knobs disabled in functions below
|
# note: all button and knobs disabled in functions below
|
||||||
}
|
}
|
||||||
|
|
|
@ -254,12 +254,12 @@ var apPower = func {
|
||||||
# print("v_test = ", v_test);
|
# print("v_test = ", v_test);
|
||||||
if (valueTest > 0.5) {
|
if (valueTest > 0.5) {
|
||||||
# autopilot just powered up
|
# autopilot just powered up
|
||||||
print("KAP140 power up");
|
logprint(3, "KAP140 power up");
|
||||||
apInit();
|
apInit();
|
||||||
altAlert();
|
altAlert();
|
||||||
} elsif (valueTest < -0.5) {
|
} elsif (valueTest < -0.5) {
|
||||||
# autopilot just lost power
|
# autopilot just lost power
|
||||||
print("KAP140 power lost");
|
logprint(3, "KAP140 power lost");
|
||||||
apInit();
|
apInit();
|
||||||
annunciatorAltAlert.getNode("state").setBoolValue(0);
|
annunciatorAltAlert.getNode("state").setBoolValue(0);
|
||||||
annunciatorBeep.getNode("state").setBoolValue(0);
|
annunciatorBeep.getNode("state").setBoolValue(0);
|
||||||
|
|
|
@ -36,7 +36,7 @@ init_electrical = func {
|
||||||
|
|
||||||
# Request that the update function be called next frame
|
# Request that the update function be called next frame
|
||||||
settimer(update_electrical, 0);
|
settimer(update_electrical, 0);
|
||||||
print("Electrical system initialized");
|
logprint(3, "Electrical system initialized");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,8 @@ ki266.new = func(idx) {
|
||||||
|
|
||||||
obj.update();
|
obj.update();
|
||||||
|
|
||||||
print( "KI266 dme indicator #" ~ idx ~ " initialized" );
|
# 3 = SG_INFO log level
|
||||||
|
logprint( 3, "KI266 dme indicator #" ~ idx ~ " initialized" );
|
||||||
return obj;
|
return obj;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ kma20.new = func(rootPath) {
|
||||||
setlistener(rootPath ~ "/adf", func(v) {setprop("/instrumentation/adf/ident-audible", (v.getValue() != 0));}, 1);
|
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 ~ "/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);
|
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;
|
return obj;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,6 @@ var visibilityOverrideProp = nil;
|
||||||
var auxvisibilityProp = nil;
|
var auxvisibilityProp = nil;
|
||||||
|
|
||||||
_setlistener("/sim/signals/nasal-dir-initialized", func {
|
_setlistener("/sim/signals/nasal-dir-initialized", func {
|
||||||
print ("environment init");
|
|
||||||
visibilityProp = props.globals.initNode("/environment/config/presets/visibility-m", 0, "DOUBLE" );
|
visibilityProp = props.globals.initNode("/environment/config/presets/visibility-m", 0, "DOUBLE" );
|
||||||
visibilityOverrideProp = props.globals.initNode("/environment/config/presets/visibility-m-override", 0, "BOOL" );
|
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" );
|
auxvisibilityProp = props.globals.initNode("/local-weather/config/aux-max-vis-range-m", 0, "DOUBLE" );
|
||||||
|
|
Loading…
Reference in a new issue