Skip to content

Commit

Permalink
Revert "fan-wip"
Browse files Browse the repository at this point in the history
This reverts commit dfec83d.
  • Loading branch information
eigendude committed May 16, 2024
1 parent 7972350 commit 8ddc7ea
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
1 change: 0 additions & 1 deletion oasis_control/launch/control_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ def generate_launch_description() -> LaunchDescription:
),
("set_digital_mode", f"{MCU_NODE}/set_digital_mode"),
("set_sampling_interval", f"{MCU_NODE}/set_sampling_interval"),
("substation_system_telemetry", "substation/system_telemetry"),
],
)
ld.add_action(conductor_node)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
from oasis_msgs.msg import PeripheralInput as PeripheralInputMsg
from oasis_msgs.msg import PeripheralScan as PeripheralScanMsg
from oasis_msgs.msg import PowerMode as PowerModeMsg
from oasis_msgs.msg import SystemTelemetry as SystemTelemetryMsg
from oasis_msgs.srv import CaptureInput as CaptureInputSvc
from oasis_msgs.srv import DigitalWrite as DigitalWriteSvc
from oasis_msgs.srv import PowerControl as PowerControlSvc
Expand Down Expand Up @@ -108,7 +107,6 @@
SUBSCRIBE_MCU_STRING = "mcu_string"
SUBSCRIBE_PERIPHERAL_INPUT = "input"
SUBSCRIBE_PERIPHERALS = "peripherals"
SUBSCRIBE_SUBSTATION_TELEMETRY = "substation_telemetry"

# Services
SERVICE_POWER_CONTROL = "power_control"
Expand Down Expand Up @@ -213,14 +211,6 @@ def __init__(self) -> None:
qos_profile=qos_profile,
)
)
self._substation_telemetry_sub: rclpy.subscription.Subscription = (
self.create_subscription(
msg_type=SystemTelemetryMsg,
topic=SUBSCRIBE_SUBSTATION_TELEMETRY,
callback=self._on_substation_telemetry,
qos_profile=qos_profile,
)
)

# Services
self._power_control_service: rclpy.service.Service = self.create_service(
Expand Down Expand Up @@ -548,17 +538,6 @@ def _on_peripheral_scan(self, peripheral_scan_msg: PeripheralScanMsg) -> None:
self.get_logger().debug(f"Closing joystick {address} of type {profile}")
del self._joysticks[address]

def _on_substation_telemetry(
self, substation_telemetry_msg: SystemTelemetryMsg
) -> None:
# Get substation CPU temperature
cpu_temperature: float = substation_telemetry_msg.cpu_temperature

# Compare CPU temperature against threshold
if cpu_temperature >= SUBSTATION_TEMP_THRESHOLD:
# Enable CPU fan
self._cpu_fan_manager.set

def _open_joystick(self, peripheral_address: str, controller_profile: str) -> None:
self.get_logger().debug(
f"Opening joystick {peripheral_address} of type {controller_profile}"
Expand Down

0 comments on commit 8ddc7ea

Please sign in to comment.