From 3158e39e7b156b2ca3d3daf68d5d48ecf7209df8 Mon Sep 17 00:00:00 2001 From: SvenZeisberg <62630067+SvenZeisberg@users.noreply.github.com> Date: Wed, 3 Feb 2021 21:06:23 +0100 Subject: [PATCH] update main.cpp with a small two line correction correct case LPP_DIGITAL_INPUT and case LPP_DIGITAL_OUTPUT in lines 156 and 163 --- libraries/xlpp/test/simple/main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libraries/xlpp/test/simple/main.cpp b/libraries/xlpp/test/simple/main.cpp index 7058560..6ec26d4 100644 --- a/libraries/xlpp/test/simple/main.cpp +++ b/libraries/xlpp/test/simple/main.cpp @@ -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; } @@ -409,4 +411,4 @@ int printXLPP(XLPP &xlpp) if (e != 0) return e; } return 0; -} \ No newline at end of file +}