Subversion Repositories group.electronics

Rev

Rev 180 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 180 Rev 181
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 CommandDCSMap : Command {
-
 
55
        public String cmd { get; set; }
-
 
56
        public Dictionary<UInt64, String> map { get; set; }
-
 
57
 
-
 
58
        //public CommandDCSMap(Dictionary<UInt64, String> map) : base() {
-
 
59
        //    this.cmd = "";
-
 
60
        //}
-
 
61
 
-
 
62
        public CommandDCSMap(String cmd, Dictionary<UInt64, String> map) : base() {
-
 
63
            this.cmd = cmd;
-
 
64
            this.map = map;
-
 
65
        }
-
 
66
 
-
 
67
        public override int Send() {
-
 
68
            String send;
-
 
69
            if (this.map.TryGetValue(this.value, out send))
-
 
70
                Globals.bios.SendData(this.ToString());
-
 
71
 
-
 
72
            return 0;
-
 
73
        }
-
 
74
 
-
 
75
        public override int Send(UInt64 value) {
-
 
76
 
-
 
77
            this.value = value;
-
 
78
            return this.Send();
-
 
79
 
-
 
80
        }
-
 
81
 
-
 
82
        public override string ToString() {
-
 
83
            String send;
-
 
84
            if (this.map.TryGetValue(this.value, out send))
-
 
85
                return cmd + " " + send + "\n";
-
 
86
 
-
 
87
            return cmd + ":" + this.value + " <null>";
-
 
88
        }
-
 
89
    }
-
 
90
 
54
    public class CommandVJSAxis : Command {
91
    public class CommandVJSAxis : Command {
55
        HID_USAGES axis;
92
        HID_USAGES axis;
56
        uint id = 0;
93
        uint id = 0;
57
 
94
 
58
 
95