When junior princesses Nana and Momo transferred into Earth School where big sister LaLa can (theoretically) keep an eye on them, things SHOULD be smooth sailing. Not sure if that's what you intended, but you may be reading neighboring values in your 4-byte translation if that integer index "i" occupies less than 4-bytes.Synopsis As close encounters of the twisted kind between the residents of the planet Develuke (represented primarily by the female members of the royal family) and the inhabitants of Earth (represented mainly by one very exhausted Rito Yuki) continue to escalate, the situation spirals even further out of control. In your code, the integer index "i" is (presumably) being translated into 4-byte components & being sent over bluetooth. In the original code (from tsan) that you were using as your example, a float value was being stored in the "data" array, and the (float) members of that array were being translated into 4-byte components & being sent over the serial port as bytes. Sock=bluetooth.BluetoothSocket( bluetooth.RFCOMM )ĭata seems like nonsense and it is very slow. Public Report(string lines, long elapsedTime)īd_addr = "FC:A8:9A:00:22:33" #itade address Private void bgw_DoWork(object sender, DoWorkEventArgs e)īgw.ReportProgress(0, new Report(lines.ToArray(), sw.ElapsedMilliseconds)) TextBox1.Text = r.elapsedTime.ToString() Private void bgw_ProgressChanged(object sender, ProgressChangedEventArgs e) Private void button2_Click(object sender, EventArgs e) Private void button1_Click(object sender, EventArgs e) I even tried something standard available such as 300, and still same receive time. See the python code where I have set the baudrate to 0, and it still works, The baud rate is only used for hardware UART to be able to receive and time the asynchronous bit stream The baud rate don't matter as the teensy just ignore that "setting"-request and always operate at max speed possible Print("Rx Time: " + str(time_end - time_start))Īs I was thinking the receive spends most of the time just waits for data in ser.readline()īut this code above still takes around 7 seconds Print("can not convert to float: " + txthodnota) If len(txthodnota) != 0 and unt('.') = 1 and txthodnota.startswith(".") = False: Txthodnota = b''.join(fifo.pop(0)).decode()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |