@lumooo wrote:
Is this supposed to not work, or am I missing something really trivial?
This is my code:In main.cpp:
void ofApp::mouseDragged(int x, int y, int button){ kinematics.mouseDragged(x, y, button); }
in kinematics.cpp:
void kinematics::mouseDragged(int x, int y, int button){ targetx = x; targety = y; communication.sendData(draai1, draai2, draai3); }
in communication.cpp:
void communication::sendData(int a, int b, int c){ ofDrawBitmapString(a, 20, 150); ofDrawBitmapString(b, 20, 200); ofDrawBitmapString(c, 20, 250); device.writeByte(a); }
I don't get any errors, it just doesn't execute the function in communication.cpp
communication.hpp:
#ifndef communication_hpp #define communication_hpp #include <stdio.h> #include <ofMain.h> #include "ofxIO.h" #include "ofxSerial.h" class communication{ public: void setup(); void update(); void draw(); void sendData(int a, int b, int c); ofx::IO::SerialDevice device; }; #endif /* communication_hpp */
Posts: 5
Participants: 2