Example #1
0
        public static void Main(string[] args)
        {
            // Initialize the controller
            SBC.SteelBattalionController controller = new SBC.SteelBattalionController();
            controller.Init(50);

            // Uncomment if you want to monitor the raw data coming out of the controller
            //controller.RawData += new SBC.SteelBattalionController.RawDataDelegate(controller_RawData);
            //set all buttons by default to light up only when you press them down
            // Add the event handler to monitor button state changed events
            controller.ButtonStateChanged += new SBC.SteelBattalionController.ButtonStateChangedDelegate(controller_ButtonStateChanged);

            // Run in an infinite loop
            while (1 == 1)
            {
                System.Threading.Thread.Sleep(20);



                Console.WriteLine(controller.TunerDial.ToString() + " " +
                                  controller.RotationLever.ToString() + " " + controller.SightChangeX.ToString() + " " + controller.SightChangeY.ToString() + " " +
                                  controller.AimingX.ToString() + " " + controller.AimingY.ToString() + " " +
                                  controller.LeftPedal.ToString() + " " + controller.MiddlePedal.ToString() + " " + controller.RightPedal.ToString());
                //Console.WriteLine(controller.GetBinaryBuffer(19, 20));

                //Console.WriteLine(((int)unchecked((sbyte)controller.rawControlData[9])).ToString());
            }
        }
Example #2
0
        public void handler(SBC.SteelBattalionController Contr)
        {
            // Add the event handler to monitor button state changed events
            Controller.ButtonStateChanged += new SBC.SteelBattalionController.ButtonStateChangedDelegate(controller_ButtonStateChanged);

            // Run in an infinite loop
            while (1 == 1)
            {
                System.Threading.Thread.Sleep(10);
            }
        }
Example #3
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Initiating Metal Gear Startup Sequence:\n Please login to continue: \n" +
                              "...\n...\n...\n FoxHound ID: The Asterite \n Login Complete!\n Incoming Connection from MidiJane... \n");
            Midi.MidiJane Jane = new Midi.MidiJane();
            SBC.SteelBattalionController Controller = new SBC.SteelBattalionController();
            ModularMetalGear             Overlay    = new ModularMetalGear(Controller, Jane);

            // TODO: Implement Functionality Here

            Console.Write("Press any key to continue . . . ");
            Console.ReadKey(true);
        }
        public static void Main(string[] args)
        {
            // Initialize the controller
            SBC.SteelBattalionController controller = new SBC.SteelBattalionController();
            controller.Init(50);

            // Uncomment if you want to monitor the raw data coming out of the controller
            //controller.RawData += new SBC.SteelBattalionController.RawDataDelegate(controller_RawData);

            // Add the event handler to monitor button state changed events
            controller.ButtonStateChanged += new SBC.SteelBattalionController.ButtonStateChangedDelegate(controller_ButtonStateChanged);

            // Run in an infinite loop
            while (1 == 1)
            {
                System.Threading.Thread.Sleep(10);
            }
        }
Example #5
0
        static void controller_ButtonStateChanged(SBC.SteelBattalionController controller, SBC.ButtonState[] stateChangedArray)
        {
            // Typically, you want to check which buttons were triggered.  This array contains
            // a list of all buttons, their current values, and whether their state has changed.
            if (stateChangedArray[(int)SBC.ButtonEnum.FunctionLineColorChange].changed)
            {
                // Do specific things when the "Line Color Change" button has a state change
            }

            // Use a for loop to examine each one of the states returned in the state change array
            foreach (SBC.ButtonState state in stateChangedArray)
            {
                if (state.changed)
                {
                    // Write out the state of the button if it was changed
                    //Console.WriteLine("Button: {0,32}  State: {1}", state.button.ToString(), state.currentState.ToString());
                }
            }
        }
Example #6
0
 public ModularMetalGear(SBC.SteelBattalionController Contr, Midi.MidiJane Jane)
 {
     CUEA       = false;
     EQ2ACTIVE  = false;
     CATCHING   = false;
     COMMSTATES = new bool[5] {
         false, false, false, false, false
     };
     EQONE = new bool[3] {
         false, false, false
     };
     EQTWO = new bool[3] {
         false, false, false
     };
     LOCKEDON       = false;
     LAUNCH         = false;
     gear           = Contr.GearLever;
     lastgearpolled = gear;
     LEFTMUTE       = false;
     RIGHTMUTE      = false;
     EQ1ACTIVE      = false;
     CUEB           = false;
     EQB            = false;
     EQZERO1        = false;
     EQZERO2        = false;
     TEMPODECREASE  = false;
     TEMPOINCREASE  = false;
     BLUEDUALCHOP   = false;
     BLUEEQ         = false;
     BLOCKTRIPS     = false;
     CHOPMODE       = false;
     Controller     = Contr;
     JANEBRIDGE     = Jane;
     Controller.Init(50);
     handler(Controller);
 }