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/env python3 | |
import hid | |
import os | |
import contextlib | |
import time | |
if __name__ == '__main__': | |
with contextlib.closing(hid.device()) as dev: | |
dev.open(0x054c, 0x0ce6) |
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
<?xml version="1.0"?> | |
<!-- | |
DualSense (DS5) USB HID Report Descriptor | |
Documentation WIP | |
TODO: Extract info from hid-playstation and cross-verify with us. | |
--> |
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
//-------------------------------------------------------------------------------- | |
// Report descriptor data in hex (length 262 bytes) | |
//-------------------------------------------------------------------------------- | |
// 05010905 A101A100 09300931 150027FF FF000095 02751081 02C0A100 09330934 | |
// 150027FF FF000095 02751081 02C00501 09321500 26FF0395 01750A81 02150025 | |
// 00750695 01810305 01093515 0026FF03 9501750A 81021500 25007506 95018103 | |
// 05091901 290A950A 75018102 15002500 75069501 81030501 09391501 25083500 |
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
/*++ | |
Copyright (c) Microsoft Corporation. All rights reserved. | |
Module Name: | |
devpkey.h | |
Abstract: |
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/env python | |
# -*- coding: utf-8 -*- # | |
from __future__ import unicode_literals | |
# -------------------------------------- | |
# Now compatible with Pelican 4.0.x! | |
# -------------------------------------- | |
# Added by me | |
import time |
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
/** | |
* USB HID Keyboard scan codes as per USB spec 1.11 | |
* plus some additional codes | |
* | |
* Created by MightyPork, 2016 | |
* Public domain | |
* | |
* Adapted from: | |
* https://source.android.com/devices/input/keyboard-devices.html | |
*/ |
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/env python3 | |
# | |
# DS4 report stuff | |
# | |
import struct | |
from sys import stdin, argv | |
import os | |
from io import FileIO |
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/env python3 | |
import struct | |
from sys import stdin | |
import os | |
from io import FileIO | |
hiddev = os.open("/dev/hidraw5", os.O_RDWR | os.O_NONBLOCK) | |
pf = FileIO(hiddev, "wb+", closefd=False) | |
#pf=open("ds_my.bin", "wb+") |
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 QtQuick 2.4 | |
Column { | |
width: parent.width | |
height: parent.height | |
property alias model: columnRepeater.model | |
Repeater { | |
id: columnRepeater |
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 <math.h> | |
// System constants | |
#define deltat 0.001f // sampling period in seconds (shown as 1 ms) | |
#define gyroMeasError 3.14159265358979f * (5.0f / 180.0f) // gyroscope measurement error in rad/s (shown as 5 deg/s) | |
#define beta sqrt(3.0f / 4.0f) * gyroMeasError // compute beta | |
//Global System Variables | |
float a_x, a_y, a_z; // accelerometer measurements |
NewerOlder