public static void Main()
        {
            //THIS SECTION CREATES / INITIALIZES THE SERIAL LOGGER
            Debug.Print("Flight computer started successfully. Beginning INIT.");

            Debug.Print("Initializing Serial logger on COM1 with baudrate of 57600bps.  Max log buffer = 4096b");
            var logger = new Logger(SerialPorts.COM1, 57600);

            //Initializes the RICH on pin D6
            var rich = new RICH();

            //THIS SECTION CREATES/INITIALIZES THE SERIAL BNO 100HZ UPDATER
            Debug.Print("Initializing BNO Sensor on Serial Port COM4, 1 stop bit, 0 parity, 8 data bits");
            var bnoloop = new SerialBNOUpdater(sigFigs: 4);

            //THIS SECTION CREATES/INITIALIZES THE GEIGER COUNTER UPDATER
            Debug.Print("Initializing geiger counter collection data");
            var geigerloop = new GeigerUpdater(1000);

            //THIS SECTION CREATES/INITIALIZES THE GEIGER COUNTER UPDATER
            Debug.Print("Initializing fast accel dump collector with a size of 12kb");
            var acceldumploop = new AccelUpdater(12000);

            Debug.Print("INIT Complete. Continuing with boot.");

            //THIS SECTION INITIALIZES AND STARTS THE MEMORY MONITOR
            Debug.Print("Starting memory monitor...");
            MemoryMonitor.Instance.Start(ref logger);


            //THIS STARTS THE LOGGER
            Debug.Print("Starting logger...");
            logger.Start();

            //THIS STARTS THE Accel dump update
            Debug.Print("Starting accel dumper...");
            acceldumploop.Start();

            //THIS STARTS THE BNO SENSOR UPDATE
            Debug.Print("Starting bno sensor updates...");
            bnoloop.Start();

            //THIS STARTS THE Geiger UPDATE.
            Debug.Print("Starting geiger counter data collection...");
            geigerloop.Start();

            //Starts the RICH detector
            rich.TurnOn();

            Debug.Print("Flight computer boot successful.");
        }
Exemple #2
0
        public static void Main()
        {
            //THIS SECTION CREATES / INITIALIZES THE SERIAL LOGGER
            Debug.Print("Flight computer started successfully. Beginning INIT.");

            var logger = new Logger();

            Debug.Print("Starting logger...");
            logger.Start();


            Rebug.Print("Starting stopwatch");
            Clock.Instance.Start();

            Rebug.Print("Recording time-sync packet");
            var timeSync = new TimeSync(delay: 10000);

            timeSync.Run();

            //Initializes the RICH on pin D7
            Rebug.Print("Initializing RICH detector");
            var rich = new Rich();

            //THIS SECTION CREATES/INITIALIZES THE SERIAL BNO 100HZ UPDATER
            Rebug.Print("Initializing BNO Sensor ");
            var bnoloop = new SerialBnoUpdater(delay: 1000);

            //THIS SECTION CREATES/INITIALIZES THE GEIGER COUNTER UPDATER
            Rebug.Print("Initializing geiger counter collection data");
            var geigerloop = new GeigerUpdater(delay: 10, size: 2048);

            //THIS SECTION CREATES/INITIALIZES THE GEIGER COUNTER UPDATER
            var accel_dump_size = 18432;

            Rebug.Print("Initializing fast accel dump collector with a size of " + accel_dump_size + "bytes.");
            var acceldumploop = new AccelUpdater(accel_dump_size);

            //Thread.Sleep(5000);
            Rebug.Print("Flight computer INIT Complete. Continuing with boot.");

            //THIS SECTION INITIALIZES AND STARTS THE MEMORY MONITOR
            Rebug.Print("Starting memory monitor...");
            MemoryMonitor.Instance.Start(ref logger);

            //THIS STARTS THE Accel dump update
            Rebug.Print("Starting accel dumper...");
            acceldumploop.Start();

            //THIS STARTS THE BNO SENSOR UPDATE
            Rebug.Print("Starting bno sensor updates...");
            bnoloop.Start();

            //THIS STARTS THE Geiger UPDATE.
            Rebug.Print("Starting geiger counter data collection...");
            geigerloop.Start();

            //Starts the RICH detector
            Rebug.Print("Starting RICH detector");
            rich.TurnOn();

            Rebug.Print("Flight computer boot successful.");
        }