~jtaylor/ubuntu/oneiric/flightgear/fix-749249

« back to all changes in this revision

Viewing changes to src/Instrumentation/slip_skid_ball.cxx

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2005-11-26 12:31:23 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20051126123123-dhs3dijy6nd257up
Tags: 0.9.8-3ubuntu1
adapt gl/glu dependencies for Xorg

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
#include <Main/util.hxx>
9
9
 
10
10
 
 
11
SlipSkidBall::SlipSkidBall ( SGPropertyNode *node)
 
12
    :
 
13
    name("slip-skid-ball"),
 
14
    num(0)
 
15
{
 
16
    int i;
 
17
    for ( i = 0; i < node->nChildren(); ++i ) {
 
18
        SGPropertyNode *child = node->getChild(i);
 
19
        string cname = child->getName();
 
20
        string cval = child->getStringValue();
 
21
        if ( cname == "name" ) {
 
22
            name = cval;
 
23
        } else if ( cname == "number" ) {
 
24
            num = child->getIntValue();
 
25
        } else {
 
26
            SG_LOG( SG_INSTR, SG_WARN, "Error in slip-skid-ball config logic" );
 
27
            if ( name.length() ) {
 
28
                SG_LOG( SG_INSTR, SG_WARN, "Section = " << name );
 
29
            }
 
30
        }
 
31
    }
 
32
}
 
33
 
11
34
SlipSkidBall::SlipSkidBall ()
12
35
{
13
36
}
19
42
void
20
43
SlipSkidBall::init ()
21
44
{
22
 
    _serviceable_node =
23
 
        fgGetNode("/instrumentation/slip-skid-ball/serviceable", true);
 
45
    string branch;
 
46
    branch = "/instrumentation/" + name;
 
47
 
 
48
    SGPropertyNode *node = fgGetNode(branch.c_str(), num, true );
 
49
    _serviceable_node = node->getChild("serviceable", 0, true);
24
50
    _y_accel_node = fgGetNode("/accelerations/pilot/y-accel-fps_sec", true);
25
51
    _z_accel_node = fgGetNode("/accelerations/pilot/z-accel-fps_sec", true);
26
 
    _out_node =
27
 
        fgGetNode("/instrumentation/slip-skid-ball/indicated-slip-skid", true);
28
 
    _override_node =
29
 
        fgGetNode("/instrumentation/slip-skid-ball/override", true);
 
52
    _out_node = node->getChild("indicated-slip-skid", 0, true);
 
53
    _override_node = node->getChild("iverride", 0, true);
30
54
}
31
55
 
32
56
void