Color Detection Fails Before system_wake_notify

Sending the commands for color detection return an error code 6 if they are issued before a system_wake_notify is received when the RVR is sleeping. These are the only commands I’ve found that need this notification.

This happens even though the system has responded to a power wake command. Specifically, the RVR is awake and responding to the awake request. The system_wake_notify occurs about 100 msecs are the wake response.

Drive commands will also fail if the RVR is in sleep mode. I’ll put in a ticket for myself to get the full list of commands that are restricted in sleep after the new year.

Jim

The underlying issue is howing to know when the RVR can accept commands. The system_wake_notify is only issued when the RVR is asleep and and an awake sent.

When a program starts it doesn’t know if the RVR is sleeping or awake. So an awake is a prudent command. But even though a response is received to that request the RVR may be awakening. That requires waiting for the system_wake_notify. But if it is awake there is no way of knowing it is ready for commands.

  1. Do a slight delay. About 200 msec seems to be how long for the system_wake_notify to arrive when it is sent.
  2. Issue a request known to fail if the RVR is not ready.

Not a big issue since the delay is short. The awake* might be issued before all the other setup processing to reduce the length of the delay.

A list of delayed commands would be good.

Rud

SPHERO Email Marketing -