BrachioGraph
BrachioGraph copied to clipboard
getkey and explicit new xy
- Uses getkey instead of getchar to allow for arrow keys
- sends new x and y coords to xy function to use steps (using self was calculating length 0)
@evildmp Any interest in this?
I like the idea, but is there a way to prevent this from happening when a key is held down?
>>> bg.drive_xy()
X:-10.0, Y:7.0
PW1:1999, PW2:1393
^[[D^[[BX:-11.0, Y:7.0
^[[CPW1:1986, PW2:1293
^[[C^[[C^[[C^[[CX:-10.0, Y:7.0
It happens already with the a/s/k/l controls, but it's more obtrusive as above.
Also, the drive methods should be documented in /docs/reference/brachiograph.rst.