示例#1
0
        public string UltraSonic_Modes_To_String(UltraSonic_Modes x)
        {
            switch (x)
            {
            case (UltraSonic_Modes.DIST_CM):
                return("US-DIST-CM");

            case (UltraSonic_Modes.DIST_IN):
                return("US-DIST-IN");

            case (UltraSonic_Modes.LISTEN):
                return("US-LISTEN");

            case (UltraSonic_Modes.SI_CM):
                return("US-SI-CM");

            case (UltraSonic_Modes.SI_IN):
                return("US-SI-IN");

            case (UltraSonic_Modes.DC_CM):
                return("US-DC-CM");

            case (UltraSonic_Modes.DC_IN):
                return("US-DC-IN");

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
示例#2
0
 public void ChangeMode(UltraSonic_Modes x)
 {
     WriteVar("mode", UltraSonic_Modes_To_String(x));
 }