This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hardware Perspective | |
-------------------- | |
* It is look like that Lenovo has aggregated bunch of sensors into one USB HID Device, this will be `2047:0855 Texas Instruments`. | |
* This device has a big HID descriptor which report each sensor using `Usage Page 05 20 - Sensor Page (0x20)` | |
* There are 8 reports in the descriptor, for each report there is a bit map of the sensor properties: | |
``` | |
Usage 0A 09 03 - Property: Sensor Connection Type | |
Usage 0A 16 03 - Property: Reporting State | |
Usage 0A 19 03 - Property: Power State |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOCAL_PATH := $(call my-dir) | |
include $(CLEAR_VARS) | |
# OpenCV | |
OPENCV_CAMERA_MODULES := off | |
OPENCV_INSTALL_MODULES := off | |
OPENCV_LIB_TYPE := STATIC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdint.h> | |
#include <fcntl.h> | |
#include <sys/ioctl.h> | |
#include <linux/input.h> | |
#include <errno.h> | |
#include <time.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import cv2 | |
import numpy as np | |
import glob | |
SAMPLES_SIZE = 2001 | |
SAMPLES = np.empty((0, SAMPLES_SIZE)) | |
RESPONSES = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import time | |
import binascii | |
FLASH_FORGE_REMOTE_PORT = 19000 | |
FLASH_FORGE_LOCAL_PORT = 18001 | |
FLASH_FORGE_MULTICAST_GROUP = "225.0.0.9" | |
def findprinter(src): |