From aaba7a2c8fbc65f63d8c535a9a4dab4f965df5f5 Mon Sep 17 00:00:00 2001 From: bodiddles Date: Sat, 11 Mar 2017 10:41:02 -0800 Subject: [PATCH] [RUNTIME] Changes Params for Team Flag LEDs (#262) Change valid params for team flag status LEDs from s1-s4 to led1-led4 to reflect JSON file. Updates Hibike README to reflect this reality --- hibike/README.md | 8 ++++---- runtime/testy/studentAPI.py | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hibike/README.md b/hibike/README.md index fdda27c1..892f9e9a 100644 --- a/hibike/README.md +++ b/hibike/README.md @@ -194,10 +194,10 @@ Device Type Enumeration: | 0x05 | TeamFlag | 0 | mode | bool | yes | yes | | | | 1 | blue | bool | yes | yes | | | | 2 | yellow | bool | yes | yes | -| | | 3 | s1 | bool | yes | yes | -| | | 4 | s2 | bool | yes | yes | -| | | 5 | s3 | bool | yes | yes | -| | | 6 | s3 | bool | yes | yes | +| | | 3 | led1 | bool | yes | yes | +| | | 4 | led2 | bool | yes | yes | +| | | 5 | led3 | bool | yes | yes | +| | | 6 | led4 | bool | yes | yes | | 0x06 | Grizzly | | | | | | | 0x07 | ServoControl | 0 | servo0 | float | yes | yes | | | | 1 | servo1 | float | yes | yes | diff --git a/runtime/testy/studentAPI.py b/runtime/testy/studentAPI.py index 6e05fb48..820fa488 100644 --- a/runtime/testy/studentAPI.py +++ b/runtime/testy/studentAPI.py @@ -80,7 +80,7 @@ def get_value(self, name, gamepad_number=0): class Robot(StudentAPI): deviceName_to_writeParams = { - "TeamFlag" : ["s1", "s2", "s3", "s4"], + "TeamFlag" : ["led1", "led2", "led3", "led4"], "ServoControl" : ["servo0", "servo1"], "YogiBear" : ["duty_cycle", "pid_pos_setpoint", "pid_pos_kp", "pid_pos_ki", "pid_pos_kd", "current_thresh", "enc_pos"], } @@ -102,10 +102,10 @@ class Robot(StudentAPI): "pid_pos_kd" : [(float, int), 0, float("inf")], "current_thresh" : [(float, int), 2, 10], "enc_pos" : [(float, int), 0, 0], - "s1" : [(bool,)], - "s2" : [(bool,)], - "s3" : [(bool,)], - "s4" : [(bool,)], + "led1" : [(bool,)], + "led2" : [(bool,)], + "led3" : [(bool,)], + "led4" : [(bool,)], } def __init__(self, toManager, fromManager):