@@ -28,7 +28,7 @@ def set_color(self, color: utils.RGBColor, fast: bool = False):
2828 '''
2929 self .comms .send_header (self .device_id , utils .PacketType .NET_PACKET_ID_RGBCONTROLLER_UPDATESINGLELED , struct .calcsize ("i3bx" ))
3030 buff = struct .pack ("i" , self .id ) + color .pack ()
31- self .comms .sock . send (buff )
31+ self .comms .send_data (buff )
3232 if not fast :
3333 self .comms .requestDeviceData (self .device_id )
3434
@@ -64,7 +64,7 @@ def set_color(self, color: utils.RGBColor, start: int = 0, end: int = 0, fast: b
6464 self .comms .send_header (self .device_id , utils .PacketType .NET_PACKET_ID_RGBCONTROLLER_UPDATEZONELEDS , struct .calcsize (f"IIH{ 3 * (end - start )} b{ (end - start )} x" ))
6565 buff = struct .pack ("IH" , self .id , end - start ) + (color .pack ())* (end - start )
6666 buff = struct .pack ("I" , len (buff )) + buff
67- self .comms .sock . send (buff )
67+ self .comms .send_data (buff )
6868 if not fast :
6969 self .comms .requestDeviceData (self .device_id )
7070
@@ -84,7 +84,7 @@ def set_colors(self, colors: List[utils.RGBColor], start: int = 0, end: int = 0,
8484 self .comms .send_header (self .device_id , utils .PacketType .NET_PACKET_ID_RGBCONTROLLER_UPDATEZONELEDS , struct .calcsize (f"IIH{ 3 * (end - start )} b{ (end - start )} x" ))
8585 buff = struct .pack ("IH" , self .id , end - start ) + b'' .join ((color .pack () for color in colors ))
8686 buff = struct .pack ("I" , len (buff )) + buff
87- self .comms .sock . send (buff )
87+ self .comms .send_data (buff )
8888 if not fast :
8989 self .comms .requestDeviceData (self .device_id )
9090
@@ -128,7 +128,7 @@ def set_color(self, color: utils.RGBColor, start: int = 0, end: int = 0, fast: b
128128 )
129129 buff = struct .pack ("H" , end - start ) + (color .pack ())* (end - start )
130130 buff = struct .pack ("I" , len (buff )) + buff
131- self .comms .sock . send (buff )
131+ self .comms .send_data (buff )
132132 if not fast :
133133 self .comms .requestDeviceData (self .id )
134134
@@ -152,7 +152,7 @@ def set_colors(self, colors: List[utils.RGBColor], start: int = 0, end: int = 0,
152152 )
153153 buff = struct .pack ("H" , end - start ) + b'' .join ((color .pack () for color in colors ))
154154 buff = struct .pack ("I" , len (buff )) + buff
155- self .comms .sock . send (buff )
155+ self .comms .send_data (buff )
156156 if not fast :
157157 self .comms .requestDeviceData (self .id )
158158
@@ -174,7 +174,7 @@ def set_mode(self, mode: Union[int, str, utils.ModeData]):
174174 utils .PacketType .NET_PACKET_ID_RGBCONTROLLER_UPDATEMODE ,
175175 len (data )
176176 )
177- self .comms .sock . send (data )
177+ self .comms .send_data (data )
178178 self .active_mode = mode .id
179179 self .data .active_mode = self .active_mode
180180 if len (mode .colors ) == len (self .colors ):
0 commit comments