Skip to content

Instantly share code, notes, and snippets.

@lemon32767
Created August 13, 2019 16:40
Show Gist options
  • Save lemon32767/26a1af185b9a583972fac189403492ae to your computer and use it in GitHub Desktop.
Save lemon32767/26a1af185b9a583972fac189403492ae to your computer and use it in GitHub Desktop.
#!/bin/env bash
if [[ -f ~/unjscal ]]; then
echo "dont calibrate"
rm ~/unjscal
exit
fi
#---joydev cal---
jscal -s 8,1,0,135,135,11184469,20648251,1,0,116,116,13094012,14509581,1,0,126,126,5711218,5899500,1,0,28,28,107370905,2618802,1,0,30,30,178951509,2606089,1,0,127,127,5835375,5592234,1,0,0,0,536854528,536854528,1,0,0,0,536854528,536854528 /dev/input/js0
#---evdev cal---
device=/dev/input/by-id/usb-mayflash_limited_MAYFLASH_GameCube_Controller_Adapter-event-joystick
#joystick
evdev-joystick -e $device --a 1 -m 20 -M 225
evdev-joystick -e $device --a 0 -m 20 -M 225
#cstick
evdev-joystick -e $device --a 2 -m 30 -M 205
evdev-joystick -e $device --a 5 -m 40 -M 225
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment