StSav012 / e-502

0 stars 1 forks source link

Initial tests #1

Open kannab98 opened 2 years ago

kannab98 commented 2 years ago

Добрый день!

Попробовал запустить программу с конфигами из репозитория. Возникло несколько вопросов. Запускал с несколькими версиями интерпретаторов под Arch Linux:

[General]
windowGeometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x2\x62\0\0\0\xd7\0\0\x3\xf3\0\0\x3S\0\0\x2\x62\0\0\0\xd7\0\0\x3\xf3\0\0\x3S\0\0\0\0\0\0\0\0\x5\0\0\0\x2\x62\0\0\0\xd7\0\0\x3\xf3\0\0\x3S)
windowState=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\0\0\0\x1\x92\0\0\x2}\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\0)

[channelSettings]
1\channel=1
1\enabled=true
2\averaging=2
2\channel=3
2\enabled=true
2\mode=3
size=2

[digitalLines]
1\pushed=true
2\pushed=false
3\pushed=false
4\pushed=false
5\pushed=true
6\pushed=true
7\pushed=false
8\pushed=false
size=8

[parameters]
frequencyDivider=5
ipAddress=169.254.79.177
measurementDuration=10
sampleRate=0.5
samplesPortionSize=1000
savingLocation=/home/ponur/e-502/data

При начале записи возникает ошибка индексирования

Traceback (most recent call last):
  File "/home/ponur/e-502/gui/app.py", line 64, in on_button_start_clicked
    while any(self._saving_location(i + 1).exists() for i in range(32)):
  File "/home/ponur/e-502/gui/app.py", line 64, in <genexpr>
    while any(self._saving_location(i + 1).exists() for i in range(32)):
  File "/home/ponur/e-502/gui/app.py", line 48, in _saving_location
    / self.tabs[channel].title()
IndexError: list index out of range

Поскольку функция отвечала только за имя файла, куда после сохранялись данные, временно поменял self.tabs[channel].title() на self.tabs[0].title().

Получил следующий output в файл imp_000001.csv:

-4.0549963926831916e+31
-4.055058289685156e+31
-4.0549654441822095e+31
-4.0549654441822095e+31
-4.0549963926831916e+31
-4.0549654441822095e+31
-4.0550273411841738e+31
-4.055058289685156e+31
-4.0549654441822095e+31
-4.0550273411841738e+31
-4.055058289685156e+31
StSav012 commented 2 years ago

Please reveal the output of pip freeze.

StSav012 commented 2 years ago

As for the pyqtgraph error, I won't fix it. Make an issue on their side.

The error in stubs.py looks bizarre. However, as I don't use NoneType anywhere, here is the fix: https://github.com/StSav012/e-502/commit/7c7a1d74eee1c505ceced5bfb454d57dac32b9ad.

The IndexError looks like it should have been fixed long ago. I'll check whether the code here is the latest I possess. As a short fix, consider https://github.com/StSav012/e-502/commit/c10ed3bdd45e99895192653b41e6361b6d26c940.

Finally, the input data look anything but wrong. I wonder if the byte order is right. I have sys.byteorder == 'little' on all my systems. What is yours? Unless it's about the byte order, I need the traffic dump or any kind of connection to the device.

I've tried some manipulations. When I change the byte order, I get some -2.14e-38 to 2.14e-38 from the values you've written. This doesn't look right, either. puzzled

kannab98 commented 2 years ago

Thanks for the hotfixes!

I think we should try running the scripts on the same machine. I can provide you Wireguard tunnel to the Raspberry Pi with an E-502 connected to it.

Will this be enough for testing?

StSav012 commented 2 years ago

Thanks, I do suppose it is enough. Please PM me with further info.

kannab98 commented 2 years ago

Okay, I'll give you the details on Monday. Unfortunately, I don't have access to the device right now.