skunkforce / OmniView

This Repository contains the OmniView Software, which is used in the AW4null Research Projects
https://www.autowerkstatt40.org/
MIT License
3 stars 4 forks source link

Bug: Saving synchronized data from more than one device #169

Closed AKMaily closed 5 days ago

AKMaily commented 1 week ago

Description:

Measuring a waveform with two or more devices. Saving all of those measurements via the saving popup results in the same amount of files as devices were selected.

Bug: Those files have different sizes therefore not the same amount of data points.

Problem:

The OmnAIScopes are synchronized. Therefore when starting a measurement the OmnAIScopes start measuring at the same timestamp. They also stop at the same timestamp. As the sampling rate of both devices is the same, the same amount of data points is measured. For each device one file is created. As they both have the same amount of data points, if all data points that were measured are saved correctly the files will have the same size and the same amount of data points.

Case:

All datapoints are positive and between a range of 20 to 50 on the y-axis.

Reproducing the bug:

Connect two Scopes with USB-C cables to a Hub. Connect this Hub to the laptop. The Scopes are not connected to a voltage source.

Open the software.

Press the Buttons:

Search for devices --> Start (Play symbol button) --> Stop (stop symbol button) --> Save (Save symbol button)

In the opening Popup menu, open the section "Deviceslist(/Geräteliste)"

Select two devices in the drop-down menu --> Press Save (Speichern)

image

Go into the direction where the Application is saved.

Look in the build/Release/saves/ folder. Here the files should be saved. You should see that both files have a different size.

image

Files that were created when testing, the second file is always smaller than the first:

device1-2024-07-04T09-59.csv data points: 81337 device2-2024-07-04T09-59.csv data points: 67427

Expected Behavior:

Userflow:

--> Measuring a waveform with two or more devices , waveform in range 20 to 50 on the y-axis. --> Pressing the save button --> Selecting all devices in the drop down menu --> Pressing save

Output:

Test that should work if the files are saved correctly

Connecting two / three / four devices that are not connected to a voltage source.

--> press the start button --> press the stop button

Expected image :

image

--> Press the save button --> select one device

Expected image:

image

--> Press save

Expected output:

image

The file should contain every measured data point from the measurement from the selected device.

--> Go back to the application --> Press the save button again --> select all connected devices

Expected image :

image

--> Press save

Expected output for two devices:

image

All files that are saved should contain the datapoints of their corresponding device. The files should all have the same size, as the same amount of datapoints was measured by each device.

This should work for connecting one or more devices up to 256.

Definition of done:

--> All described tests are fulfilled --> All variable_names in the new code describe what the purpose of the variable --> The new code fulfills the c++ standard --> The new code fulfills the code standard for this project --> All files that were changed are formatted with the given clang-format

If there are any questions regarding this issue feel free to ask in the comments of the issue.

R-Abbasi commented 1 week ago

Which version of the software did result in files with different sizes as shown in the Reproducing the bug section above, please?

AKMaily commented 1 week ago

The current master version : d0edbc2

R-Abbasi commented 1 week ago

https://github.com/skunkforce/OmniView/pull/167 The branch above works based on this and this tests for the specifications above.