Skip to content

Conversation

@rascustoms
Copy link
Contributor

Ported fix for USB power from ps5000a to ps4000a.
Enabled Bandwidth Filtering for PicoScope 4444

Enabled Bandwidth Filtering for PicoScope 4444
@pep8speaks
Copy link

pep8speaks commented Oct 2, 2019

Hello @rascustoms! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2019-10-02 14:11:42 UTC

@hmaarrfk
Copy link
Collaborator

hmaarrfk commented Oct 2, 2019

Looks good. Can you please fix the flake8 and pep8 errors. Since we have no other tests, these kinda act as a minimum barrier of protection.

@hmaarrfk
Copy link
Collaborator

hmaarrfk commented Oct 2, 2019

i guess there are some new flake8 errors that poped up recently. fixing them in #152

@rascustoms
Copy link
Contributor Author

No problems on the pep, I'll have it done shortly. Would it be worth also addressing #58 in fixing the power settings? Could we add another default value to the class (not unlike addressing the bandwidth options) as to what behaviour the user wants?

@hmaarrfk
Copy link
Collaborator

hmaarrfk commented Oct 2, 2019

I think maybe the correct fix seems to move:

        # This will check if the power supply is not connected
        # and change the power supply accordingly
        # Personally (me = Mark), I don't like this
        # since the user should address this immediately, and we
        # shouldn't let this go as a soft error
        # but I think this should do for now
        if m == 0x11A:
            self.changePowerSource(m)
        else:
            self.checkResult(m)

        self.model = self.getUnitInfo('VariantInfo')

To the high level wrapper.

We can then add a parameter: 'power_source' that would be None, DC, or USB where None would enable some magic to happen, while DC and USB would allow the user to specify exactly the source they desire.

@hmaarrfk
Copy link
Collaborator

hmaarrfk commented Oct 2, 2019

again, I have a philosophy that I want this to work for you the contributor, and for now, this isn't a blocker for me. If it is a blocker for you, then we can work to address it.

@hmaarrfk
Copy link
Collaborator

hmaarrfk commented Oct 2, 2019

I think the refactor should just happen elsewhere. It will also require careful consideration. If it does depend on the device class, we can add secondary conditions to the if statements

@hmaarrfk hmaarrfk merged commit a54cca0 into colinoflynn:master Oct 2, 2019
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.

4 participants