Changeset 35:9451e75788ea in xplra for test


Ignore:
Timestamp:
02/09/13 13:00:42 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Implemented support for multi-dataref setting

Location:
test
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • test/basictest.py

    r32 r35  
    4646        print "Querying the aircraft's description..."
    4747        result = xplane.getByteArray("sim/aircraft/view/acf_descrip")
    48         print "The description:", result.tolist()
     48        print "The description:", result
    4949        print
    5050
     
    5757        print "Querying the aircraft's engine types..."
    5858        result3 = xplane.getIntArray("sim/aircraft/prop/acf_en_type")
    59         print "Got:", result3.tolist()
     59        print "Got:", result3
    6060        print
    6161
    6262        print "Querying the aircraft's propeller directions..."
    6363        result5 = xplane.getFloatArray("sim/aircraft/prop/acf_prop_dir")
    64         print  "Got:", result5.tolist()
     64        print  "Got:", result5
    6565        print
    6666
     
    8787        print
    8888
    89         numBlades = xplane.getFloatArray("sim/aircraft/prop/acf_num_blades").tolist()
     89        numBlades = xplane.getFloatArray("sim/aircraft/prop/acf_num_blades")
    9090        print "Setting the number of blades"
    9191        print "    from:", numBlades
     
    9494        xplane.setFloatArray("sim/aircraft/prop/acf_num_blades",  numBlades)
    9595
    96         numBlades = xplane.getFloatArray("sim/aircraft/prop/acf_num_blades").tolist()
     96        numBlades = xplane.getFloatArray("sim/aircraft/prop/acf_num_blades")
    9797        print "The result:", numBlades
    9898        print
    9999
    100         batteryArrayOn = xplane.getIntArray("sim/cockpit/electrical/battery_array_on").tolist()
     100        batteryArrayOn = xplane.getIntArray("sim/cockpit/electrical/battery_array_on")
    101101        print "Setting the batteries"
    102102        print "    from:", batteryArrayOn
     
    104104        print "    to:", batteryArrayOn
    105105        xplane.setIntArray("sim/cockpit/electrical/battery_array_on", batteryArrayOn)
    106         batteryArrayOn = xplane.getIntArray("sim/cockpit/electrical/battery_array_on").tolist()
     106        batteryArrayOn = xplane.getIntArray("sim/cockpit/electrical/battery_array_on")
    107107        print "The result:", batteryArrayOn
    108108        print
  • test/multigettest.py

    r34 r35  
    9696            print "altimeter: %f, qnh: %f" % \
    9797                (getter[altimeterID], getter[qnhID]);
    98             print "NAV types:", getter[navTypesID].tolist()
    99             print "bus voltages:", getter[busVoltsID].tolist()
     98            print "NAV types:", getter[navTypesID]
     99            print "bus voltages:", getter[busVoltsID]
    100100            print
    101101            time.sleep(1.0)
Note: See TracChangeset for help on using the changeset viewer.