random checkin
This commit is contained in:
@@ -3,8 +3,16 @@
|
||||
XboxSeriesXControllerESP32_asukiaaa::Core xboxController; //"40:8e:2c:41:e4:eb"); //("a4:c1:38:38:e3:c0");
|
||||
uint32_t lastcontrollernotify = 0;
|
||||
|
||||
int joymin = 0;
|
||||
int joymax = 0;
|
||||
|
||||
|
||||
direction getdirection(int setpoint)
|
||||
{
|
||||
if(setpoint > )
|
||||
|
||||
}
|
||||
|
||||
void setup_controller()
|
||||
{
|
||||
xboxController.begin();
|
||||
@@ -14,7 +22,6 @@ void setup_controller()
|
||||
|
||||
void loop_controller()
|
||||
{
|
||||
|
||||
xboxController.onLoop();
|
||||
if (xboxController.isConnected())
|
||||
{
|
||||
@@ -38,11 +45,7 @@ void loop_controller()
|
||||
log_i("received at %l", receivedAt);
|
||||
lastcontrollernotify = millis();
|
||||
}
|
||||
handle_notify(((float)xboxController.xboxNotif.joyLVert / joystickMax *100),
|
||||
((float)xboxController.xboxNotif.joyRVert / joystickMax *100),
|
||||
((float)xboxController.xboxNotif.joyLHori / joystickMax *100),
|
||||
((float)xboxController.xboxNotif.joyRHori / joystickMax *100)
|
||||
);
|
||||
controlMotor("mainboom", direction::stop)
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#include "Arduino.h"
|
||||
#include "motors.h"
|
||||
#include <XboxSeriesXControllerESP32_asukiaaa.hpp>
|
||||
|
||||
#define CONTROLLERNOTIFY 1000
|
||||
|
||||
|
||||
void setup_controller();
|
||||
void loop_controller();
|
||||
void handle_notify(int motR, int motL, int motArm, int bucket);
|
||||
@@ -34,7 +34,7 @@ enum direction
|
||||
left,
|
||||
right,
|
||||
stop
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class motor
|
||||
|
||||
Reference in New Issue
Block a user