Skip to content

Commit

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

}

void loop() {
loopServer();
Serial.println("\n\n");
for(int i=0;i<60;i++){
Serial.println("Val "+String(i)+" = "+String( getControllerStatus()[i]));
}
//Serial.println("\n\n");
//for(int i=0;i<60;i++){
// Serial.println("Val "+String(i)+" = "+String( getControllerStatus()[i]));
//}
}
1 change: 1 addition & 0 deletions src/server/ServerStatus.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#ifndef LIBRARIES_ESPWII_SRC_SERVER_SERVERSTATUS_H_
#define LIBRARIES_ESPWII_SRC_SERVER_SERVERSTATUS_H_
#define WII_CLASSIC_SERVER 1970

#include <stdint.h>

Expand Down
5 changes: 2 additions & 3 deletions src/server/WiiChuckServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* Author: hephaestus
*/

#ifndef ESWPIISERV
#define ESWPIISERV
#ifndef ESWPIISERVCHUCK
#define ESWPIISERVCHUCK
#include <stdint.h>
#include <stdio.h>
#include <vector>
Expand All @@ -15,7 +15,6 @@
#include <cmath> // std::abs
#include <WiiChuck.h>

#define WII_CLASSIC_SERVER 1970
#include "ServerStatus.h"

class WiiChuckServerEvent: public PacketEventAbstract {
Expand Down

0 comments on commit 1fb3a9c

Please sign in to comment.