Update serialctl packet to include right stick
This commit is contained in:
parent
cd79a133f1
commit
ec9431bf6c
12
src/main.cpp
12
src/main.cpp
@ -101,6 +101,7 @@ int left_cooldown = 0;
|
||||
int right_cooldown = 0;
|
||||
int olddisplay = 99999; // guarantee a change when first value comes in
|
||||
|
||||
// motor indeces for set_motor() function
|
||||
#define FLSTEER 1
|
||||
#define FRSTEER 2
|
||||
#define BLSTEER 3
|
||||
@ -844,7 +845,14 @@ void loop() {
|
||||
} else
|
||||
fb = appjoystick->getFeedback();*/
|
||||
|
||||
int zeroed_power = -1 * ((int)(astate->stickX) - 127);
|
||||
int zeroed_lx = -1 * ((int)(astate->stickX) - 127);
|
||||
int zeroed_ly = ((int)(astate->stickY) - 127);
|
||||
int zeroed_rx = -1 * ((int)(astate->stickRX) - 127);
|
||||
int zeroed_ry = ((int)(astate->stickRY) - 127);
|
||||
|
||||
|
||||
// Goliath / 2 side arcade tank drive code below
|
||||
/*int zeroed_power = -1 * ((int)(astate->stickX) - 127);
|
||||
int zeroed_turn = ((int)(astate->stickY) - 127);
|
||||
|
||||
|
||||
@ -922,7 +930,7 @@ void loop() {
|
||||
//drive_right(right_enabled, right_power);
|
||||
//drive_left(left_enabled, -left_power);
|
||||
SerComm.println(" L: " + String(left_power) + " LT: " + String(target_left_power) + " R: " + String(right_power) + " RT: " + String(target_right_power) + " MEM FREE: "+ String(rp2040.getFreeHeap()));
|
||||
|
||||
*/
|
||||
//if(left_power != target_left_power || right_power != target_right_power)
|
||||
|
||||
|
||||
|
@ -15,4 +15,6 @@ uint8_t stickY;
|
||||
uint8_t btnhi;
|
||||
uint8_t btnlo;
|
||||
uint16_t cksum;
|
||||
uint8_t stickRX; // add right stick, without changieng existing var names or ordering
|
||||
uint8_t stickRY;
|
||||
} packet_t;
|
||||
|
Loading…
x
Reference in New Issue
Block a user