OpenROV / openrov-software

Meta project for all of the OpenROV Software projects
http://openrov.com
Other
422 stars 188 forks source link

The system appears to be sending multiple commands on keyboard press #623

Closed BrianAdams closed 7 years ago

BrianAdams commented 7 years ago

For instance, the hitting light will toggle it off-on-off-on.

BrianAdams commented 7 years ago

Checked the input manager to ensure it was not somehow holding on to listeners. Registered several different presets, including the same one a couple time. In mock mode, sending a light command only happened once.

gilborty commented 7 years ago

Was this reported on a vehicle?

BrianAdams commented 7 years ago

@nerdgilbert , yes. The test vehicle Grau was using. If you can get a chance to take a look on vehicle, I think that is the next step. Might be worth capturing the serial traffic while recreating the issue.

BrianAdams commented 7 years ago

@spiderkeys had a sense it might have to do with the syncTargetPower function that keeps retrying every 33ms until it gets a lights_tpow response from the MCU. That it may be the round trip is taking too long and the message gets sent again. Now how a power off message would trigger a power on again is still a mystery.

spiderkeys commented 7 years ago

The command going to the firmware is a specific value; there is no toggle API. The only place the concept of toggling exists is the browser client, so delayed/repeated toggles are probably building up between the client and server. This behaviour has exhibited itself in many other commands as well, happening especially often on the BBB.

BrianAdams commented 7 years ago

This was tied to the gamepad press generating multiple gamepad click events. Opened other issues. Closing this one.