need help with simple case statement
laser-vector
Posts: 118
hi all
im trying to sample from an analog joystick, in this case im setting up a deadzone with a case statement
RCValue is the variable from the joystick axis (between 0 - 4880)
the first part of the case statement works perfectly, however the parts where RCValue is compared to be either grater than or less than is not working.
how is this done?
im trying to sample from an analog joystick, in this case im setting up a deadzone with a case statement
RCValue is the variable from the joystick axis (between 0 - 4880)
CON deadzone = 100 joy1y = 4880 CASE RCValue ((joy1y/2)-deadzone)..((joy1y/2)+deadzone) : outa[2]~~ RCValue > ((joy1y/2)+deadzone) : outa[2]~ RCValue < ((joy1y/2)-deadzone) : outa[2]~
the first part of the case statement works perfectly, however the parts where RCValue is compared to be either grater than or less than is not working.
how is this done?
Comments
You need to remove "RCValue" from the last 2 lines for them to be correct.
but I would do it with if..else:
Andy