Added checks for packet length back in for safety sake
Changed casting type on analog axis for portability
Missed one...