package com.seewo.vcommons.utils;

import android.content.Context;
import android.hardware.usb.UsbDevice;
import android.hardware.usb.UsbManager;
import android.os.SystemProperties;
import android.text.TextUtils;
import android.util.Log;
import com.seewo.vcommons.constants.Platform;
import com.seewo.vcommons.constants.SeewoConstants;
import com.seewo.vcommons.cutomer.CustomerUtils;
import com.seewo.vcommons.data.PreferencesUtils;
import com.seewo.vcommons.data.PropertiesUtils;
import com.seewo.vcommons.data.USBDeviceUtils;
import java.io.File;
import java.util.Iterator;
import java.util.regex.Pattern;

/* JADX INFO: loaded from: classes.dex */
public class HardwareUtils {
    private static final int ANDROIDSLOT_BIT_INDEX = 4;
    private static final int ANDROID_COMPATIBLE_SLOT_BIT_INDEX = 2;
    private static final int AP_INDEX = 7;
    private static final int BLUETOOTH_BIT_INDEX = 2;
    private static final String CAP_551 = "CAP";
    private static final String CAP_TOUCH = "CAP_TOUCH";
    private static final int DVD_BIT_INDEX = 3;
    private static final String EETI_4096_TOUCH = "0EEF-C001";
    private static final String EMR = "EMR";
    private static final char EXSIT = '1';
    private static final int FCT_TOUCH_BOOT_PID = 57105;
    private static final int FCT_TOUCH_PID = 45312;
    private static final int FCT_TOUCH_VID = 10465;
    private static final String HAS_HDMI = "1";
    private static final String HAS_HDMI_CHIP = "persist.sys.hdmiout.detect";
    private static final String HAS_HDMI_CHIP_9950 = "persist.ctm.hdmiout.detect";
    private static final int INDEX_3700_BIT = 17;
    private static final int INDEX_4K2K_BIT = 13;
    private static final int INDEX_6M30_BIT = 12;
    private static final int INDEX_6M60_BIT = 11;
    private static final int INDEX_8156PC_SECOND_BIT = 14;
    private static final int INDEX_817_SECOND_BIT = 15;
    private static final int INDEX_AMPLIFIER_IC_BIT = 9;
    private static final int INDEX_CAMERA = 31;
    private static final int INDEX_CHANNEL_AV = 4;
    private static final int INDEX_CHANNEL_DP = 6;
    private static final int INDEX_CHANNEL_HDMI1 = 0;
    private static final int INDEX_CHANNEL_HDMI2 = 1;
    private static final int INDEX_CHANNEL_HDMI3 = 2;
    private static final int INDEX_CHANNEL_HDMI4 = 3;
    private static final int INDEX_CHANNEL_TYPE_C1 = 5;
    private static final int INDEX_CHANNEL_TYPE_C2 = 7;
    private static final int INDEX_CO2_BIT = 27;
    private static final int INDEX_DBX_BIT = 21;
    private static final int INDEX_DP_PDC_TYPEC1_SECOND_BIT = 4;
    private static final int INDEX_DTH_TYPEC_SECOND_BIT = 16;
    private static final int INDEX_EP9461_BIT = 15;
    private static final int INDEX_EP9461_P2_BIT = 25;
    private static final int INDEX_FOUR_SIDES_SENSOR = 29;
    private static final int INDEX_FRC_6M95_SECOND_BIT = 12;
    private static final int INDEX_FRONT_USB_SECOND_BIT = 2;
    private static final int INDEX_HDMI_OUT_BIT = 16;
    private static final int INDEX_HUMIDITY_SENSOR = 30;
    private static final int INDEX_IT6563_HDMIOUT_SECOND_BIT = 9;
    private static final int INDEX_IT6563_SECOND_BIT = 0;
    private static final int INDEX_IT66311_SECOND_BIT = 1;
    private static final int INDEX_LOCALDIMMING_SECOND_BIT = 13;
    private static final int INDEX_MCU_BIT = 19;
    private static final int INDEX_NT68411_SECOND_BIT = 3;
    private static final int INDEX_OPS_BIT = 1;
    private static final int INDEX_PDC_TYPEC2_SECOND_BIT = 7;
    private static final int INDEX_PEN_DETECT_SECOND_BIT = 6;
    private static final int INDEX_PIR_BIT = 20;
    private static final int INDEX_PS175_SECOND_BIT = 10;
    private static final int INDEX_PS176_BIT = 22;
    private static final int INDEX_PS186_DP_BIT = 26;
    private static final int INDEX_SENSOR_HUB_SECOND_BIT = 11;
    private static final int INDEX_SMART_HUB_BIT = 23;
    private static final int INDEX_TEMPERATURE_SENSOR = 28;
    private static final int INDEX_USB_HUB_BIT = 24;
    private static final int INDEX_YPBPR_BIT = 14;
    private static final String IR = "IR";
    private static final String LC840EQD_SEM1_3D = "LC840EQD_SEM1_3D";
    private static final int LIGHT_SENSOR_BIT_INDEX = 0;
    private static final int MIC_BIT_INDEX = 4;
    private static final String PANEL_LC650EQD_FGF2 = "LC650EQD-FGF2";
    private static final String PANEL_LC750EQY = "LC750EQY";
    private static final String PANEL_LC980DQM_FGF1 = "LC980DQD-FGF1";
    private static final String PANEL_LSI650HN = "LSI650HN01_0";
    private static final int PC_BIT_INDEX = 0;
    private static final String PERSIST_SYS_2GIOT = "persist.sys.2giot";
    private static final String PERSIST_SYS_CHANNEL_LIST = "persist.sys.channellist";
    private static final String PERSIST_SYS_HDCP1 = "persist.sys.hdcp1";
    private static final String PERSIST_SYS_HDCP2 = "persist.sys.hdcp2";
    private static final String PERSIST_SYS_MCU_P = "persist.sys.mcu.pc";
    private static final String PERSIST_SYS_NFC = "persist.sys.nfcmcu";
    private static final String PERSIST_SYS_ROUTER = "persist.sys.router";
    private static final String PERSIST_SYS_ROUTER_WITHOUT_AP = "persist.sys.router.no_ap";
    private static final String PERSIST_SYS_RTC = "persist.sys.rtc";
    private static final int RADIX = 2;
    private static final String REGEX_DUAL_TOUCH = "D[1-9][0-9]G";
    private static final String REGEX_FCT_F_TOUCH = "F[1-9][0-9]G";
    private static final String REGEX_FCT_TOUCH = "X[1-9][0-9]G";
    private static final String REGEX_RAPT_TOUCH = "RP[1-9][0-9]WHD";
    private static final String REGEX_SG_TOUCH = "SG[1-9][0-9]AA";
    private static final int ROUTER_INDEX = 4;
    private static final String TAG = "HardwareUtils";
    private static final int TUNER_BIT_INDEX = 3;
    private static final int TY_TOUCH_PID = 4101;
    private static final int TY_TOUCH_VID = 8969;
    private static final int VIDEO_RECORDER_BIT_INDEX = 5;
    private static final int WIFI_BIT_INDEX = 5;
    private static final int WIRELESS_MIC_INDEX = 6;
    private static final String WITH_NFC_BOARD = "1";
    private static final String[] PANELS_70 = {"S70EB-CPHC38A", "S70EB-GPHC38A", "S70EC-CS0338A", "S70EC-CP7S38A", "X70SC-CP7S10A", "L70EB-CP7S10A", "RP700K"};
    private static final String PRODUCT_MODEL_VALUE = PropertiesUtils.getProductModel();
    private static final String PANEL_NAME_VALUE = PropertiesUtils.getPanelName();

    private HardwareUtils() {
    }

    private static boolean isBitTrue(int i) {
        return ((PropertiesUtils.getProperty(SeewoConstants.SYSTEM_PROPERTY_HARDWARE, 0L) & ((long) Math.pow(2.0d, (double) i))) >> i) == 1;
    }

    private static boolean isBitTrueSecondPart(int i) {
        return ((((long) PropertiesUtils.getProperty(SeewoConstants.SYSTEM_PROPERTY_HARDWARE_SECOND, 0)) & ((long) Math.pow(2.0d, (double) i))) >> i) == 1;
    }

    public static boolean hasLightSensor() {
        if (BoardTypeUtils.is638Machine()) {
            return isBitTrue(0);
        }
        return PropertiesUtils.hasLightSensor();
    }

    public static boolean hasBlueTooth() {
        return isBitTrue(2);
    }

    public static boolean hasTuner() {
        return isBitTrue(3);
    }

    public static boolean hasMic() {
        return isBitTrue(4);
    }

    public static boolean hasWifi() {
        return isBitTrue(5);
    }

    public static boolean hasWirelessMic() {
        return isBitTrue(6);
    }

    public static boolean hasAP() {
        return isBitTrue(7);
    }

    public static boolean hasAP(Context context) {
        return USBDeviceUtils.isWirelessDisplayEnabled(context);
    }

    public static boolean hasAmplifierIC() {
        return isBitTrue(9);
    }

    public static boolean has6MX0() {
        return isBitTrue(12) || isBitTrue(11);
    }

    public static boolean has6M60() {
        return isBitTrue(11);
    }

    public static boolean hasRouter() {
        if (!"EMPTY".equals(PropertiesUtils.getProperty(PERSIST_SYS_ROUTER, "EMPTY"))) {
            return PropertiesUtils.getProperty(PERSIST_SYS_ROUTER, false);
        }
        String property = PropertiesUtils.getProperty("ro.cvte.devicelist", "");
        return !"".equals(property) && property.length() >= 5 && '1' == property.charAt(4) && !CustomerUtils.isForeignMachine();
    }

    public static boolean hasRouterWithoutAp() {
        if ("EMPTY".equals(PropertiesUtils.getProperty(PERSIST_SYS_ROUTER_WITHOUT_AP, "EMPTY"))) {
            return false;
        }
        return PropertiesUtils.getProperty(PERSIST_SYS_ROUTER_WITHOUT_AP, false);
    }

    public static boolean hasRouterAp() {
        return hasRouter() && !hasRouterWithoutAp();
    }

    public static boolean hasYpbpr() {
        return isBitTrue(14);
    }

    public static boolean hasPC() {
        return hasSlot(0);
    }

    public static boolean hasAndroidCompatibleSlot() {
        return hasSlot(2);
    }

    public static boolean hasAndroidSlot() {
        return hasSlot(4);
    }

    public static boolean hasDVD() {
        return hasSlot(3);
    }

    public static boolean hasVideoRecorder() {
        return hasSlot(5);
    }

    private static boolean hasSlot(int i) {
        return ((PropertiesUtils.getProperty(SeewoConstants.SYSTEM_PROPERTY_HARDWARE_SLOT, 0) >> i) & 1) == 1;
    }

    public static boolean is4K2KMachine() {
        return isBitTrue(13);
    }

    public static boolean is3DScreen() {
        if (CustomerUtils.isProwiseCustomized() || CustomerUtils.isSaharaCustomized()) {
            return false;
        }
        String strTrim = PropertiesUtils.getProperty("ro.cvte.panel", "").trim();
        boolean z = strTrim.equals(PANEL_LC650EQD_FGF2) || strTrim.equals(PANEL_LC980DQM_FGF1) || strTrim.equals(LC840EQD_SEM1_3D);
        return !z ? PropertiesUtils.getProperty(SeewoConstants.KEY_3D_SCREEN, false) : z;
    }

    public static boolean hasTvSource() {
        return hasTuner() && !CustomerUtils.isForeignMachine();
    }

    public static boolean hasAutoBright() {
        return BoardTypeUtils.is638Machine() ? hasLightSensor() && !CustomerUtils.isForeignMachine() : hasLightSensor() || hasSmartHub();
    }

    public static void setDevicelistSlot(byte b) {
        PropertiesUtils.setProperty(SeewoConstants.SYSTEM_PROPERTY_HARDWARE_SLOT, String.valueOf((int) b));
    }

    public static boolean hasNFCBoard() {
        return "1".equals(PropertiesUtils.getProperty(SeewoConstants.KEY_NFC, BoardTypeUtils.is510Machine() ? "1" : ""));
    }

    public static boolean checkNFCBoard() {
        ShellCommandUtils.executeCommand("chmod 777 /dev/pn544", true);
        return new File("/dev/pn544").exists();
    }

    public static String getTouchType() {
        String property = PropertiesUtils.getProperty("ro.seewo.touch_type", "");
        return TextUtils.isEmpty(property) ? "NULL_TOUCH" : property;
    }

    public static int getEdidChecksumFor510() {
        String property = PropertiesUtils.getProperty(SeewoConstants.KEY_EDID_CHECKSUM_510, "");
        if (TextUtils.isEmpty(property)) {
            return -1;
        }
        return edidStrConvertToInt(property);
    }

    private static int edidStrConvertToInt(String str) {
        try {
            return Integer.parseInt(str);
        } catch (Exception e) {
            Log.e(TAG, "parse int failure!" + e.toString());
            return -1;
        }
    }

    public static boolean needSetPcPowerWhenRemoteWakeup() {
        return SeewoConstants.VALUE_TRUE.equalsIgnoreCase(PropertiesUtils.getProperty(SeewoConstants.SYSTEM_PROPERTY_NEED_SET_PC_POWER));
    }

    public static boolean is70PanelMachine() {
        for (String str : PANELS_70) {
            if (PRODUCT_MODEL_VALUE.contains(str)) {
                return true;
            }
        }
        return false;
    }

    public static boolean isLC750EQYPanel() {
        return PANEL_NAME_VALUE.equals(PANEL_LC750EQY);
    }

    public static boolean isLSI65HN() {
        return PANEL_NAME_VALUE.equals(PANEL_LSI650HN);
    }

    public static boolean isHighPrecisionDMPanel(Context context) {
        return PreferencesUtils.getTouchCheckSum(context).contains("DM");
    }

    public static boolean isHighPrecisionMDPanel(Context context) {
        return PreferencesUtils.getTouchCheckSum(context).contains("MD");
    }

    public static boolean isHighPrecisionSEPanel(Context context) {
        return PreferencesUtils.getTouchCheckSum(context).contains(LanguageUtils.SWEDISH_LOCAL);
    }

    public static boolean isHighPrecisionMAPanel(Context context) {
        return PreferencesUtils.getTouchCheckSum(context).contains("MA");
    }

    public static boolean isHighPrecisionHuaXinPanel(Context context) {
        return isHighPrecisionDMPanel(context) || isHighPrecisionMDPanel(context) || isHighPrecisionSEPanel(context) || isHighPrecisionMAPanel(context);
    }

    public static boolean isHighPrecisionSWPanel(Context context) {
        return PreferencesUtils.getTouchCheckSum(context).contains("SW_U");
    }

    public static boolean isHighPrecisionPanel(Context context) {
        return isHighPrecisionDMPanel(context) || isHighPrecisionMDPanel(context) || isHighPrecisionSWPanel(context);
    }

    public static boolean isSmartBlackboardPanel(Context context) {
        return PreferencesUtils.getTouchCheckSum(context).contains("D4CEB69C") || PreferencesUtils.getTouchCheckSum(context).contains("XA");
    }

    public static boolean isFCTouchBox(Context context) {
        return PreferencesUtils.getTouchCheckSum(context).contains("FC");
    }

    public static boolean isHETouch(Context context) {
        return PreferencesUtils.getTouchCheckSum(context).contains("HE");
    }

    public static boolean isBOETouch(Context context) {
        return PreferencesUtils.getTouchCheckSum(context).contains("0457-1506");
    }

    public static boolean isRaptTouch(Context context) {
        String touchCheckSum = PreferencesUtils.getTouchCheckSum(context);
        if (TextUtils.isEmpty(touchCheckSum)) {
            return false;
        }
        return Pattern.compile(REGEX_RAPT_TOUCH).matcher(touchCheckSum.substring(0, 7)).matches();
    }

    public static boolean isEetiTouch(Context context) {
        return PreferencesUtils.getTouchCheckSum(context).contains("0EEF-C000");
    }

    public static boolean isEeti4096Touch(Context context) {
        return PreferencesUtils.getTouchCheckSum(context).startsWith(EETI_4096_TOUCH);
    }

    public static boolean isLgInCellTouch(Context context) {
        return PreferencesUtils.getTouchCheckSum(context).startsWith("1FD2-820");
    }

    public static boolean isEetiNakedTouch(Context context) {
        boolean z = false;
        for (UsbDevice usbDevice : ((UsbManager) context.getSystemService("usb")).getDeviceList().values()) {
            if (usbDevice.getProductId() == 49152 && usbDevice.getVendorId() == 3823) {
                z = true;
            }
        }
        return z;
    }

    public static boolean isIlitekTouch(Context context) {
        return PreferencesUtils.getTouchCheckSum(context).contains("222A-0001");
    }

    public static boolean isCAPTouch() {
        return getTouchType().contains(CAP_551);
    }

    public static boolean isEMRTouch() {
        return getTouchType().contains(EMR);
    }

    public static boolean is551CapTouch() {
        return getTouchType().contains(CAP_551) && BoardTypeUtils.is551Machine();
    }

    public static boolean hasEP9461() {
        return Platform.Board.VERSION >= 4 && isBitTrue(15);
    }

    public static boolean hasHdmiOut() {
        return BoardTypeUtils.is638Machine() ? PropertiesUtils.isSupport638HdmiOut() : isBitTrue(16);
    }

    public static boolean hasHdmiChip() {
        try {
            return SystemProperties.get(BoardTypeUtils.is9950Machine() ? HAS_HDMI_CHIP_9950 : HAS_HDMI_CHIP, "1").equals("1");
        } catch (Exception e) {
            Log.w(TAG, "getProperty String: ", e);
            return false;
        }
    }

    public static boolean hasOPS() {
        return isBitTrue(1);
    }

    public static boolean isIRTouch() {
        return getTouchType().contains("IR");
    }

    public static boolean isFCTTouch(Context context) {
        String touchCheckSum = PreferencesUtils.getTouchCheckSum(context);
        if (TextUtils.isEmpty(touchCheckSum)) {
            return false;
        }
        return Pattern.compile(REGEX_FCT_TOUCH).matcher(touchCheckSum.substring(0, 4)).matches() || Pattern.compile(REGEX_FCT_F_TOUCH).matcher(touchCheckSum.substring(0, 4)).matches();
    }

    public static boolean isHuaXinSGTouch(Context context) {
        String touchCheckSum = PreferencesUtils.getTouchCheckSum(context);
        if (TextUtils.isEmpty(touchCheckSum)) {
            return false;
        }
        return Pattern.compile(REGEX_SG_TOUCH).matcher(touchCheckSum.substring(0, 6)).matches();
    }

    public static boolean isDualTouch(Context context) {
        String touchCheckSum = PreferencesUtils.getTouchCheckSum(context);
        if (TextUtils.isEmpty(touchCheckSum)) {
            return false;
        }
        return Pattern.compile(REGEX_DUAL_TOUCH).matcher(touchCheckSum.substring(0, 4)).matches();
    }

    public static boolean isCDTouch(Context context) {
        String touchCheckSum = PreferencesUtils.getTouchCheckSum(context);
        return touchCheckSum.startsWith("EA") || touchCheckSum.startsWith("EB") || touchCheckSum.startsWith("MV");
    }

    public static boolean isTYTouch(Context context) {
        return isSomeTouchByVidPid(context, TY_TOUCH_VID, 4101);
    }

    private static boolean isTouchCheckSumMatch(Context context, String str, int i) {
        return isTouchCheckSumMatch(context, str, 0, i);
    }

    private static boolean isTouchCheckSumMatch(Context context, String str, int i, int i2) {
        String touchCheckSum = PreferencesUtils.getTouchCheckSum(context);
        if (TextUtils.isEmpty(touchCheckSum)) {
            return false;
        }
        return Pattern.compile(str).matcher(touchCheckSum.substring(i, i2)).matches();
    }

    private static boolean isSomeTouchByVidPid(Context context, int i, int i2) {
        for (UsbDevice usbDevice : USBDeviceUtils.getUsbDevices(context)) {
            int vendorId = usbDevice.getVendorId();
            int productId = usbDevice.getProductId();
            if (vendorId == i && productId == i2) {
                return true;
            }
        }
        return false;
    }

    public static boolean isFCTTouchByVidPid(Context context) {
        boolean z;
        Iterator<UsbDevice> it = USBDeviceUtils.getUsbDevices(context).iterator();
        do {
            z = false;
            if (!it.hasNext()) {
                return false;
            }
            UsbDevice next = it.next();
            int vendorId = next.getVendorId();
            int productId = next.getProductId();
            boolean z2 = vendorId == FCT_TOUCH_VID && productId == FCT_TOUCH_PID;
            if (vendorId == FCT_TOUCH_VID && productId == FCT_TOUCH_BOOT_PID) {
                z = true;
            }
            if (z2) {
                break;
            }
        } while (!z);
        return true;
    }

    public static boolean has3700() {
        return isBitTrue(17);
    }

    public static boolean hasMcu() {
        Log.e(TAG, "is638Machine: " + BoardTypeUtils.is638Machine() + " is510Machine: " + BoardTypeUtils.is510Machine() + " isBitTrue: " + isBitTrue(19));
        return BoardTypeUtils.is638Machine() || BoardTypeUtils.is510Machine() || isBitTrue(19);
    }

    public static boolean hasPIRSensor() {
        return isBitTrue(20);
    }

    public static boolean hasDBX() {
        return isBitTrue(21);
    }

    public static boolean hasPS176() {
        return isBitTrue(22);
    }

    public static boolean hasSmartHub() {
        return isBitTrue(23);
    }

    public static boolean hasEp9461p2() {
        return isBitTrue(25);
    }

    public static boolean hasUsbHub() {
        return isBitTrue(24);
    }

    public static boolean hasPS186DP() {
        return isBitTrue(26);
    }

    public static boolean hasCo2() {
        return isBitTrue(27);
    }

    public static boolean hasTemperatureSensor() {
        return isBitTrue(28);
    }

    public static boolean hasFourSidesSensor() {
        return isBitTrue(29);
    }

    public static boolean hasHumiditySensor() {
        return isBitTrue(30);
    }

    public static boolean hasCamera() {
        return isBitTrue(31);
    }

    public static boolean hasIT6563DP() {
        return isBitTrueSecondPart(0);
    }

    public static boolean hasIT66311Version() {
        return isBitTrueSecondPart(1);
    }

    public static boolean hasNT68411Version() {
        return isBitTrueSecondPart(3);
    }

    public static boolean hasPDCTypeC2() {
        return isBitTrueSecondPart(7);
    }

    public static boolean hasIT66311HDMIOUTVersion() {
        return isBitTrueSecondPart(9);
    }

    public static boolean hasPS75Version() {
        return isBitTrueSecondPart(10);
    }

    public static boolean hasSensorHub() {
        return isBitTrueSecondPart(11);
    }

    public static boolean hasFrc6M95() {
        return isBitTrueSecondPart(12);
    }

    public static boolean hasLocalDimming() {
        return isBitTrueSecondPart(13);
    }

    public static boolean has8156PC() {
        return isBitTrueSecondPart(14);
    }

    public static boolean hasUSB817() {
        return isBitTrueSecondPart(15);
    }

    public static boolean hasPDCTypeC1() {
        return isBitTrueSecondPart(4);
    }

    public static boolean hasDTHTypecVersion() {
        return isBitTrueSecondPart(16);
    }

    public static boolean hasFrontUSB() {
        if (TextUtils.isEmpty(PropertiesUtils.getProperty(SeewoConstants.SYSTEM_PROPERTY_HARDWARE_SECOND))) {
            return true;
        }
        return isBitTrueSecondPart(2);
    }

    public static boolean hasMCU_P() {
        return PropertiesUtils.getProperty(PERSIST_SYS_MCU_P, false);
    }

    public static boolean hasRTC() {
        return PropertiesUtils.getProperty(PERSIST_SYS_RTC, true);
    }

    public static boolean hasHDCP1() {
        return PropertiesUtils.getProperty(PERSIST_SYS_HDCP1, true);
    }

    public static boolean hasHDCP2() {
        return PropertiesUtils.getProperty(PERSIST_SYS_HDCP2, true);
    }

    public static boolean has2Giot() {
        return PropertiesUtils.getProperty(PERSIST_SYS_2GIOT, false);
    }

    public static boolean hasNFC() {
        return PropertiesUtils.getProperty(PERSIST_SYS_NFC, false);
    }

    public static boolean hasPenDetector() {
        return isBitTrueSecondPart(6);
    }

    private static boolean hasChannel(int i) {
        return ((SystemProperties.getInt(PERSIST_SYS_CHANNEL_LIST, 0) >> i) & 1) == 1;
    }

    public static boolean hasHDMI1() {
        return hasChannel(0);
    }

    public static boolean hasHDMI2() {
        return hasChannel(1);
    }

    public static boolean hasHDMI3() {
        return hasChannel(2);
    }

    public static boolean hasHDMI4() {
        return hasChannel(3);
    }

    public static boolean hasAV() {
        return hasChannel(4);
    }

    public static boolean hasTypeC() {
        return hasTypeC1() || hasTypeC2();
    }

    public static boolean hasTypeC1() {
        return hasChannel(5);
    }

    public static boolean hasTypeC2() {
        return hasChannel(7);
    }

    public static boolean hasDP() {
        return hasChannel(6);
    }
}
