Commit 9b7293f2 authored by Anthony Jacob's avatar Anthony Jacob
Browse files

comment joystick x and y axis, remove extra ; , format code

parent 42247ba3
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -2,12 +2,12 @@
#include <Joystick.h>
#include <Keyboard.h>


// Create the Joystick object
Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID,
                   JOYSTICK_TYPE_JOYSTICK, 32, 0,
                   true, true, false, false, false, false,
                   false, false, false, false, false);;

                   false, false, false, false, false);
//declare the pin number for each button, switch, encoder...
//declare understandable var to recognise button in the code,
const int SwitchButton1 = 2;
@@ -153,6 +153,7 @@ void setup() {
//function that will be executed again and again and again...
void loop() {


  //call the function for each type of input
  switchCheck(SwitchButton1, 'a');
  switchCheck(SwitchButton2, 'z');
@@ -181,7 +182,6 @@ void loop() {
  ButtonCheck(threeWay3A, 'w');
  ButtonCheck(threeWay3B, 'x');


  ButtonCheck(rotaryEncoder1Button, 'c');
  ButtonCheck(rotaryEncoder2Button, 'v');
  ButtonCheck(rotaryEncoder3Button, 'b');
@@ -194,8 +194,10 @@ void loop() {
  rotaryEncoderChar(rotaryEncoder4A, rotaryEncoder4B , '7' , '8');
  rotaryEncoderChar(rotaryEncoder5A, rotaryEncoder5B , '9' , '-');

  analogJoyAxisCheck(joystickX , joystickY);
  ButtonCheck(joystickButton, '*');
  /*
    analogJoyAxisCheck(joystickX , joystickY);
  */
}

//this function manage the analog joystick