Changeset 36:29e3b676c0c2 in xplra for test


Ignore:
Timestamp:
02/10/13 08:21:47 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
hg-Phase:
(<MercurialRepository 3 'hg:/home/ivaradi/xplane/hg/xplra' '/'>, 'public')
Message:

Added a new command to query the versions

Location:
test
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • test/basicctest.c

    r29 r36  
    4242    int retval = 0;
    4343    const char* errorString = 0;
     44
     45    int xplaneVersion = 0;
     46    int xplmVersion = 0;
     47    int xplraVersion = 0;
     48
    4449    int numEngines = 0;
    4550    float spoolTime = 0.0;
     
    6974    }
    7075
     76    printf("Querying the versions...\n");
     77    if (xplra_get_versions(connectionID, &xplaneVersion,
     78                           &xplmVersion, &xplraVersion)<0) goto error;
     79    printf("X-Plane version: %d, XPLM: %d, XPLRA: %03d\n\n",
     80           xplaneVersion, xplmVersion, xplraVersion);
     81
    7182    printf("Querying the number of the engines...\n");
    7283    if (xplra_get_int(&numEngines, connectionID,
  • test/basictest.cc

    r25 r36  
    5353        printf("Connected to X-Plane.\n\n");
    5454
     55        int xplaneVersion = 0;
     56        int xplmVersion = 0;
     57        int xplraVersion = 0;
     58
     59        printf("Querying the versions...\n");
     60        xplane.getVersions(xplaneVersion, xplmVersion, xplraVersion);
     61        printf("X-Plane version: %d, XPLM: %d, XPLRA: %03d\n\n",
     62               xplaneVersion, xplmVersion, xplraVersion);
     63
    5564        printf("Querying the number of the engines...\n");
    5665        int numEngines = xplane.getInt("sim/aircraft/engine/acf_num_engines");
  • test/basictest.py

    r35 r36  
    1212        xplane.connect()
    1313        print "Connected to X-Plane."
     14        print
     15
     16        print "Querying the versions..."
     17        (xplaneVersion, xplmVersion, xplraVersion) = xplane.getVersions()
     18        print "X-Plane version: %d, XPLM: %d, XPLRA: %03d" % \
     19               (xplaneVersion, xplmVersion, xplraVersion)
    1420        print
    1521
Note: See TracChangeset for help on using the changeset viewer.