Closed karthik-shanmugam closed 8 years ago
BTW, it turns out this issue wasn't on develop branch, it was on testbranch
Sorry, is this still an issue that should be fixed?
Yes, to the best of my knowledge
Despite best attempts, this bug is not fixed yet.
If the student code uses a servo name not in the naming map, runtime crashes. This is because if the name is not found in the naming map, the lookup function returns the identity (this works well for motors and sensors, but apparently not servos).
To reproduce:
set_servo('thisnamedoesnotexist', 110)
Traceback (most recent call last):
File "runtime.py", line 619, in <module>
set_servos(servo_values)
File "runtime.py", line 248, in set_servos
h.writeValue(device_id_to_uid(device_id),
File "runtime.py", line 94, in device_id_to_uid
return int(device_id[:-1])
ValueError: invalid literal for int() with base 10: 'servo'
Closing since runtime is now in its own separate repo (atalanta)
Runtime output:
Student code in question:
CustomID.txt