python struct unpack
msg = self.serverSocket.recv(1024) # 接受服务端消息 AngleSensorST,y_Angle_deg,x_Angle_deg,Z_Angle_deg,AngleDeviceTEMP,WatchdogCount=struct.unpack("!hffffh", msg) print(AngleSensorST,y_Angle_deg,x_Angle_deg,Z_Angle_deg,AngleDeviceTEMP,WatchdogCount)
1 -5.0372314453125 5.537109375 355.2923583984375 30.959999084472656 -16696
############
标签:Angle,struct,python,msg,unpack,deg From: https://www.cnblogs.com/herd/p/16662427.html