Manual Flight in Blockly (using keyboard)

  • Hi there,

    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.

    0_1612491211651_Screen Shot 2021-02-05 at 11.09.43 AM.png

  • administrators

    @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!

    0_1612978749130_Screen Shot 2021-02-10 at 9.37.13 AM.png

  • administrators

    @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.

Log in to reply

Looks like your connection to Robolink community was lost, please wait while we try to reconnect.