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

Add Questionable Condition register #96

Merged
merged 3 commits into from
Nov 30, 2017

Conversation

jfichtner
Copy link
Contributor

For some reason I left out the Questionable Condition register in my previous PR, so here it is!

Copy link
Owner

@j123b567 j123b567 left a comment

Choose a reason for hiding this comment

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

Thank you!
Please, can you fix the unit test. If you can't build unit tests with cunit, please read output of travis.

@@ -439,6 +440,12 @@ static void testIEEE4882(void) {
TEST_IEEE4882("STATus:QUEStionable:ENABle 2\r\n", "");
TEST_IEEE4882_REG(SCPI_REG_QUESE, 2);

EST_IEEE4882("STATus:QUEStionable:CONDition?\r\n", "0\r\n");
Copy link
Owner

Choose a reason for hiding this comment

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

You have typo in this line EST -> TEST. See travis build

@@ -461,6 +462,7 @@ static void testIEEE4882(void) {
TEST_IEEE4882("STATus:OPERation:CONDition?\r\n", "0\r\n");
TEST_IEEE4882_REG_SET(SCPI_REG_OPERC, 1);
TEST_IEEE4882("STATus:OPERation:CONDition?\r\n", "1\r\n");
TEST_IEEE4882_REG(SCPI_REG_OPERC, 1);
Copy link
Owner

Choose a reason for hiding this comment

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

TEST_IEEE4882 tests outer behavior of the library, so how it communicates

TEST_IEEE4882_REG tests inner behavior of the library, so if the register has really the expected value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea, I understand. When I removed it I was thinking that this line was setting the register, but then I realized that it was actually verifying that the value didn't change after being read by the SCPI query.

@@ -78,6 +78,7 @@ static const scpi_command_t scpi_commands[] = {
{ .pattern = "SYSTem:VERSion?", .callback = SCPI_SystemVersionQ,},

{ .pattern = "STATus:QUEStionable[:EVENt]?", .callback = SCPI_StatusQuestionableEventQ,},
{ .pattern = "STATus:QUEStionable:CONDition?", .callback = SCPI_Status_QuestionableConditionQ,},
Copy link
Owner

Choose a reason for hiding this comment

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

You have typo in function name SCPI_Status_QuestionableConditionQ -> SCPI_StatusQuestionableConditionQ. See travis build

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 93.156% when pulling 3a4f333 on jfichtner:addQuesCondReg into 4f960d2 on j123b567:master.

@j123b567 j123b567 merged commit 87978ae into j123b567:master Nov 30, 2017
@jfichtner jfichtner deleted the addQuesCondReg branch November 30, 2017 15:08
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.

3 participants