@@ -562,7 +562,7 @@ def is_all_servo_enable(self):
562562 """
563563 return self ._mesg (ProtocolCode .IS_ALL_SERVO_ENABLE , has_reply = True )
564564
565- def set_servo_data (self , servo_id , data_id , value ):
565+ def set_servo_data (self , servo_id , data_id , value , mode = None ):
566566 """Set the data parameters of the specified address of the steering gear
567567
568568 Args:
@@ -572,9 +572,14 @@ def set_servo_data(self, servo_id, data_id, value):
572572 for myArm: joint id 1 - 7
573573 data_id: Data address.
574574 value: 0 - 4096
575+ mode: 0 - indicates that value is one byte(default), 1 - 1 represents a value of two bytes.
575576 """
576- self .calibration_parameters (class_name = self .__class__ .__name__ , id = servo_id , address = data_id , value = value )
577- return self ._mesg (ProtocolCode .SET_SERVO_DATA , servo_id , data_id , value )
577+ if mode is not None :
578+ self .calibration_parameters (class_name = self .__class__ .__name__ , id = servo_id , address = data_id , value = value )
579+ return self ._mesg (ProtocolCode .SET_SERVO_DATA , servo_id , data_id , value )
580+ else :
581+ self .calibration_parameters (class_name = self .__class__ .__name__ , id = servo_id , address = data_id , value = value , mode = mode )
582+ return self ._mesg (ProtocolCode .SET_SERVO_DATA , servo_id , data_id , [value ], mode )
578583
579584 def get_servo_data (self , servo_id , data_id ):
580585 """Read the data parameter of the specified address of the steering gear.
0 commit comments