Control the slide proportionally with gamepad1.left_stick_y. Block positive power at the upper limit, block negative power at the lower limit, and command zero for every neutral or unsafe request.
Slide motor mapped in init()
Upper and lower limits mapped and set to INPUT
Direction, BRAKE, and proportional joystick power configured
Positive power blocked at upper limit
Negative power blocked at lower limit
Telemetry shows both limits and applied power
Challenge Complete! Both slide directions are protected.