Keyboard interruption used to be checked once every 20000 calls to
micropython_port_vm_hook_loop. However, if costly functions were
executed in between calls to this method, the delay for activating
interruptions would increase.
Now, keyboard interruption is checked after a fixed amount of time has
passed. This way, if the process waits a long time between two calls
to micropython_port_vm_hook_loop, it is still interrupted in a timely
manner.
Change-Id: I37ca3bd4a996fa086078f504340dd857526e356a
Additional checks for interruptions were making the kandinsky module
slower.
/!\ Some scripts are now very difficult to interrupt
Change-Id: I4c18273d8895deaac68084411a52556c8459d52b
We now erase the turtle before writing text. This way we can redraw it
on top of it, preventing overlapping and remanent images.
Those scripts are causing issues :
goto(-30,50)
write('coucou')
left(270)
goto(30,50)
write('oui')
-----------
up()
goto(-30,50)
write('coucou')
goto(30,50)
write('oui')
Change-Id: I01a6e5f8308937b5051165548c2046883da587d2
Scenario: Execute the script parabola.py, open the variable box, select
any leaf, enter, open the variable box again -> no variables are loaded
anymore
The function can now accept the value 1.0 in addition to 1
Change-Id: I9a7021076844784ca997fc618253524089cbe855
(cherry picked from commit c69e1542ecc9a7e474a3f1e92cc97f644bf4b701)
It is now possible to specify the color of the plot through a third positional argument in the plot function. However, is a keyword (color or c) is then used, it will override the previous color command.
Change-Id: I5a73ddb322e650db486de568e4a56b4752751cfb
(cherry picked from commit e6cc196cca405e5a4f8058a6af917aa0e7962b8a)
checkFloatType function used to check for an obj type before cast. This is already done by mp_obj_get_float
Change-Id: I745bb3066328678ab0b2a2149c8f38a84f26fbd2
Added a condition for being considered empty.
Allows axis("on") or axis((0,1,2,3)) to display something with show()
This behavior is the same as the python module
Change-Id: If5f3b07c280ee9ead2bc23d23cbbb4f01da7eae5
After lauching the console, if we fetch a script we mark it as fetched.
When the variable box displays variables from imported scripts, it scans
all the variables from the scripts marked as fetched.
setjmp is not guaranteed to collect all registers without modification
on all platforms.
This fixes the following bug: when the pointer of a newly allocated
object on the Python heap is stored in rpb registers on x86_64 arch, it
was not collected by the garbarge collector.