X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Fslip_skid_ball.cxx;h=4925e1fa94ca7b363c96295af9871ea410c1c41d;hb=c6045147544badd6daefdcab9d4de1ed6936533b;hp=9ebff9ba73d9aafe2828f1d561685b17d1ab73c5;hpb=4a5961ca5b4d978a1749bbf1ca50d48562993624;p=flightgear.git diff --git a/src/Instrumentation/slip_skid_ball.cxx b/src/Instrumentation/slip_skid_ball.cxx index 9ebff9ba7..4925e1fa9 100644 --- a/src/Instrumentation/slip_skid_ball.cxx +++ b/src/Instrumentation/slip_skid_ball.cxx @@ -8,7 +8,10 @@ #include
-SlipSkidBall::SlipSkidBall () +SlipSkidBall::SlipSkidBall ( SGPropertyNode *node) + : + _name(node->getStringValue("name", "slip-skid-ball")), + _num(node->getIntValue("number", 0)) { } @@ -19,14 +22,15 @@ SlipSkidBall::~SlipSkidBall () void SlipSkidBall::init () { - _serviceable_node = - fgGetNode("/instrumentation/slip-skid-ball/serviceable", true); + string branch; + branch = "/instrumentation/" + _name; + + SGPropertyNode *node = fgGetNode(branch.c_str(), _num, true ); + _serviceable_node = node->getChild("serviceable", 0, true); _y_accel_node = fgGetNode("/accelerations/pilot/y-accel-fps_sec", true); _z_accel_node = fgGetNode("/accelerations/pilot/z-accel-fps_sec", true); - _out_node = - fgGetNode("/instrumentation/slip-skid-ball/indicated-slip-skid", true); - _override_node = - fgGetNode("/instrumentation/slip-skid-ball/override", true); + _out_node = node->getChild("indicated-slip-skid", 0, true); + _override_node = node->getChild("override", 0, true); } void