📅  最后修改于: 2022-03-11 14:46:55.826000             🧑  作者: Mango
while True:
while not radio.available(0):
## print("Nepareina")
time.sleep(1)
# wrong: duomenys = []
# right:
nbBytesData = 8 # nbBytesData is the expected size of the incoming array in bytes
duomenys = bytearray(nbBytesData)
radio.read(duomenys, radio.getDynamicPayloadSize())
data = struct.unpack('ff',duomenys)
rollx = data [0]
pitchy = data[1]
print(rollx)
print(" ")
print(pitchy)