OpenHantek / OpenHantek6022

OpenHantek6022 is a DSO software for Hantek USB digital signal oscilloscopes 6022BE / BL. Development OS is Debian Linux, but the program also works on FreeBSD, MacOS, RaspberryPi and Windows. No support for non-Linux related issues unless a volunteer steps in!
GNU General Public License v3.0
868 stars 153 forks source link

Fix offset sign #352

Closed espindola closed 1 year ago

espindola commented 1 year ago

When using calibrate_6022.py, the offset in the config file has the the opposite sign from the eeprom:

https://github.com/Ho-Ro/Hantek6022API/blob/01b82fd6a4bcb7bef5116a209e26206373521244/examples/calibrate_6022.py#L191

With this change I get much better agreement between the oscilloscope and the multimeter I calibrated it against.

Ho-Ro commented 1 year ago

I will doublecheck when I'm back at my desk and can do some measurements, thx for bringing up this issue.

Ho-Ro commented 1 year ago

I decided to correct the root cause of the reported behaviour and changed the sign in the ini file created by calibrate_6022.py. I didn't want to mess up the online-calibration from OpenHantek, because the sign handling of the offset looks consistent in hantekdsocontrol.cpp. Unfortunately you should either change the sign manually in your config file or redo the calibration and copy the offset part into your system ini file. But nevertheless I prefer to put the calibration data into EEPROM - this allows to move the scope to different computers and be always calibrated.

espindola commented 1 year ago

I decided to correct the root cause of the reported behaviour and changed the sign in the ini file created by calibrate_6022.py. I didn't want to mess up the online-calibration from OpenHantek, because the sign handling of the offset looks consistent in hantekdsocontrol.cpp. Unfortunately you should either change the sign manually in your config file or redo the calibration and copy the offset part into your system ini file. But nevertheless I prefer to put the calibration data into EEPROM - this allows to move the scope to different computers and be always calibrated.

Sounds good, thanks!