Example #1
0
        public void Turn(bool value, SSHUtil ssh)
        {
            if (ColorName == null)
            {
                throw new Exception("Color name not set");
            }
            string path = string.Format(_fs_control_path_fmt, ColorName);

            string cmd;

            if (value)
            {
                cmd = "echo 1 > " + path;
            }
            else
            {
                cmd = "echo 0 > " + path;
            }

            ssh.WriteLine(cmd);
        }
Example #2
0
        //# show battery

        //Battery Information:
        //Voltage:         1.10
        //Maximum Voltage: 1.10
        //Level:           -1.00
        static void verifyAlive()
        {
            _ssh.WriteLine("show battery");
            _ssh.WaitFor("Battery Information is not available", 10);
        }