コード例 #1
0
        public RGB AM1_Convert_Voltgae_to_Dec(Gamma_Set Set, int band, RGB_Double AM1_Voltage)
        {
            RGB AM1_Dec = new RGB();

            AM1_Dec.int_R = Imported_my_cpp_dll.DP213_Get_AM1_RGB_Dec(Get_Voltage_VREF4095(), Get_Normal_Voltage_Vreg1(Set, band), AM1_Voltage.double_R);
            AM1_Dec.int_G = Imported_my_cpp_dll.DP213_Get_AM1_RGB_Dec(Get_Voltage_VREF4095(), Get_Normal_Voltage_Vreg1(Set, band), AM1_Voltage.double_G);
            AM1_Dec.int_B = Imported_my_cpp_dll.DP213_Get_AM1_RGB_Dec(Get_Voltage_VREF4095(), Get_Normal_Voltage_Vreg1(Set, band), AM1_Voltage.double_B);

            if (AM1_Dec.int_R > DP213_Static.AM1_AM0_Max)
            {
                AM1_Dec.int_R = DP213_Static.AM1_AM0_Max;
            }
            if (AM1_Dec.int_G > DP213_Static.AM1_AM0_Max)
            {
                AM1_Dec.int_G = DP213_Static.AM1_AM0_Max;
            }
            if (AM1_Dec.int_B > DP213_Static.AM1_AM0_Max)
            {
                AM1_Dec.int_B = DP213_Static.AM1_AM0_Max;
            }
            if (AM1_Dec.int_R < 0)
            {
                AM1_Dec.int_R = 0;
            }
            if (AM1_Dec.int_G < 0)
            {
                AM1_Dec.int_G = 0;
            }
            if (AM1_Dec.int_B < 0)
            {
                AM1_Dec.int_B = 0;
            }

            return(AM1_Dec);
        }
コード例 #2
0
        public void Set_OC_Mode_AM1(RGB_Double AM1_Voltage, OC_Mode mode, int band)
        {
            if (band > DP213_Static.Max_HBM_and_Normal_Band_Amount)
            {
                throw new Exception("band should be less than " + DP213_Static.Max_HBM_and_Normal_Band_Amount);
            }

            RGB AM1 = new RGB();

            AM1.int_R = Imported_my_cpp_dll.DP213_Get_AM1_RGB_Dec(ref0ref4095.Get_Normal_REF4095_Voltage(), vreg1.Get_OC_Mode_Vreg1_Voltage(mode, band), AM1_Voltage.double_R);
            AM1.int_G = Imported_my_cpp_dll.DP213_Get_AM1_RGB_Dec(ref0ref4095.Get_Normal_REF4095_Voltage(), vreg1.Get_OC_Mode_Vreg1_Voltage(mode, band), AM1_Voltage.double_G);
            AM1.int_B = Imported_my_cpp_dll.DP213_Get_AM1_RGB_Dec(ref0ref4095.Get_Normal_REF4095_Voltage(), vreg1.Get_OC_Mode_Vreg1_Voltage(mode, band), AM1_Voltage.double_B);
            Set_OC_Mode_AM1(AM1, mode, band);
        }