Closed AKMaily closed 3 months ago
Saved a measurement using the settings below for the signal generator on my local calibrated branch. Wave: SINE Freq: 1 Hz Ampl: 5 V Offset : 0 V Duty: 50 % Phase: 0
Values saved in the file match the wave seemingly:
Did I miss something regarding the issue, please?
It seems that the values you measured are not values from the calibrated version. The version that has the bug is : c02ee50 in the Dev_v1.0.0 branch.
That was a result from my local branch which is a combination of Niklas's calibration branch + as few code cleanups and improvements by me. You can check the executable for that branch feature-read-calibration-values and test both the calibration and values saving.
It is important that the scope that is tested is also calibrated. You should see seconds on the x-axis and a voltage on the y-axis.
Here's a test on the new scope.
Here's also the zipped executable for easier testing. Still the settings (Wave: SINE, Freq: 1 Hz, Ampl: 5 V, Offset : 0 V, Duty: 50 %, Phase: 0) is used.
Did you test this with the version c02ee50 ?
Tested with this executable https://github.com/skunkforce/OmniView/actions/runs/10591202270 and it seems fine yet. Did you test the executable I sent, please?
When i test the executable with a calibrated scope, the output has a voltage on the y-axis :
In your example an ADC Count is displayed.
Did you test the application with all the scopes you have ?
Yes, I did.
Have no idea for the y-axis label for the time being as the code has almost zero comment and looks quite messy to me, hence it's a little hard to understand what was meant.
As for saving the values, there's a 3-character room to save each value, hence the range must be: [-99,999] If the value goes beyond the room, seemingly no value will be saved. You can observe a resembling behavior through this example. Could you mention the expected range and values, please?
It seems your Scopes are not calibrated, therefore you can only see the ADC Counts and not a voltage.
As mentioned above the values should be rounded to the 5th decimal place, that means a value of +-1,00000.
The value for the number before the decimal point can go up to 100 currently so: +-100,00000 is the range of values.
For that we may need to extend the allocated memory to make room for 9 characters, first, and then round the floating point values to be at most 5 decimal point numbers.
Version: c02ee50 ; branch: Dev_v1.0.0
The images will be added later
BUG: Values that are saved with a calibrated OmnAIScope are displayed as dots in the .csv file.
Problem: The values that are measured with a calibrated OmnAIScope are not pure integers anymore. They can be any negative or positive float number. Therefore two problems occur. The first one is discussed in this issue.
After taking a measurement and pressing the save button, the popup window is opened. The function save() is used in this popup window. The problem seems to be the length of the values. Values with less then 10 digits are saved correctly (tested), values over 10 digits get a wrong format.
device1-2024-08-28T11-58.csv
As the Scope currently only measures values up to the 5th decimal place it should be fine to round the values to the 5th digit as every number after that has no real information about the measurement.
Defintion of done:
The issue is solved if the following points are fullfilled: Data from a calibrated scope is saved as a float in the format 1.00000 in the .csv file The changed code is commented
The software should be first uploaded here for testing and possible comments before a PR is created.