Alex exoskeleton
ALEX SoftwareDocumentation
Buttons.cpp
Go to the documentation of this file.
1 
12 #include "Buttons.h"
13 #include "DebugMacro.h"
14 
16  DEBUG_OUT("Button object created")
17 }
18 //set up buttons using GPIO manager
19 
20 // get functions for each individual button and all buttons as an array
21 
23  button_states current_state = {this->state.gButton, this->state.yButton, this->state.bButton, this->state.rButton};
24  return current_state;
25 };
27  //Read all 4 BUTTONs from i/o device
28  int redbtn = 0;
29  int bluebtn = 0;
30  int greenbtn = 0;
31  int yellowbtn = 0;
32 
33  // Send buttons to variables
34  this->state.yButton = yellowbtn;
35  // this->gButton = greenbtn;
36  this->state.bButton = bluebtn;
37  this->state.rButton = redbtn;
38  this->state.gButton = greenbtn;
39 }
button_states state
Definition: Buttons.h:35
int gButton
Definition: Buttons.h:21
void setStates()
Definition: Buttons.cpp:26
Buttons()
Definition: Buttons.cpp:15
int rButton
Definition: Buttons.h:24
button_states getStates()
Definition: Buttons.cpp:22
int bButton
Definition: Buttons.h:23
Describes the state of a set of buttons which include a Green, Yellow, Blue and Red. Used within the Buttons class. - Not currently used.
Definition: Buttons.h:20
#define DEBUG_OUT(x)
Definition: DebugMacro.h:11
int yButton
Definition: Buttons.h:22