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

update main.cpp with a small two line correction #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions libraries/xlpp/test/simple/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,15 @@ int printSingleValue(XLPP &xlpp)
switch (type) {
case LPP_DIGITAL_INPUT:
{
uint8_t v = xlpp.getDigitalOutput();
//uint8_t v = xlpp.getDigitalOutput(); // Sven, 3.2.21: should be Input instead of Output
uint8_t v = xlpp.getDigitalInput(); // line inserted by Sven 3.2.21
printf("Digital Input: %hu (0x%02x)\n", v, v);
break;
}
case LPP_DIGITAL_OUTPUT:
{
uint8_t v = xlpp.getDigitalInput();
// uint8_t v = xlpp.getDigitalInput(); //Sven, 3.2.21: should be Output instead of Input
uint8_t v = xlpp.getDigitalOutput(); // line inserted by Sven 3.2.21
printf("Digital Output: %hu (0x%02x)\n", v, v);
break;
}
Expand Down Expand Up @@ -409,4 +411,4 @@ int printXLPP(XLPP &xlpp)
if (e != 0) return e;
}
return 0;
}
}