Did I find the right examples for you? yes no

All Samples(23)  |  Call(23)  |  Derive(0)  |  Import(0)
return number of waypoints

src/m/a/mavlink-HEAD/pymavlink/examples/wptogpx.py   mavlink(Download)
 
    count = 0
    for i in range(wp.count()):
        w = wp.wp(i)
        if w.frame == 3:

src/c/u/cuav-1.3.1/cuav/lib/cuav_missiongenerator.py   cuav(Download)
 
        #WP1 - add in a jmp to entry lanes
        entryjump.append(MAVpointLoader.count())
        w = fn(TargetSys, TargetComp, 0,
               MAV_FRAME_GLOBAL_RELATIVE_ALT,
               MAV_CMD_NAV_TAKEOFF, 0, 1, 12, 0, 0, 0, self.takeoffPt[0], self.takeoffPt[1], self.takeoffPt[2])
        MAVpointLoader.add(w, comment="Takeoff")
        entryjump.append(MAVpointLoader.count())
        w = fn(TargetSys, TargetComp, 0,
               MAV_FRAME_GLOBAL_RELATIVE_ALT,
 
        # landing approach
        landing_approach_wpnum = MAVpointLoader.count()
        w = fn(TargetSys, TargetComp, 0,
               MAV_FRAME_GLOBAL_RELATIVE_ALT,
 
        # after drop, jump to exit lane
        exitjump.append(MAVpointLoader.count())        
        w = fn(TargetSys, TargetComp, 0,
               MAV_FRAME_GLOBAL_RELATIVE_ALT,
        #print "Done AF home"
        #WP12 - WPn - and add in the rest of the waypoints - Entry lane, search area, exit lane
        entry_wpnum = MAVpointLoader.count()
        for i in range(1):
            point = self.entryPoints[i]

src/c/u/cuav-HEAD/cuav/lib/cuav_missiongenerator.py   cuav(Download)
 
        #WP1 - add in a jmp to entry lanes
        entryjump.append(MAVpointLoader.count())
        w = fn(TargetSys, TargetComp, 0,
               MAV_FRAME_GLOBAL_RELATIVE_ALT,
               MAV_CMD_NAV_TAKEOFF, 0, 1, 12, 0, 0, 0, self.takeoffPt[0], self.takeoffPt[1], self.takeoffPt[2])
        MAVpointLoader.add(w, comment="Takeoff")
        entryjump.append(MAVpointLoader.count())
        w = fn(TargetSys, TargetComp, 0,
               MAV_FRAME_GLOBAL_RELATIVE_ALT,
 
        # landing approach
        landing_approach_wpnum = MAVpointLoader.count()
        w = fn(TargetSys, TargetComp, 0,
               MAV_FRAME_GLOBAL_RELATIVE_ALT,
 
        # after drop, jump to exit lane
        exitjump.append(MAVpointLoader.count())        
        w = fn(TargetSys, TargetComp, 0,
               MAV_FRAME_GLOBAL_RELATIVE_ALT,
        #print "Done AF home"
        #WP12 - WPn - and add in the rest of the waypoints - Entry lane, search area, exit lane
        entry_wpnum = MAVpointLoader.count()
        for i in range(1):
            point = self.entryPoints[i]

src/c/u/cuav-1.3.1/cuav/tools/agl_mission.py   cuav(Download)
    print("Home AGL %.1f" % home_agl)
 
    for i in range(1, wp.count()):
        w = wp.wp(i)
        if (w.x == 0 and w.y == 0) or w.command not in [mavutil.mavlink.MAV_CMD_NAV_WAYPOINT,

src/c/u/cuav-HEAD/cuav/tools/agl_mission.py   cuav(Download)
    print("Home AGL %.1f" % home_agl)
 
    for i in range(1, wp.count()):
        w = wp.wp(i)
        if (w.x == 0 and w.y == 0) or w.command not in [mavutil.mavlink.MAV_CMD_NAV_WAYPOINT,

src/m/a/mavlink-HEAD/pymavlink/tools/mavmission.py   mavlink(Download)
        wp.set(m, m.seq)
    wp.save(opts.output)
    print("Saved %u waypoints to %s" % (wp.count(), opts.output))
 
 

src/p/y/pymavlink-1.1.29/tools/mavmission.py   pymavlink(Download)
        wp.set(m, m.seq)
    wp.save(opts.output)
    print("Saved %u waypoints to %s" % (wp.count(), opts.output))