Skip to content

Commit cb12398

Browse files
committed
Migrate joycon programs to float joystick API.
1 parent 78d03ba commit cb12398

12 files changed

+92
-107
lines changed

SerialPrograms/Source/NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.cpp

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -148,33 +148,18 @@ void pbf_wait(JoyconContext& context, Milliseconds duration){
148148
void pbf_press_button(JoyconContext& context, Button button, Milliseconds hold, Milliseconds release){
149149
ssf_press_button(context, button, hold + release, hold, 0ms);
150150
}
151+
#if 0
151152
void pbf_move_joystick(JoyconContext& context, uint8_t x, uint8_t y, Milliseconds hold, Milliseconds release){
152153
ssf_press_joystick(context, x, y, hold + release, hold, 0ms);
153154
}
155+
#endif
154156
void pbf_move_joystick(JoyconContext& context, const JoystickPosition& position, Milliseconds hold, Milliseconds release){
155157
ssf_press_joystick(context, position, hold + release, hold, 0ms);
156158
}
157159
void pbf_mash_button(JoyconContext& context, Button button, Milliseconds duration){
158160
ssf_mash1_button(context, button, duration);
159161
}
160162

161-
void pbf_controller_state(
162-
JoyconContext& context,
163-
Button button,
164-
uint8_t x, uint8_t y,
165-
Milliseconds duration
166-
){
167-
context->issue_full_controller_state(
168-
&context,
169-
true,
170-
duration,
171-
button,
172-
{
173-
JoystickTools::linear_u8_to_float(x),
174-
-JoystickTools::linear_u8_to_float(y)
175-
}
176-
);
177-
}
178163
void pbf_controller_state(
179164
JoyconContext& context,
180165
Button button,

SerialPrograms/Source/NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ void pbf_controller_state(
128128

129129
void pbf_wait (JoyconContext& context, Milliseconds duration);
130130
void pbf_press_button (JoyconContext& context, Button button, Milliseconds hold, Milliseconds release);
131-
void pbf_move_joystick (JoyconContext& context, uint8_t x, uint8_t y, Milliseconds hold, Milliseconds release);
131+
//void pbf_move_joystick (JoyconContext& context, uint8_t x, uint8_t y, Milliseconds hold, Milliseconds release);
132132
void pbf_move_joystick (JoyconContext& context, const JoystickPosition& position, Milliseconds hold, Milliseconds release);
133133
void pbf_mash_button (JoyconContext& context, Button button, Milliseconds duration);
134134

SerialPrograms/Source/NintendoSwitch/Controllers/NintendoSwitch_ControllerWithScheduler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ void ControllerWithScheduler::issue_right_joystick(
141141
execute_schedule(cancellable, schedule);
142142
if (m_logging_throttler){
143143
m_logger.log(
144-
"issue_right_joystick(): (" + std::to_string(position.x) + "," + std::to_string(position.y) + ")" +
144+
"issue_right_joystick(): (" + tostr_fixed(position.x, 3) + "," + tostr_fixed(position.y, 3) + ")" +
145145
", delay = " + std::to_string(delay.count()) + "ms" +
146146
", hold = " + std::to_string(hold.count()) + "ms" +
147147
", cooldown = " + std::to_string(cooldown.count()) + "ms",

SerialPrograms/Source/NintendoSwitch/DevPrograms/JoyconProgram.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ void JoyconProgram::program(SingleSwitchProgramEnvironment& env, CancellableScop
4444
// No support for gyro yet. That's coming later.
4545
//
4646

47-
pbf_move_joystick(context, 64, 64, 10000ms, 0ms);
47+
pbf_move_joystick(context, {-0.5, +0.5}, 10000ms, 0ms);
4848

4949
#if 0
5050
pbf_press_button(context, BUTTON_A, 200ms, 2000ms);
5151
pbf_press_button(context, BUTTON_HOME, 200ms, 2000ms);
52-
pbf_move_joystick(context, 128, 0, 100ms, 100ms);
53-
pbf_move_joystick(context, 128, 0, 100ms, 100ms);
54-
pbf_move_joystick(context, 255, 128, 100ms, 100ms);
55-
pbf_move_joystick(context, 128, 0, 100ms, 100ms);
52+
pbf_move_joystick(context, {0, +1}, 100ms, 100ms);
53+
pbf_move_joystick(context, {0, +1}, 100ms, 100ms);
54+
pbf_move_joystick(context, {+1, 0}, 100ms, 100ms);
55+
pbf_move_joystick(context, {0, +1}, 100ms, 100ms);
5656
pbf_press_button(context, BUTTON_X, 200ms, 2000ms);
5757
#endif
5858

SerialPrograms/Source/NintendoSwitch/Programs/DateSpam/NintendoSwitch1_HomeToDateTime.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -502,33 +502,33 @@ void home_to_date_time_Switch1_joycon_blind(JoyconContext& context, bool to_date
502502
//From ControllerPerformanceClass::SerialPABotBase_Wireless
503503
//as Joycon will only have that controller type
504504

505-
pbf_move_joystick(context, 255, 128, unit, unit);
506-
pbf_move_joystick(context, 255, 128, unit, unit);
507-
pbf_move_joystick(context, 255, 128, unit, unit);
505+
pbf_move_joystick(context, {+1, 0}, unit, unit);
506+
pbf_move_joystick(context, {+1, 0}, unit, unit);
507+
pbf_move_joystick(context, {+1, 0}, unit, unit);
508508

509509
// Down twice in case we drop one.
510-
pbf_move_joystick(context, 128, 255, unit, unit);
511-
pbf_move_joystick(context, 128, 255, unit, unit);
510+
pbf_move_joystick(context, {0, -1}, unit, unit);
511+
pbf_move_joystick(context, {0, -1}, unit, unit);
512512

513-
pbf_move_joystick(context, 0, 128, unit, unit);
513+
pbf_move_joystick(context, {-1, 0}, unit, unit);
514514

515515
// Press A multiple times to make sure one goes through.
516516
pbf_press_button(context, BUTTON_A, unit, unit);
517517
pbf_press_button(context, BUTTON_A, unit, unit);
518518
pbf_press_button(context, BUTTON_A, unit, unit);
519519

520520
// Scroll to System, move right to top option (update)
521-
pbf_move_joystick(context, 128, 255, 2500ms, unit);
522-
pbf_move_joystick(context, 255, 128, 500ms, unit);
521+
pbf_move_joystick(context, {0, -1}, 2500ms, unit);
522+
pbf_move_joystick(context, {+1, 0}, 500ms, unit);
523523

524524
// To date/time
525-
pbf_move_joystick(context, 128, 255, unit, unit);
526-
pbf_move_joystick(context, 128, 255, unit, unit);
525+
pbf_move_joystick(context, {0, -1}, unit, unit);
526+
pbf_move_joystick(context, {0, -1}, unit, unit);
527527
context.wait_for_all_requests();
528-
pbf_move_joystick(context, 128, 255, 525ms, unit);
529-
//pbf_move_joystick(context, 128, 255, 365ms, 305ms);
530-
pbf_move_joystick(context, 128, 255, unit, unit);
531-
//pbf_move_joystick(context, 128, 255, 2*unit, unit);
528+
pbf_move_joystick(context, {0, -1}, 525ms, unit);
529+
//pbf_move_joystick(context, {0, -1}, 365ms, 305ms);
530+
pbf_move_joystick(context, {0, -1}, unit, unit);
531+
//pbf_move_joystick(context, {0, -1}, 2*unit, unit);
532532
context.wait_for_all_requests();
533533

534534
if (!to_date_change){
@@ -542,10 +542,10 @@ void home_to_date_time_Switch1_joycon_blind(JoyconContext& context, bool to_date
542542
{
543543
auto iterations = Milliseconds(216) / unit + 1;
544544
do{
545-
pbf_move_joystick(context, 128, 255, unit, unit);
545+
pbf_move_joystick(context, {0, -1}, unit, unit);
546546
}while (--iterations);
547547
}
548-
pbf_move_joystick(context, 128, 255, unit, 0ms);
548+
pbf_move_joystick(context, {0, -1}, unit, 0ms);
549549
}
550550

551551

SerialPrograms/Source/NintendoSwitch/Programs/DateSpam/NintendoSwitch2_HomeToDateTime.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,30 +130,30 @@ void home_to_settings_Switch2_joycon_blind(
130130
Milliseconds tv = context->timing_variation();
131131
Milliseconds unit = 24ms + tv;
132132

133-
pbf_move_joystick(context, 255, 128, 2*unit, unit);
134-
pbf_move_joystick(context, 255, 128, 2*unit, unit);
135-
pbf_move_joystick(context, 255, 128, 2*unit, unit);
133+
pbf_move_joystick(context, {+1, 0}, 2*unit, unit);
134+
pbf_move_joystick(context, {+1, 0}, 2*unit, unit);
135+
pbf_move_joystick(context, {+1, 0}, 2*unit, unit);
136136

137137
// Down twice in case we drop one.
138-
pbf_move_joystick(context, 128, 255, 2*unit, unit);
139-
pbf_move_joystick(context, 128, 255, 2*unit, unit);
138+
pbf_move_joystick(context, {0, -1}, 2*unit, unit);
139+
pbf_move_joystick(context, {0, -1}, 2*unit, unit);
140140

141-
pbf_move_joystick(context, 0, 128, 2*unit, unit);
141+
pbf_move_joystick(context, {-1, 0}, 2*unit, unit);
142142

143143
// Press A multiple times to make sure one goes through.
144144
pbf_press_button(context, BUTTON_A, 2*unit, unit);
145145
pbf_press_button(context, BUTTON_A, 2*unit, unit);
146146
pbf_press_button(context, BUTTON_A, 2*unit, unit);
147147

148-
pbf_move_joystick(context, 128, 255, 2000ms, 0ms);
148+
pbf_move_joystick(context, {0, -1}, 2000ms, 0ms);
149149

150150
// Scroll left and press A to exit the sleep menu if we happened to
151151
// land there.
152-
pbf_move_joystick(context, 0, 128, 2*unit, unit);
152+
pbf_move_joystick(context, {-1, 0}, 2*unit, unit);
153153
pbf_press_button(context, BUTTON_A, 2*unit, unit);
154154

155155
for (size_t c = 0; c < 2; c++){
156-
pbf_move_joystick(context, 255, 128, 2*unit, unit);
156+
pbf_move_joystick(context, {+1, 0}, 2*unit, unit);
157157
}
158158
}
159159

SerialPrograms/Source/NintendoSwitch/Programs/NintendoSwitch_GameEntry.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ void close_game_from_home_blind(ConsoleHandle& console, JoyconContext& context){
137137

138138
// if game initially open. | if game initially closed
139139
pbf_mash_button(context, BUTTON_X, 800ms); // - Close game. | - does nothing
140-
pbf_move_joystick(context, 128, 255, 100ms, 10ms); // - Does nothing. | - moves selector away from the closed game to avoid opening it.
141-
pbf_move_joystick(context, 128, 255, 100ms, 10ms); // - Does nothing. | - Press Down a second time in case we drop one.
140+
pbf_move_joystick(context, {0, -1}, 100ms, 10ms); // - Does nothing. | - moves selector away from the closed game to avoid opening it.
141+
pbf_move_joystick(context, {0, -1}, 100ms, 10ms); // - Does nothing. | - Press Down a second time in case we drop one.
142142
pbf_mash_button(context, BUTTON_A, 400ms); // - Confirm close game. | - opens an app on the home screen (e.g. Online)
143143
go_home(console, context); // - Does nothing. | - goes back to home screen.
144144

@@ -303,7 +303,7 @@ void resume_game_from_home(
303303
if (ret == 0){
304304
console.log("Detected update window.", COLOR_RED);
305305

306-
pbf_move_joystick(context, 128, 0, 10ms, 0ms);
306+
pbf_move_joystick(context, {0, +1}, 10ms, 0ms);
307307
pbf_press_button(context, BUTTON_A, 10ms, 500ms);
308308
context.wait_for_all_requests();
309309
continue;
@@ -343,10 +343,10 @@ void move_to_user(JoyconContext& context, uint8_t user_slot){
343343
if (user_slot != 0){
344344
// Move to correct user.
345345
for (uint8_t c = 0; c < 9; c++){ // Extra iteration in case one gets dropped.
346-
pbf_move_joystick(context, 0, 128, 160ms, 160ms);
346+
pbf_move_joystick(context, {-1, 0}, 160ms, 160ms);
347347
}
348348
for (uint8_t c = 1; c < user_slot; c++){
349-
pbf_move_joystick(context, 0, 128, 160ms, 160ms);
349+
pbf_move_joystick(context, {+1, 0}, 160ms, 160ms);
350350
}
351351
}
352352
}
@@ -546,7 +546,7 @@ void start_game_from_home_with_inference(
546546
if (game_slot != 0){
547547
ssf_press_button(context, BUTTON_HOME, ConsoleSettings::instance().SETTINGS_TO_HOME_DELAY0, 160ms);
548548
for (uint8_t c = 1; c < game_slot; c++){
549-
pbf_move_joystick(context, 255, 128, 160ms, 0ms);
549+
pbf_move_joystick(context, {+1, 0}, 160ms, 0ms);
550550
}
551551
context.wait_for_all_requests();
552552
}
@@ -587,7 +587,7 @@ void start_game_from_home_with_inference(
587587
break;
588588
case 2:
589589
console.log("Detected update menu.", COLOR_RED);
590-
pbf_move_joystick(context, 128, 0, 50ms, 0ms);
590+
pbf_move_joystick(context, {0, +1}, 50ms, 0ms);
591591
pbf_press_button(context, BUTTON_A, 160ms, 840ms);
592592
break;
593593
case 3:

SerialPrograms/Source/PokemonLGPE/Commands/PokemonLGPE_DateSpam.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ void roll_date_forward_1(JoyconContext& context){
1616
Milliseconds unit = 24ms + tv;
1717

1818
pbf_press_button(context, BUTTON_A, 2*unit, unit);
19-
pbf_move_joystick(context, 128, 0, 2*unit, unit);
19+
pbf_move_joystick(context, {0, +1}, 2*unit, unit);
2020
pbf_press_button(context, BUTTON_A, 2*unit, unit);
2121

22-
pbf_move_joystick(context, 255, 128, 2*unit, unit);
23-
pbf_move_joystick(context, 128, 0, 2*unit, unit);
24-
pbf_move_joystick(context, 255, 128, 2*unit, unit);
22+
pbf_move_joystick(context, {+1, 0}, 2*unit, unit);
23+
pbf_move_joystick(context, {0, +1}, 2*unit, unit);
24+
pbf_move_joystick(context, {+1, 0}, 2*unit, unit);
2525
pbf_press_button(context, BUTTON_A, 2*unit, unit);
26-
pbf_move_joystick(context, 255, 128, 2*unit, unit);
27-
pbf_move_joystick(context, 255, 128, 2*unit, unit);
26+
pbf_move_joystick(context, {+1, 0}, 2*unit, unit);
27+
pbf_move_joystick(context, {+1, 0}, 2*unit, unit);
2828
pbf_press_button(context, BUTTON_A, 2*unit, unit);
2929
}
3030

@@ -39,19 +39,19 @@ void roll_date_backward_N(JoyconContext& context, uint8_t skips){
3939
pbf_press_button(context, BUTTON_A, 2*unit, unit);
4040

4141
for (uint8_t c = 0; c < skips - 1; c++){
42-
pbf_move_joystick(context, 128, 255, 2*unit, unit);
42+
pbf_move_joystick(context, {0, -1}, 2*unit, unit);
4343
}
4444

4545
pbf_press_button(context, BUTTON_A, 2*unit, unit);
46-
pbf_move_joystick(context, 255, 128, 2*unit, unit);
46+
pbf_move_joystick(context, {+1, 0}, 2*unit, unit);
4747

4848
for (uint8_t c = 0; c < skips - 1; c++){
49-
pbf_move_joystick(context, 128, 255, 2*unit, unit);
49+
pbf_move_joystick(context, {0, -1}, 2*unit, unit);
5050
}
5151

5252
pbf_press_button(context, BUTTON_A, 2*unit, unit);
53-
pbf_move_joystick(context, 255, 128, 2*unit, unit);
54-
pbf_move_joystick(context, 255, 128, 2*unit, unit);
53+
pbf_move_joystick(context, {+1, 0}, 2*unit, unit);
54+
pbf_move_joystick(context, {+1, 0}, 2*unit, unit);
5555
pbf_press_button(context, BUTTON_A, 2*unit, unit);
5656
pbf_press_button(context, BUTTON_A, 2*unit, unit);
5757
}

SerialPrograms/Source/PokemonLGPE/Programs/Farming/PokemonLGPE_DailyItemFarmer.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ void DailyItemFarmer::start_local_trade(SingleSwitchProgramEnvironment& env, Joy
9696
env.log("Starting local trade.");
9797
//Open Menu -> Communication -> Nearby player -> Local Trade
9898
pbf_press_button(context, BUTTON_X, 200ms, 800ms);
99-
pbf_move_joystick(context, 255, 128, 100ms, 400ms);
99+
pbf_move_joystick(context, {+1, 0}, 100ms, 400ms);
100100
pbf_press_button(context, BUTTON_A, 200ms, 1000ms);
101101
pbf_press_button(context, BUTTON_A, 200ms, 2000ms); // Black screen
102102
pbf_press_button(context, BUTTON_A, 200ms, 1000ms);
@@ -107,39 +107,39 @@ void DailyItemFarmer::start_local_trade(SingleSwitchProgramEnvironment& env, Joy
107107
case LinkCode::Pikachu:
108108
break;
109109
case LinkCode::Eevee:
110-
pbf_move_joystick(context, 255, 128, 100ms, 100ms);
110+
pbf_move_joystick(context, {+1, 0}, 100ms, 100ms);
111111
break;
112112
case LinkCode::Bulbasaur:
113-
pbf_move_joystick(context, 255, 128, 100ms, 100ms);
114-
pbf_move_joystick(context, 255, 128, 100ms, 100ms);
113+
pbf_move_joystick(context, {+1, 0}, 100ms, 100ms);
114+
pbf_move_joystick(context, {+1, 0}, 100ms, 100ms);
115115
break;
116116
case LinkCode::Charmander:
117-
pbf_move_joystick(context, 0, 128, 100ms, 100ms);
118-
pbf_move_joystick(context, 0, 128, 100ms, 100ms);
117+
pbf_move_joystick(context, {-1, 0}, 100ms, 100ms);
118+
pbf_move_joystick(context, {-1, 0}, 100ms, 100ms);
119119
break;
120120
case LinkCode::Squirtle:
121-
pbf_move_joystick(context, 0, 128, 100ms, 100ms);
121+
pbf_move_joystick(context, {-1, 0}, 100ms, 100ms);
122122
break;
123123
case LinkCode::Pidgey:
124-
pbf_move_joystick(context, 128, 255, 100ms, 100ms);
124+
pbf_move_joystick(context, {0, -1}, 100ms, 100ms);
125125
break;
126126
case LinkCode::Caterpie:
127-
pbf_move_joystick(context, 128, 255, 100ms, 100ms);
128-
pbf_move_joystick(context, 255, 128, 100ms, 100ms);
127+
pbf_move_joystick(context, {0, -1}, 100ms, 100ms);
128+
pbf_move_joystick(context, {+1, 0}, 100ms, 100ms);
129129
break;
130130
case LinkCode::Rattata:
131-
pbf_move_joystick(context, 128, 255, 100ms, 100ms);
132-
pbf_move_joystick(context, 0, 128, 100ms, 100ms);
133-
pbf_move_joystick(context, 0, 128, 100ms, 100ms);
131+
pbf_move_joystick(context, {0, -1}, 100ms, 100ms);
132+
pbf_move_joystick(context, {-1, 0}, 100ms, 100ms);
133+
pbf_move_joystick(context, {-1, 0}, 100ms, 100ms);
134134
break;
135135
case LinkCode::Jigglypuff:
136-
pbf_move_joystick(context, 128, 255, 100ms, 100ms);
137-
pbf_move_joystick(context, 0, 128, 100ms, 100ms);
138-
pbf_move_joystick(context, 0, 128, 100ms, 100ms);
136+
pbf_move_joystick(context, {0, -1}, 100ms, 100ms);
137+
pbf_move_joystick(context, {-1, 0}, 100ms, 100ms);
138+
pbf_move_joystick(context, {-1, 0}, 100ms, 100ms);
139139
break;
140140
case LinkCode::Diglett:
141-
pbf_move_joystick(context, 128, 255, 100ms, 100ms);
142-
pbf_move_joystick(context, 0, 128, 100ms, 100ms);
141+
pbf_move_joystick(context, {0, -1}, 100ms, 100ms);
142+
pbf_move_joystick(context, {-1, 0}, 100ms, 100ms);
143143
break;
144144
default:
145145
env.log("Invalid link code selection. Defaulting to Pikachu.");

SerialPrograms/Source/PokemonLGPE/Programs/ShinyHunting/PokemonLGPE_AlolanTrade.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,13 @@ void AlolanTrade::program(SingleSwitchProgramEnvironment& env, CancellableScope&
215215

216216
//Press left to go to last (most recent) Pokemon
217217
env.log("Opening summary of most recent Pokemon.");
218-
pbf_move_joystick(context, 0, 128, 100ms, 100ms);
218+
pbf_move_joystick(context, {-1, 0}, 100ms, 100ms);
219219
context.wait_for_all_requests();
220220

221221
//View summary - it takes a moment to load
222222
pbf_press_button(context, BUTTON_A, 200ms, 1000ms);
223-
pbf_move_joystick(context, 128, 255, 100ms, 100ms);
224-
pbf_move_joystick(context, 128, 255, 100ms, 100ms);
223+
pbf_move_joystick(context, {0, -1}, 100ms, 100ms);
224+
pbf_move_joystick(context, {0, -1}, 100ms, 100ms);
225225
pbf_press_button(context, BUTTON_A, 200ms, 100ms);
226226
context.wait_for_all_requests();
227227

@@ -246,18 +246,18 @@ void AlolanTrade::program(SingleSwitchProgramEnvironment& env, CancellableScope&
246246
env.log("Favoriting shiny.");
247247
pbf_press_button(context, BUTTON_B, 200ms, 5000ms);
248248
pbf_press_button(context, BUTTON_A, 200ms, 1000ms);
249-
pbf_move_joystick(context, 128, 0, 100ms, 100ms);
250-
pbf_move_joystick(context, 128, 0, 100ms, 100ms);
251-
pbf_move_joystick(context, 128, 0, 100ms, 200ms);
249+
pbf_move_joystick(context, {0, +1}, 100ms, 100ms);
250+
pbf_move_joystick(context, {0, +1}, 100ms, 100ms);
251+
pbf_move_joystick(context, {0, +1}, 100ms, 200ms);
252252
pbf_press_button(context, BUTTON_A, 200ms, 800ms);
253253
pbf_press_button(context, BUTTON_A, 200ms, 800ms);
254254
pbf_press_button(context, BUTTON_B, 200ms, 800ms);
255255

256256
//Go into summary again
257257
env.log("Navigating back into summary.");
258258
pbf_press_button(context, BUTTON_A, 200ms, 1000ms);
259-
pbf_move_joystick(context, 128, 255, 100ms, 100ms);
260-
pbf_move_joystick(context, 128, 255, 100ms, 100ms);
259+
pbf_move_joystick(context, {0, -1}, 100ms, 100ms);
260+
pbf_move_joystick(context, {0, -1}, 100ms, 100ms);
261261
pbf_press_button(context, BUTTON_A, 200ms, 100ms);
262262
context.wait_for_all_requests();
263263
pbf_wait(context, 5000ms);
@@ -268,7 +268,7 @@ void AlolanTrade::program(SingleSwitchProgramEnvironment& env, CancellableScope&
268268
}
269269

270270
//Move left, check next.
271-
pbf_move_joystick(context, 0, 128, 100ms, 100ms);
271+
pbf_move_joystick(context, {-1, 0}, 100ms, 100ms);
272272
pbf_press_button(context, BUTTON_X, 0ms, 1000ms);
273273
context.wait_for_all_requests();
274274
}

0 commit comments

Comments
 (0)