def _hw_info(): # TODO: This import is done here to avoid potential # import loops with kano-peripherals. from kano_peripherals.wrappers.detection import is_ck2_lite, is_ck2_pro, \ is_ckt, get_ck2_lite_version, get_ck2_pro_version, get_ckt_version # If CKL/CKCs cannot be detected, defaults to Computer Kits without version. kit_type = 'ck' kit_version = None # Detect CK Lite via the PiHat board. if is_ck2_lite(): kit_type = 'ckl' kit_version = get_ck2_lite_version() # Detect CK Complete via the PowerHat board and other peripherals. elif is_ck2_pro(): kit_type = 'ckc' kit_version = get_ck2_pro_version() # Detect CKT via the PowerHat board and EDID. elif is_ckt(): kit_type = 'ckt' kit_version = get_ckt_version() track_data( 'hw-info', { 'keyboard': 'kano' if detect_kano_keyboard() else 'generic', 'model': get_rpi_model(), 'partitions': get_partition_info(), 'kit': { 'type': kit_type, 'version': kit_version.vstring if kit_version else kit_version } })
def _hw_info(): # TODO: This import is done here to avoid potential # import loops with kano-peripherals. from kano_peripherals.wrappers.detection import is_ck2_lite, is_ck2_pro, \ is_ckt, get_ck2_lite_version, get_ck2_pro_version, get_ckt_version # If CKL/CKCs cannot be detected, defaults to Computer Kits without version. kit_type = 'ck' kit_version = None # Detect CK Lite via the PiHat board. if is_ck2_lite(): kit_type = 'ckl' kit_version = get_ck2_lite_version() # Detect CK Complete via the PowerHat board and other peripherals. elif is_ck2_pro(): kit_type = 'ckc' kit_version = get_ck2_pro_version() # Detect CKT via the PowerHat board and EDID. elif is_ckt(): kit_type = 'ckt' kit_version = get_ckt_version() track_data('hw-info', { 'keyboard': 'kano' if detect_kano_keyboard() else 'generic', 'model': get_rpi_model(), 'partitions': get_partition_info(), 'kit': { 'type': kit_type, 'version': kit_version.vstring if kit_version else kit_version } })
def get_cpu_info(): ''' Returns a string with the cpuid and the board model ''' cmd = "/usr/bin/rpi-info" o, _, _ = run_cmd(cmd) o += '\nModel: {}'.format(get_rpi_model()) return o
def _hw_info(): track_data("hw-info", { "keyboard": "kano" if detect_kano_keyboard() else "generic", "model": get_rpi_model() })
def _hw_info(): track_data('hw-info', { 'keyboard': 'kano' if detect_kano_keyboard() else 'generic', 'model': get_rpi_model(), 'partitions': get_partition_info() })