Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Unlock bytes

  • Loading branch information...
commit ba36fa6f9735e164c90e647f5ed7a5476ee47c65 1 parent e70ccb3
@flummer flummer authored
Showing with 64 additions and 47 deletions.
  1. +0 −44 emptyExample.xcodeproj/project.pbxproj
  2. +64 −3 src/testApp.cpp
View
44 emptyExample.xcodeproj/project.pbxproj
@@ -7,8 +7,6 @@
objects = {
/* Begin PBXBuildFile section */
- DDA509BE13D31B0600CCEFD7 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDA509B513D31B0600CCEFD7 /* main.cpp */; };
- DDA509BF13D31B0600CCEFD7 /* testApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDA509B713D31B0600CCEFD7 /* testApp.cpp */; };
DDA509C013D31B0600CCEFD7 /* ofxMSAInteractiveObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDA509BC13D31B0600CCEFD7 /* ofxMSAInteractiveObject.cpp */; };
DDAF60A613D3014C004991CF /* ofxIndustrialRobot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDAF608813D3014C004991CF /* ofxIndustrialRobot.cpp */; };
DDAF60A713D3014C004991CF /* ofxIndustrialRobotArmData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDAF608A13D3014C004991CF /* ofxIndustrialRobotArmData.cpp */; };
@@ -112,10 +110,6 @@
/* Begin PBXFileReference section */
DDA509B013D31B0600CCEFD7 /* changelog.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = changelog.txt; sourceTree = "<group>"; };
- DDA509B513D31B0600CCEFD7 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
- DDA509B613D31B0600CCEFD7 /* MyTestObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyTestObject.h; sourceTree = "<group>"; };
- DDA509B713D31B0600CCEFD7 /* testApp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = testApp.cpp; sourceTree = "<group>"; };
- DDA509B813D31B0600CCEFD7 /* testApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = testApp.h; sourceTree = "<group>"; };
DDA509B913D31B0600CCEFD7 /* install.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = install.xml; sourceTree = "<group>"; };
DDA509BA13D31B0600CCEFD7 /* LICENSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.txt; sourceTree = "<group>"; };
DDA509BC13D31B0600CCEFD7 /* ofxMSAInteractiveObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxMSAInteractiveObject.cpp; sourceTree = "<group>"; };
@@ -294,7 +288,6 @@
isa = PBXGroup;
children = (
DDA509B013D31B0600CCEFD7 /* changelog.txt */,
- DDA509B113D31B0600CCEFD7 /* examples */,
DDA509B913D31B0600CCEFD7 /* install.xml */,
DDA509BA13D31B0600CCEFD7 /* LICENSE.txt */,
DDA509BB13D31B0600CCEFD7 /* src */,
@@ -303,41 +296,6 @@
path = src/ofxMSAInteractiveObject;
sourceTree = "<group>";
};
- DDA509B113D31B0600CCEFD7 /* examples */ = {
- isa = PBXGroup;
- children = (
- DDA509B213D31B0600CCEFD7 /* openFrameworks */,
- );
- path = examples;
- sourceTree = "<group>";
- };
- DDA509B213D31B0600CCEFD7 /* openFrameworks */ = {
- isa = PBXGroup;
- children = (
- DDA509B313D31B0600CCEFD7 /* ofxMSAInteractiveObject example */,
- );
- path = openFrameworks;
- sourceTree = "<group>";
- };
- DDA509B313D31B0600CCEFD7 /* ofxMSAInteractiveObject example */ = {
- isa = PBXGroup;
- children = (
- DDA509B413D31B0600CCEFD7 /* src */,
- );
- path = "ofxMSAInteractiveObject example";
- sourceTree = "<group>";
- };
- DDA509B413D31B0600CCEFD7 /* src */ = {
- isa = PBXGroup;
- children = (
- DDA509B513D31B0600CCEFD7 /* main.cpp */,
- DDA509B613D31B0600CCEFD7 /* MyTestObject.h */,
- DDA509B713D31B0600CCEFD7 /* testApp.cpp */,
- DDA509B813D31B0600CCEFD7 /* testApp.h */,
- );
- path = src;
- sourceTree = "<group>";
- };
DDA509BB13D31B0600CCEFD7 /* src */ = {
isa = PBXGroup;
children = (
@@ -953,8 +911,6 @@
DDAF613813D30283004991CF /* model3DS.cpp in Sources */,
DDAF613913D30283004991CF /* texture3DS.cpp in Sources */,
DDAF613A13D30283004991CF /* ofx3dModelLoader.cpp in Sources */,
- DDA509BE13D31B0600CCEFD7 /* main.cpp in Sources */,
- DDA509BF13D31B0600CCEFD7 /* testApp.cpp in Sources */,
DDA509C013D31B0600CCEFD7 /* ofxMSAInteractiveObject.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
View
67 src/testApp.cpp
@@ -193,12 +193,12 @@ void testApp::update(){
resetting = 1;
}*/
- if(unlockMotors && !byteone[7]){
+ /*if(unlockMotors && !byteone[7]){
byteone[7] = true;
} else if(!unlockMotors && byteone[7]){
byteone[7] = (false);
}
-
+ */
industrialRobot->thread.serial->unlock();
}
@@ -239,13 +239,74 @@ void testApp::draw(){
ofRect(10+i*40, ofGetHeight()-(10+1*40), 30, 30);
}
for(int i=0;i<5;i++){
- ofDrawBitmapString(motorStatusLabel[i], 10+100*i, ofGetHeight()-(10+4*40));
+ ofDrawBitmapString(motorStatusLabel[i], 10+200*i, ofGetHeight()-(10+4*40));
}
ofDrawBitmapString(panicStatus, 10, ofGetHeight()-(10+5*40));
}
//--------------------------------------------------------------
void testApp::keyPressed(int key){
+ if(key == 'a'){
+ resetting = 1;
+ }
+
+ if(key == '1'){
+ byteone[0] = !byteone[0];
+ }
+ if(key == '2'){
+ byteone[1] = !byteone[1];
+ }
+
+ if(key == '3'){
+ byteone[2] = !byteone[2];
+ }
+
+ if(key == '4'){
+ byteone[3] = !byteone[3];
+ }
+
+ if(key == '5'){
+ byteone[4] = !byteone[4];
+ }
+ if(key == '6'){
+ byteone[5] = !byteone[5];
+ }
+ if(key == '7'){
+ byteone[6] = !byteone[6];
+ }
+
+ if(key == '8'){
+ byteone[7] = !byteone[7];
+ }
+
+ if(key == 'q'){
+ bytetwo[0] = !bytetwo[0];
+ }
+ if(key == 'w'){
+ bytetwo[1] = !bytetwo[1];
+ }
+
+ if(key == 'e'){
+ bytetwo[2] = !bytetwo[2];
+ }
+
+ if(key == 'r'){
+ bytetwo[3] = !bytetwo[3];
+ }
+
+ if(key == 't'){
+ bytetwo[4] = !bytetwo[4];
+ }
+ if(key == 'y'){
+ bytetwo[5] = !bytetwo[5];
+ }
+ if(key == 'u'){
+ bytetwo[6] = !bytetwo[6];
+ }
+
+ if(key == 'i'){
+ bytetwo[7] = !bytetwo[7];
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.