magwo / elevatorsaga

The elevator programming game!

Home Page:http://play.elevatorsaga.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Elevator Takes A While To Stop

Garethp opened this issue · comments

So, I've noticed that my biggest problem at the moment appears to be that my elevator often tends to take multiple seconds to come to a complete stop, if it comes to a stop at all. The elevator will issue a stop command, but it's taken up to 10+ seconds to actually come to said stop. I'm not entirely sure why, but here's my gist of the code I've got

https://gist.github.com/Garethp/9d0522009d307e4dc803

This bug occurs in both Firefox v43 and Chrome v47 on Ubuntu 15.10

The workaround I've found for this bug is to change stop() to goToFloor(number, true); then clear out the destinationQueue manually

Ah, never mind, I read the documentation again and realized that the elevator stops where it is, and not at the current floor if used in the on('passing_floor') event