Skip to content

Commit

Permalink
Nunchuck server tested and example updated
Browse files Browse the repository at this point in the history
  • Loading branch information
madhephaestus committed Mar 17, 2018
1 parent 1fb3a9c commit 0e9da89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions examples/ControllerServer/ControllerServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@
const char *networkName = "RBE_Team_1";
const char *networkPswd = "thisissecret";
#define CONTROLLER_ID 2
Nunchuck nun;
Classic classic;
void setup() {
//launchControllerServer(networkName, networkPswd,new WiiClassicServerEvent(CONTROLLER_ID));
launchControllerServer(networkName, networkPswd,new WiiChuckServerEvent(CONTROLLER_ID));
launchControllerServer(networkName, networkPswd,new WiiClassicServerEvent(&classic,CONTROLLER_ID));
//launchControllerServer(networkName, networkPswd,new WiiChuckServerEvent(&nun,CONTROLLER_ID));

}

void loop() {
loopServer();
//nun.printInputs();
//Serial.println("\n\n");
//for(int i=0;i<60;i++){
// Serial.println("Val "+String(i)+" = "+String( getControllerStatus()[i]));
Expand Down
2 changes: 1 addition & 1 deletion src/server/WiiChuckServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
void WiiChuckServerEvent::event(float * buffer) {
//Serial.print("\r\nClassic read");
classic->readData();
//classic->printInputs();
classic->printInputs();
if(getControllerStatusStartup()){
setControllerStatusStartup(true);
analogReadResolution(8);
Expand Down

0 comments on commit 0e9da89

Please sign in to comment.