Johan fix

This commit is contained in:
2016-06-20 17:16:29 +02:00
parent f84fcfa4e2
commit da0b1f5588
16 changed files with 4429 additions and 7 deletions
+41
View File
@@ -0,0 +1,41 @@
//
// Created by janco on 5/24/16.
//
#include "Controller.h"
Controller::Controller(int controllerId) {
this->controllerId = controllerId;
this->ypr = Vec3f();
this->joystick = Vec2f();
this->setConnected(true);
}
Controller::~Controller() { }
void Controller::rumble(int duration, int power){
// controllerhandler->rumble(controllerId, duration, power);
}
void Controller::setConnected(bool connected) {
if(connected){
this->connected = true;
}else{
this->connected = false;
this->ypr = Vec3f(0,0,0);
this->joystick = Vec2f(0,0);
this->button = false;
this->magnetSwitch = false;
this ->joystickButton = false;
}
}
bool Controller::isConnected(void) {
return connected;
}