Remove lidar PWM commands - speed is now auto-tuned by SangamIO
Simplified enable_lidar() to take no parameters and removed set_lidar_pwm() entirely. Upstream clients now only send enable/disable commands; lidar speed is auto-tuned in SangamIO.
This commit is contained in:
+4
-20
@@ -281,16 +281,11 @@ class RobotClient:
|
||||
self.send_command(command)
|
||||
logger.info(f"Main brush speed set to {speed}%")
|
||||
|
||||
def enable_lidar(self, pwm: int):
|
||||
"""
|
||||
Enable lidar with specified PWM speed
|
||||
|
||||
Args:
|
||||
pwm: PWM duty cycle 0-100% (lidar motor speed)
|
||||
"""
|
||||
command = {"EnableLidar": {"pwm": max(0, min(100, pwm))}}
|
||||
def enable_lidar(self):
|
||||
"""Enable lidar (speed is auto-tuned by SangamIO)"""
|
||||
command = "EnableLidar"
|
||||
self.send_command(command)
|
||||
logger.info(f"Lidar enabled at {pwm}% PWM")
|
||||
logger.info("Lidar enabled")
|
||||
|
||||
def disable_lidar(self):
|
||||
"""Disable lidar motor"""
|
||||
@@ -298,17 +293,6 @@ class RobotClient:
|
||||
self.send_command(command)
|
||||
logger.info("Lidar disabled")
|
||||
|
||||
def set_lidar_pwm(self, pwm: int):
|
||||
"""
|
||||
Set lidar PWM speed (without power cycling)
|
||||
|
||||
Args:
|
||||
pwm: PWM duty cycle 0-100%
|
||||
"""
|
||||
command = {"SetLidarPWM": {"pwm": max(0, min(100, pwm))}}
|
||||
self.send_command(command)
|
||||
logger.info(f"Lidar PWM set to {pwm}%")
|
||||
|
||||
def emergency_stop(self):
|
||||
"""Emergency stop all motors and actuators"""
|
||||
command = "EmergencyStopAll"
|
||||
|
||||
Reference in New Issue
Block a user