pioneers / runtime

Firmware for the PiE kit robots and devices
7 stars 2 forks source link

[EXECUTOR] Handle subscription edge case with Robot.get_value() in block comment #214

Closed levincent06 closed 3 years ago

levincent06 commented 3 years ago

Observed Behavior

If studentcode.py has the following code

def teleop_main():
      """
      Robot.get_value(<dev_id_here>, <param_name>, <val>)
      """

The subscription code parser won't realize that the API call is part of a comment. As a result, executor will try to subscribe to the device, which will throw an error if the device isn't connected.

Expected behavior

Executor should recognize this as part of a comment, and ignore it when parsing for subscription requests.