Exemplo n.º 1
0
    static void Main(string[] args)
    {
        Init();

        /* reuse same record object to save a bit on GC */
        Record record = new Record();

        while (true)
        {
            try
            {
                FetchAndLogRecord(record);
                Battery.CheckLevel((float)record[DataPoint.M4ATXVoltageIn]);
            }
            catch (Exception e)
            {
                Log.Exception(e);
            }
            Thread.Sleep(Log.ReportRate);
        }
    }