Skip to content

Commit 02e9454

Browse files
committed
Addressed review comments
1 parent 605e441 commit 02e9454

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed

external_samples/port.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ class PortType(Enum):
2525
SERVO_PORT = 4
2626
I2C_PORT = 5
2727
USB_PORT = 6
28-
EXPANSION_HUB_MOTOR_PORT = 7
29-
EXPANSION_HUB_SERVO_PORT = 8
28+
EXPANSION_HUB_MOTOR_PORT = 7 # This is the port on the expansion hub
29+
EXPANSION_HUB_SERVO_PORT = 8 # This is the port on the expansion hub
3030

3131
BASE_COMPOUND = 256
3232
USB_HUB = BASE_COMPOUND + 1
33-
EXPANSION_HUB_MOTOR = BASE_COMPOUND + 2
34-
EXPANSION_HUB_SERVO = BASE_COMPOUND + 3
33+
EXPANSION_HUB_MOTOR = BASE_COMPOUND + 2 # This is combination expansion hub and motor
34+
EXPANSION_HUB_SERVO = BASE_COMPOUND + 3 # This is combination expansion hub and servo
3535

3636
class Port:
3737
def __init__(self, port_type: PortType = None, location: int = None, port1: type[Self] = None, port2: type[Self] = None):

external_samples/rev_touch_sensor.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ def reset(self) -> None:
4545
self.released_callback = None
4646
pass
4747

48-
def get_connection_port_type(self) -> PortType | None:
49-
return self.port.get_type
50-
5148
def periodic(self) -> None:
5249
old = self.is_pressed
5350
self._read_hardware()

external_samples/smart_motor.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ def stop(self) -> None:
4646
def reset(self) -> None:
4747
pass
4848

49-
def get_connection_port_type(self) -> PortType | None:
50-
return self.port.get_type()
51-
5249
def periodic(self) -> None:
5350
pass
5451

python_tools/json_util.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ def _processClass(self, cls):
360360
constructor_data[_KEY_FUNCTION_ARGS] = args
361361
constructor_data[_KEY_FUNCTION_DECLARING_CLASS_NAME] = declaring_class_name
362362
constructor_data[_KEY_FUNCTION_RETURN_TYPE] = declaring_class_name
363-
# This is where I check to see if
364363
expectedPortType = python_util.getPortTypeFromConstructor(value)
365364
if expectedPortType:
366365
constructor_data[_KEY_PORT_EXPECTED_TYPE] = python_util.getPortTypeFromConstructor(value)

0 commit comments

Comments
 (0)