Biorobotics
/
piano_robot
newest version,
check_state.cpp
- Committer:
- roosbulthuis
- Date:
- 2015-10-26
- Revision:
- 3:11c2175b4478
- Parent:
- 0:fc6fa085d591
File content as of revision 3:11c2175b4478:
/* * check_state.cpp * * Created on: Oct 20, 2015 * Author: User */ #include <string> using namespace std; string check_state(double left_input, double right_input, double threashold) { if (left_input > threashold and right_input > threashold) { return("keypress"); } else if (left_input > threashold) { return("left"); } else if (right_input > threashold) { return("left"); } else { return("rest"); } }