X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Fdclgps.cxx;h=42157d7a1836ffcde8db0f510c4b7c97977b24eb;hb=15724a6a446317f83d429670ebb0e2204c72bdb5;hp=ec78643aa98aaea512d8d008321097e6bc1740ab;hpb=49dda9bfb6811bcf36172d3b1ef3bc49acd71e5b;p=flightgear.git diff --git a/src/Instrumentation/dclgps.cxx b/src/Instrumentation/dclgps.cxx index ec78643aa..42157d7a1 100644 --- a/src/Instrumentation/dclgps.cxx +++ b/src/Instrumentation/dclgps.cxx @@ -239,22 +239,18 @@ void DCLGPS::init() { } void DCLGPS::bind() { - fgTie("/instrumentation/gps/waypoint-alert", this, &DCLGPS::GetWaypointAlert); - fgTie("/instrumentation/gps/leg-mode", this, &DCLGPS::GetLegMode); - fgTie("/instrumentation/gps/obs-mode", this, &DCLGPS::GetOBSMode); - fgTie("/instrumentation/gps/approach-arm", this, &DCLGPS::GetApproachArm); - fgTie("/instrumentation/gps/approach-active", this, &DCLGPS::GetApproachActive); - fgTie("/instrumentation/gps/cdi-deflection", this, &DCLGPS::GetCDIDeflection); - fgTie("/instrumentation/gps/to-flag", this, &DCLGPS::GetToFlag); + _tiedProperties.setRoot(fgGetNode("/instrumentation/gps", true)); + _tiedProperties.Tie("waypoint-alert", this, &DCLGPS::GetWaypointAlert); + _tiedProperties.Tie("leg-mode", this, &DCLGPS::GetLegMode); + _tiedProperties.Tie("obs-mode", this, &DCLGPS::GetOBSMode); + _tiedProperties.Tie("approach-arm", this, &DCLGPS::GetApproachArm); + _tiedProperties.Tie("approach-active", this, &DCLGPS::GetApproachActive); + _tiedProperties.Tie("cdi-deflection", this, &DCLGPS::GetCDIDeflection); + _tiedProperties.Tie("to-flag", this, &DCLGPS::GetToFlag); } void DCLGPS::unbind() { - fgUntie("/instrumentation/gps/waypoint-alert"); - fgUntie("/instrumentation/gps/leg-mode"); - fgUntie("/instrumentation/gps/obs-mode"); - fgUntie("/instrumentation/gps/approach-arm"); - fgUntie("/instrumentation/gps/approach-active"); - fgUntie("/instrumentation/gps/cdi-deflection"); + _tiedProperties.Untie(); } void DCLGPS::update(double dt) { @@ -808,7 +804,7 @@ void DCLGPS::LoadApproachData() { w.lat = rwy->begin().getLatitudeRad(); w.lon = rwy->begin().getLongitudeRad(); } catch(const sg_exception&) { - SG_LOG(SG_GENERAL, SG_WARN, "Unable to find runway " << w.id.substr(2, 2) << " at airport " << iap->_aptIdent); + SG_LOG(SG_INSTR, SG_WARN, "Unable to find runway " << w.id.substr(2, 2) << " at airport " << iap->_aptIdent); //cout << "Unable to find runway " << w.id.substr(2, 2) << " at airport " << iap->_aptIdent << " ( w.id = " << w.id << ", rwystr = " << rwystr << " )\n"; wp_error = true; }