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 96... Line 96...
96
            this.addControl(new Switch2Pos(new CommandDCS("NMSP_ANCHR_BTN"), 20));
96
            this.addControl(new Switch2Pos(new CommandDCS("NMSP_ANCHR_BTN"), 20));
97
            this.addControl(new Switch2Pos(new CommandDCS("NMSP_STEERPT_BTN"), 21));
97
            this.addControl(new Switch2Pos(new CommandDCS("NMSP_STEERPT_BTN"), 21));
98
            this.addControl(new Switch2Pos(new CommandDCS("NMSP_ABLE_STOW"), 22, true));
98
            this.addControl(new Switch2Pos(new CommandDCS("NMSP_ABLE_STOW"), 22, true));
99
 
99
 
100
 
100
 
101
            // Joystick Press - Mapped to mouse button 1
101
            // Joystick 
-
 
102
            this.addControl(new Potentiometer(new CommandVJSAxis(0, HID_USAGES.HID_USAGE_X), 0));     // X 0x00 - 0x8000
-
 
103
            this.addControl(new Potentiometer(new CommandVJSAxis(0, HID_USAGES.HID_USAGE_Y), 0));     // Y 0x00 - 0x8000
102
            this.addControl(new Switch2Pos(new CommandMouseButton(CommandMouseButton.MB_LEFT), 32));
104
            this.addControl(new Switch2Pos(new CommandMouseButton(CommandMouseButton.MB_LEFT), 32));
103
 
105
 
104
            // Enable the mcp23017
106
            // Enable the mcp23017
105
            mcp.WriteGpio(3, 0);
107
            mcp.WriteGpio(3, 0);
106
            Utils.delayms(50);
108
            Utils.delayms(50);
Line 123... Line 125...
123
            this.addLed(new Led(0, 0, 0x1110, 0x8000, 15));    // NMSP_STEERPT_LED
125
            this.addLed(new Led(0, 0, 0x1110, 0x8000, 15));    // NMSP_STEERPT_LED
124
            this.addLed(new Led(0, 2, 0x1112, 0x0008, 3));     // NMSP_TCN_LED
126
            this.addLed(new Led(0, 2, 0x1112, 0x0008, 3));     // NMSP_TCN_LED
125
            this.addLed(new Led(0, 7, 0x11bc, 0x0002, 1));     // NMSP_UHF_LED
127
            this.addLed(new Led(0, 7, 0x11bc, 0x0002, 1));     // NMSP_UHF_LED
126
 
128
 
127
            //this.addLed(new Led(0, 6, 0x1012, 0x0800, 11));     // MASTER_CAUTION
129
            //this.addLed(new Led(0, 6, 0x1012, 0x0800, 11));     // MASTER_CAUTION
128
 
-
 
-
 
130
            data.axis[0].mapsize = 0x8000;
-
 
131
            data.axis[1].mapsize = 0x8000;
129
            this.Refresh();
132
            this.Refresh();
130
            data.prev = data.buttons;
133
            data.prev = data.buttons;
131
            data.axis[0].prev = data.axis[0].value;
134
            data.axis[0].prev = data.axis[0].value;
132
            data.axis[1].prev = data.axis[1].value;
135
            data.axis[1].prev = data.axis[1].value;
133
            data.changed = false;
136
            data.changed = false;