Manual Flight in Blockly (using keyboard)
Clarry290 last edited by
For some reason I'm having issues with the "when code is running" block .... it causes my computer to freeze and crashes the page? This was working fine last year, so just wanted to check that it should be functioning? My students are just wanting to navigate the Codrone via the keyboard again.
@clarry290 I tried this code on my computer and I am not experiencing freezing. However, I modified the code a bit that might help with your issues. Instead of using all if statements, I used some else if statements to prevent conflicting commands. I also included a land command and a very short wait in the loop to prevent overlap. I would also advise students to press one key at a time and wait for the drone to respond, as multiple key presses may be saved in a buffer and then try to run all at once. Let me know if this works!
@clarry290 I will have someone on our team take a look at this issue. In the meantime, you can try to include a 0.05-second delay at the end of the loop to prevent commands from overlapping and freezing your code.