Commit Graph

101 Commits

Author SHA1 Message Date
Léa Saviot
23e3038c00 [python/turtle] Remove waitForVBlank before drawings
The drawing was really slowed down by the waiting, and no tearing effect
has been noticed without waitForVBlank
2018-12-10 17:36:52 +01:00
Léa Saviot
d545c4532a [python/turtle] When speed = 0, do not draw the turtle during "goTo" 2018-12-10 17:14:23 +01:00
Léa Saviot
7efb48ab6e [python/turtle] Turtle::circle's angle argument is optional 2018-12-10 16:59:11 +01:00
Léa Saviot
fa0e93e8ac [python/turtle] Fix Turtle::circle for negative angles 2018-12-10 16:51:16 +01:00
Léa Saviot
3249ccb695 [python/turtle] "back()" shortcut for "backwards()" 2018-12-10 14:31:44 +01:00
Léa Saviot
3b334257ad [python/turlte] Move the turtle paws to mimic crawling 2018-12-10 14:10:44 +01:00
Léa Saviot
c95e291dd1 [python/turtle] First icon redesign 2018-12-07 16:58:59 +01:00
Léa Saviot
c8a5972243 [python/turtle] Turtle::circle(radius, angle) 2018-12-07 10:51:14 +01:00
Léa Saviot
cc3beb6014 [python/turtle] Turtle::reset() method 2018-12-06 17:26:43 +01:00
Léa Saviot
9c9355deba [python/turtle] Use Escher::Metric values instead of copying them 2018-12-06 17:26:43 +01:00
Léa Saviot
3ca1790908 [python/turtle] The Y axis is oriented upwards 2018-12-06 17:26:35 +01:00
Léa Saviot
432e259f30 [python/turtle] Speed max and min should produce the same behavior 2018-12-06 13:55:07 +01:00
Léa Saviot
d530637591 [python/turtle] Fix speed type 2018-12-06 13:38:05 +01:00
Léa Saviot
e769255c05 [python/turtle] Default pen size is 1 2018-12-06 11:55:29 +01:00
Léa Saviot
4b3ce7a7f1 [python/turtle] Fix Turtle::setSpeed
If speed > 10 or < 0.5, it should be set to 0. When speed is 10 or 0,
the drawing should be instantaneous. Default speed is 3.
2018-12-06 11:55:20 +01:00
Léa Saviot
1e78f20ac1 [python] Return after interruption in possibly long turtle methods
forward(100) with speed = 3 can now be interrupted.
2018-12-06 11:48:42 +01:00
Léa Saviot
49e8a501e7 [python] Fix micropython_port_interruptible_msleep
It now gets interrupted. Turtle drawing can now be interrupted too.
2018-12-05 17:41:16 +01:00
Romain Goyet
05a2491479 [python/turtle] Fix the heading 2018-11-16 18:34:46 +01:00
Romain Goyet
467ae9c6f3 [python/turtle] Fix small typos 2018-11-16 18:34:23 +01:00
Romain Goyet
5748521876 [python/turtle] Try to play well with uPy's GC 2018-11-16 18:33:41 +01:00
Romain Goyet
7fc34fe17f [python/turtle] Use an init method to reset the turtle 2018-11-16 18:33:05 +01:00
Romain Goyet
a9091c933b [python/turtle] Use a Turtle class 2018-11-16 15:31:31 +01:00
Romain Goyet
fe076d0578 [python/turtle] Use mp_float_t 2018-11-16 10:33:28 +01:00
Romain Goyet
22a39a2fd6 [python/turtle] Use a dedicated folder 2018-11-16 10:31:16 +01:00
Romain Goyet
82f0b7183f [python/turtle] Use micropython_port_interruptible_msleep 2018-11-16 10:17:26 +01:00
Romain Goyet
efaa87d36c Merge branch 'master' into python_turtle 2018-11-16 09:46:11 +01:00
Romain Goyet
253c183963 [python] Clean the time module
- Export micropython_port_should_interrupt and
micropython_port_interruptible_msleep in Emscripten
- Make micropython_port_interruptible_msleep available in a helper
2018-11-16 09:40:53 +01:00
Romain Goyet
d6a2238be6 [python] Clean the Kandinsky's module code 2018-11-15 17:12:01 +01:00
Romain Goyet
a3d6d6ddd6 [ion/timing] Cleanup 2018-11-15 16:19:07 +01:00
Romain Goyet
8fa1558fc4 [python] Small cleanup 2018-11-15 15:12:17 +01:00
Romain Goyet
dbc866d289 [python] Use the proper time module 2018-11-15 14:59:56 +01:00
Romain Goyet
e73033b19c Merge branch 'master' into utime_module 2018-11-15 14:37:11 +01:00
Romain Goyet
1142fd00a2 [python] Use a custom modtime implementation
It only exposes "monotonic" and "sleep" functions, which are the
only part of CPython's time we can actually do at the moment.
2018-11-15 14:18:01 +01:00
Romain Goyet
d7a13ba8fd Revert to micropython_port_should_interrupt 2018-11-14 16:57:16 +01:00
Léa Saviot
f052bd9088 [python/port] Clean some code 2018-11-13 10:06:23 +01:00
Romain Goyet
5dfefb477a [python] Rename micropython_port_should_interrupt to micropython_port_vm_hook_loop 2018-11-13 10:06:23 +01:00
Damien Nicolet
24630011b1 [code] keep only CPython equivalent functions in utime module 2018-11-10 00:00:03 +01:00
Damien Nicolet
9b818bd963 [ion] fix sleep functions in emscripten build 2018-11-09 01:36:38 +01:00
Damien Nicolet
f93bf97182 [ion] Sharing millis & micros for blackbox and simulator 2018-11-09 01:30:22 +01:00
Damien Nicolet
c0c0905b84 [ion] millis() and micros() returns uint32_t and are defined in their own header 2018-11-09 01:30:22 +01:00
Damien Nicolet
79bfc7f112 [code] time module 2018-11-09 01:30:22 +01:00
Jean-Baptiste Boric
c89a369a08 [python] Add getters for turtle module 2018-10-30 18:26:13 +01:00
Jean-Baptiste Boric
fcf7cc33cf [python] Implement turtle.position() 2018-10-30 18:10:25 +01:00
Jean-Baptiste Boric
0c94f44399 [python] Return value for turtle.pensize() 2018-10-30 17:34:13 +01:00
Jean-Baptiste Boric
9e2437047b [python] Clean up turtle code and samples 2018-10-28 19:15:32 +01:00
Jean-Baptiste Boric
3a7ae27cf7 [python] Fix turtle icon dependency (for real) 2018-10-28 18:32:56 +01:00
Jean-Baptiste Boric
ca589b90f2 [python] Fix turtle icon dependency 2018-10-28 14:20:35 +01:00
Jean-Baptiste Boric
0a05b94b4d [python] Turtle module improvements 2018-10-28 14:16:00 +01:00
Jean-Baptiste Boric
464c1a5c95 [python] Initial turtle module 2018-10-27 14:24:36 +02:00
Émilie Feral
e45e653619 [python] Fix bug in Micropython when parsing const char * in
float/double

This is fixed in Micropython project by commit b768cc6ca8ed6d7430b86dc7ccb9ee2391b3a251
2018-10-02 14:41:23 +02:00