logo

bytearray 如何将一个float 数写到字节数组中

2019-02-28 20:03
Q
G-Boiling-Water

rho_err = abs(line.rho())-img.width()/2

theta_err = line.theta()

data_back = bytearray([0x00,0XA0,theta_r,0XAA])

f6f2b102-2930-46d3-ad36-4d9971321a98.png
2019-02-28 23:39
I
网红小智智 星瞳科技

请不要重复发帖子

https://forum.singtown.com/topic/2363/%E5%85%B3%E4%BA%8Ebytearray-%E5%87%BD%E6%95%B0-can-t-convert-float-to-int