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

SCPI limit fix for for voltage/current/power #201

Merged
merged 1 commit into from
Apr 6, 2018

Conversation

ZakDanger
Copy link

This makes the SCPI handlers for setting the limit for voltage/current/power fixed and the same.

This fixes an issue where setting voltage limit failed due to:
if (value < channel_dispatcher::getUMin(*channel) || channel_dispatcher::getUMaxLimit(*channel))
vs
if (value < channel_dispatcher::getUMin(*channel) || value > channel_dispatcher::getUMaxLimit(*channel))

It also fixes an issue where setting min current limit is handled incorrectly due to:
value = channel_dispatcher::getIMax(*channel);
vs
value = channel_dispatcher::getIMin(*channel);

It also fixes an issue where setting power limit with unit suffix fails due to:
if (param.unit != SCPI_UNIT_NONE)
vs
if (param.unit != SCPI_UNIT_NONE && param.unit != SCPI_UNIT_WATT)

@mvladic mvladic merged commit 6f5fb04 into eez-open:master Apr 6, 2018
@ZakDanger ZakDanger deleted the scpi_limit_fixup branch April 6, 2018 12:29
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.

2 participants