From 83e2b3f8007f4fbd7166811be50ed063d24dc17b Mon Sep 17 00:00:00 2001 From: Sarah Knepper Date: Thu, 15 Jan 2015 16:46:36 -0800 Subject: [PATCH] joystick12: Add comments to C++ example Signed-off-by: Sarah Knepper --- examples/joystick12-example.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/joystick12-example.cxx b/examples/joystick12-example.cxx index ac7d28f7..408ca2ad 100644 --- a/examples/joystick12-example.cxx +++ b/examples/joystick12-example.cxx @@ -45,9 +45,11 @@ sig_handler(int signo) int main(int argc, char **argv) { + // Instantiate a joystick on analog pins A0 and A1 sensor = new upm::Joystick12(0,1); signal(SIGINT, sig_handler); + // Print the X and Y input values every second while (!is_running) { float x = sensor->getXInput(); float y = sensor->getYInput();