Exemplo n.º 1
0
        /// <summary>
        /// Dumps the state of the relays.
        /// </summary>
        /// <param name="relayBoard">The relay board.</param>
        private static void DumpRelaysState(RelayController relayBoard)
        {
            var states = relayBoard.GetRelaysStateDictionary();

            "STATUS DUMP".Info();
            "RELAY:     \t8\t7\t6\t5\t4\t3\t2\t1".Info();
            ($"STATE:     \t" +
             $"{(states[RelayNumber.Relay08] ? 1 : 0)}\t" +
             $"{(states[RelayNumber.Relay07] ? 1 : 0)}\t" +
             $"{(states[RelayNumber.Relay06] ? 1 : 0)}\t" +
             $"{(states[RelayNumber.Relay05] ? 1 : 0)}\t" +
             $"{(states[RelayNumber.Relay04] ? 1 : 0)}\t" +
             $"{(states[RelayNumber.Relay03] ? 1 : 0)}\t" +
             $"{(states[RelayNumber.Relay02] ? 1 : 0)}\t" +
             $"{(states[RelayNumber.Relay01] ? 1 : 0)}\t").Info();
        }