Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added Instrument Run Control #2453

Merged
merged 3 commits into from
Jun 2, 2024
Merged

Conversation

AsCress
Copy link
Collaborator

@AsCress AsCress commented May 31, 2024

Resolves #2446
Adds my first proposed feature, Instrument Run Control, to the Oscilloscope screen.

Instrument Run Control:

  1. One of the most fundamental features which dedicated oscilloscope devices offer is the ability to Stop or Run the instrument.
  2. When the oscilloscope is running, it is acquiring data from the activated channels when the triggering conditions are met. When stopped, it displays the last acquired waveform.
  3. This allows for a detailed analysis of the instantaneously captured waveform.

The UI for the feature is implemented as a button in the Toolbar which can be used to toggle the state of the Oscilloscope.

Initially, the oscilloscope is running. Clicking the button would stop the acquisition of data and display the last captured waveform. Clicking the button again would start the capturing again, as shown in the video.

Changes

  • app/src/main/java/io/pslab/activity/OscilloscopeActivity.java
  • app/src/main/res/menu/activity_landscape_menu.xml
  • app/src/main/res/values/strings.xml

Screenshots / Recordings

Screen_recording_20240531_161800.mp4

Note:- I have tested this feature with the In-Built-MIC input only.
@marcnause Could you please help me with testing this feature using all the other channels as well ?

Checklist:

  • No hard coding: I have used resources from strings.xml, dimens.xml and colors.xml without hard coding any value.
  • No end of file edits: No modifications done at end of resource files strings.xml, dimens.xml or colors.xml.
  • Code reformatting: I have reformatted code and fixed indentation in every file included in this pull request.
  • No extra space: My code does not contain any extra lines or extra spaces than the ones that are necessary.

Copy link
Contributor

@marcnause marcnause left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please run Reformat Code (Ctrl + Alt + L) on app/src/main/java/io/pslab/activity/OscilloscopeActivity.java, there are two minor issues in the formatting.

Apart from that it looks good to me. I have tested with the in-build microphone of the phone and with the PSLab v5 hardware.

@AsCress
Copy link
Collaborator Author

AsCress commented Jun 2, 2024

@marcnause Thank you so much for testing and your comments! I've reformatted the code.

@marcnause marcnause merged commit 5b828b0 into fossasia:development Jun 2, 2024
2 checks passed
@AsCress AsCress deleted the run_stop branch June 3, 2024 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Oscilloscope: Add new feature for Instrument Run Control
2 participants