add off function
This commit is contained in:
@@ -117,9 +117,10 @@ class LedCommand(Node):
|
||||
xcmd=msg.data
|
||||
print('led cmd:',xcmd)
|
||||
cmd,val=xcmd.split(',')
|
||||
self.cur_color=cmd
|
||||
self.cur_val=int(val)
|
||||
self.update=1
|
||||
if cmd in ['red','green','blue','cyan','yellow','purple','white','off']:
|
||||
self.cur_color=cmd
|
||||
self.cur_val=int(val)
|
||||
self.update=1
|
||||
###self.led_blink(cmd,int(val))
|
||||
def main():
|
||||
rclpy.init()
|
||||
|
||||
Reference in New Issue
Block a user