-@implementation JSActionAnalog
-
-- (id) initWithIndex: (int)newIndex {
- if(self = [super init]) {
- subActions = @[[[SubAction alloc] initWithIndex: 0 name: @"Low" base: self],
- [[SubAction alloc] initWithIndex: 1 name: @"High" base: self],
- [[SubAction alloc] initWithIndex: 2 name: @"Analog" base: self]];
- index = newIndex;
- name = [[NSString alloc] initWithFormat: @"Axis %d", (index+1)];
- }
- return self;
+// TODO: Dead zone should be configurable per-device.
+#define DEAD_ZONE 0.3
+
+#import "JSActionAnalog.h"
+
+@implementation JSActionAnalog {
+ float magnitude;