GithubHelp home page GithubHelp logo

Comments (8)

louiecaulfield avatar louiecaulfield commented on July 23, 2024

First off, you don't need to use Application.DoEvents() since you're using a windows forms app. This is only necessary for console apps (on windows).

Secondly, I don't see you using IScope.GetScopeData() anywhere, nor are you using the IScope.DataSourceScope (which calls GetScopeData() in its own thread). You need to call this method, otherwise the software doesn't know what state the scope is in.

Check out https://github.com/labnation/DeviceInterface#iscope-usage

from deviceinterface.

gjzamiar avatar gjzamiar commented on July 23, 2024

from deviceinterface.

louiecaulfield avatar louiecaulfield commented on July 23, 2024

I believe the UI reports a different viewport offset than the one used in the API. Check the source:

        public void SetViewPort(double offset, double timespan)
        {
            /*                maxTimeSpan
             *            <---------------->
             *  .--------------------------,
             *  |        ||       ||       |
             *  `--------------------------`
             *  <--------><------->
             *    offset   timespan
             */

from deviceinterface.

louiecaulfield avatar louiecaulfield commented on July 23, 2024

If you don't care about the viewport vs acquisition window, best is to set offset to 0 and timespan to AcquisitionLength.

from deviceinterface.

gjzamiar avatar gjzamiar commented on July 23, 2024

I wish to thank you all for the help, I am capturing my event and on my way, getting all the math right. Doing RMS on the samples. It would be nice to have an automatic "Delete Double Value" when working at a relatively slow 43ms you end up with a lot of doubles

Thanks again,
George

from deviceinterface.

louiecaulfield avatar louiecaulfield commented on July 23, 2024

What do you mean with "double value"?

Can you describe the inconvenience?

from deviceinterface.

gjzamiar avatar gjzamiar commented on July 23, 2024

from deviceinterface.

louiecaulfield avatar louiecaulfield commented on July 23, 2024

I don't understand what you're asking. Are you referring to the SmartScope app's measurements? Or features of the DeviceInterface library?

Average() is a built-in function of C# (or to be more precise, Linq).

If you're trying to calculate the RMS and don't want to write the code yourself, I suggest you just google and copy paste a few lines of code

This question has nothing left to do with the original topic of this issue, so I'm closing it. Feel free to open new ones if you have more issues.

from deviceinterface.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.