The error message for streaming timeout from the sensor device should be improved.
A helpful error message tells the user that no measurement data was received in the last seconds. Maybe something like this:
Exiting program since no measurement data was received in the last 4.05 seconds
Exiting program since no streaming data was received in the last 4.05 seconds
Error
—————
☹️ Too many retries (2)
Stack Trace
———————————
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\Rene\AppData\Local\Programs\Python\Python312\Scripts\icoc.exe\__main__.py", line 7, in <module>
File "C:\Users\Rene\Documents\Projects\ICOc\mytoolit\old\ui.py", line 833, in main
raise error
File "C:\Users\Rene\Documents\Projects\ICOc\mytoolit\old\ui.py", line 829, in main
UserInterface().run()
File "C:\Users\Rene\Documents\Projects\ICOc\mytoolit\old\ui.py", line 810, in run
self.vRunConsoleAutoConnect()
File "C:\Users\Rene\Documents\Projects\ICOc\mytoolit\old\cli.py", line 1103, in vRunConsoleAutoConnect
self.vDataAquisition()
File "C:\Users\Rene\Documents\Projects\ICOc\mytoolit\old\cli.py", line 862, in vDataAquisition
self.vGetStreamingAccData()
File "C:\Users\Rene\Documents\Projects\ICOc\mytoolit\old\cli.py", line 1009, in vGetStreamingAccData
self.vGetStreamingAccDataProcess()
File "C:\Users\Rene\Documents\Projects\ICOc\mytoolit\old\cli.py", line 947, in vGetStreamingAccDataProcess
self.__exit__()
File "C:\Users\Rene\Documents\Projects\ICOc\mytoolit\old\cli.py", line 158, in __exit__
self._BlueToothStatistics()
File "C:\Users\Rene\Documents\Projects\ICOc\mytoolit\old\cli.py", line 346, in _BlueToothStatistics
log_statistics("STH1", "sensor node")
File "C:\Users\Rene\Documents\Projects\ICOc\mytoolit\old\cli.py", line 328, in log_statistics
send_counter = self.Can.BlueToothCmd(
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Rene\Documents\Projects\ICOc\mytoolit\old\network.py", line 1759, in BlueToothCmd
ack = self.tWriteFrameWaitAckRetries(message, retries=2)["Payload"][2:]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Rene\Documents\Projects\ICOc\mytoolit\old\network.py", line 637, in tWriteFrameWaitAckRetries
self.__exitError(f"Too many retries ({retries})")
File "C:\Users\Rene\Documents\Projects\ICOc\mytoolit\old\network.py", line 238, in __exitError
raise Exception(sErrorMessage)
Exception: Too many retries (2)
Description
The error message for streaming timeout from the sensor device should be improved.
Steps to Reproduce the Problem
Enter the following command (for a device called “Test-STH”) in a Windows (PowerShell) prompt:
Wait for the measurement window for to pop up
Disconnect the device before the measurement time (10 seconds) elapses
Expected Result
A helpful error message tells the user that no measurement data was received in the last seconds. Maybe something like this:
Actual Result