Subversion Repositories group.electronics

Rev

Rev 177 | Rev 180 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 177 Rev 178
Line 49... Line 49...
49
        public override string ToString() {
49
        public override string ToString() {
50
            return cmd + " " + base.value + "\n";
50
            return cmd + " " + base.value + "\n";
51
        }
51
        }
52
    }
52
    }
53
 
53
 
-
 
54
    public class CommandVJSAxis : Command {
-
 
55
        HID_USAGES axis;
-
 
56
        uint id = 0;
-
 
57
 
-
 
58
 
-
 
59
        public CommandVJSAxis(uint id, HID_USAGES axis) {
-
 
60
            this.axis = axis;
-
 
61
            this.id = id;
-
 
62
        }
-
 
63
 
-
 
64
        public override int Send() {
-
 
65
            int newval = (int)this.value;
-
 
66
            bool result = Globals.vjoy.SetAxis(newval, this.id, this.axis);
-
 
67
            if (result)
-
 
68
                return 0;
-
 
69
            return 1;
-
 
70
        }
-
 
71
 
-
 
72
        public override int Send(UInt64 value) {
-
 
73
            this.value = value;
-
 
74
            return this.Send();
-
 
75
        }
-
 
76
    }
-
 
77
 
54
    public class CommandVKey : Command {
78
    public class CommandVKey : Command {
55
        OSInput osi;
79
        OSInput osi;
56
        OSInput.VirtualKeyCodes key;
80
        OSInput.VirtualKeyCodes key;
57
 
81
 
58
        public CommandVKey(OSInput.VirtualKeyCodes vkey) : base() {
82
        public CommandVKey(OSInput.VirtualKeyCodes vkey) : base() {