Skip to content

Instantly share code, notes, and snippets.

import Color exposing (..)
import Graphics.Collage exposing (..)
import Graphics.Element exposing (..)
import Mouse
import List exposing (..)
import Math.Vector3 exposing (..)
import Math.Vector4 exposing (..)
import Math.Matrix4 exposing (..)
import Time exposing (..)
import WebGL exposing (..)
spec.FragmentColor = function(builtIns) {
var xy = this.varyings.texCoord;
var xyz = [xy[0], xy[1], xy[0] * xy[1]];
var tx = mat4.create();
var xyz2 = vec3.create();
xyz2 = vec3.transformMat4(xyz2, xyz, tx);
return vec3.transformMat4(vec3.create(), xyz, tx);
}
----
#include <signal.h>
#include <sys/types.h>
#include <errno.h>
#include <cstdlib>
#include <cstdio>
#include <unistd.h>
volatile int stop = 0;
void handler (int)
0: PUSH1 60
2: PUSH1 40
4: MSTORE
5: PUSH1 e0
7: PUSH1 2
9: EXP
10: PUSH1 0
12: CALLDATALOAD
13: DIV
14: PUSH4 6 fd de 3
project(libsurvive)
cmake_minimum_required(VERSION 3.5)
add_definitions(-DFLT=double -DUSE_DOUBLE)
include_directories(
redist
include/libsurvive
include
)
{
"device_class": "generic_tracker",
"device_pid": 8960,
"device_serial_number": "LHR-BAB3D7B1",
"device_vid": 10462,
"firmware_config": {
"button_function_5": "PA2",
"button_function_6": "PA2",
"bwd_config": "0x392B",
"charge_current_low_temp_ma": 204,
-rwxrwxr-x 1 justin justin 1.5M Sep 14 10:51 ./lib/libsurvive.so
vs
-rwxrwxr-x 1 justin justin 655K Sep 14 10:48 ./lib/libsurvive.so
-rwxrwxr-x 1 justin justin 49K Sep 14 10:41 ./lib/poser_charlesrefine.so
-rwxrwxr-x 1 justin justin 17K Sep 14 10:41 ./lib/poser_dummy.so
-rwxrwxr-x 1 justin justin 169K Sep 14 10:41 ./lib/poser_epnp.so
-rwxrwxr-x 1 justin justin 18K Sep 14 10:41 ./lib/poser_imu.so
-rwxrwxr-x 1 justin justin 50K Sep 14 10:41 ./lib/poser_mpfit.so
static SurvivePose survivePoseFromDevicePose(const vr::TrackedDevicePose_t &dpose) {
auto &mat = dpose.mDeviceToAbsoluteTracking.m;
FLT matrix33[] = {mat[0][0], mat[0][1], mat[0][2], mat[1][0], mat[1][1],
mat[1][2], mat[2][0], mat[2][1], mat[2][2]};
SurvivePose p = {};
for (int i = 0; i < 3; i++) {
p.Pos[i] = mat[i][3];
}
quatfrommatrix33(p.Rot, matrix33);
@jdavidberger
jdavidberger / gist:e3f93f485739f4d35dda57b08439bdd7
Created July 6, 2019 18:14
Lighthouse v2 polynomials and freq per mode
Mode 1:
CARRIER_POLYNOMIALS[0]: 0x0001D258
CARRIER_POLYNOMIALS[1]: 0x00017E04
Rotor Frequency: 50.0521 Hz
Mode 2:
CARRIER_POLYNOMIALS[0]: 0x0001FF6B
CARRIER_POLYNOMIALS[1]: 0x00013F67