- int raw = IOHIDValueGetIntegerValue(value);
- float parsed = [self getRealValue:raw];
-
- if (parsed < -DEAD_ZONE)
- return self.subActions[0];
- else if (parsed > DEAD_ZONE)
- return self.subActions[1];
+ float mag = normalize(IOHIDValueGetIntegerValue(value), rawMin, rawMax);
+ if (mag < -DEAD_ZONE)
+ return self.children[0];
+ else if (mag > DEAD_ZONE)
+ return self.children[1];