(scf, sequence)
| 125 | |
| 126 | |
| 127 | def run_sequence(scf, sequence): |
| 128 | cf = scf.cf |
| 129 | |
| 130 | for position in sequence: |
| 131 | print('Setting position {}'.format(position)) |
| 132 | for i in range(50): |
| 133 | cf.commander.send_position_setpoint(position[0], |
| 134 | position[1], |
| 135 | position[2], |
| 136 | position[3]) |
| 137 | time.sleep(0.1) |
| 138 | |
| 139 | cf.commander.send_stop_setpoint() |
| 140 | # Make sure that the last packet leaves before the link is closed |
| 141 | # since the message queue is not flushed before closing |
| 142 | time.sleep(0.1) |
| 143 | |
| 144 | |
| 145 | if __name__ == '__main__': |
no test coverage detected