[CANSpark Max] IDs: 9, 10, recieved parameter invalid error parameter id 113

I need some help, I don’t know what this error means:
‘’‘[CANSpark Max] IDs: 9, 10, recieved parameter invalid error parameter id 113’‘’

Hi Ryan,

ID 113 is the velocity conversion factor rate - so my best guess is you’re feeding in 0 to that function call. This could be happening if you have a line like sparkMax.setVelocityConversionFactor(1/60) - where in Java this will evaluate to 0 because it will treat 1/60 as integer division - try changing this to 1.0/60.0

If this isn’t the issue, posting your code would be helpful so we can be of more use.

here’s my code, I checked that it was doing double division but it still shows the error.

@akiyengar is mostly correct. It’s not an integer division issue, it’s a divide by zero issue. Check your constants. You currently have gearRatio defined as 0

arm.Shoulder.GearRatio is set to 0 currently, so you’re dividing by zero when setting the velocity conversion factor

1 Like

Oh, I’m dumb. also do you know what is parameter id 112. Also where do you find the information about the parameter id stuff.

The link provided here has all those answers

Ok, sorry I didn’t see that link. Thanks!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.