//from https://stackoverflow.com/questions/64722413/force-webpage-dom-wait-on-promise
initPage();
async function initPage() {
console.log('initializing page...');
const wasmExports = await initWasm();
renderPageContent(wasmExports);
}
// WARNING: THIS EXAMPLE HAS BEEN SUPERSEDED BY THIS PROJECT. PLEASE MIGRATE. https://github.com/cnlohr/openvr_overlay_model | |
// Battery Watcher for OpenVR (make an overlay with the battery left for all connected devices on your left hand) | |
// | |
// Compile with: | |
// tcc battery_monitor_overlay.c -o bmo.exe -luser32 -lgdi32 -lkernel32 -lopengl32 C:\windows\system32\msvcrt.dll openvr_api.dll | |
// System headers for any extra stuff we need. | |
#include <stdbool.h> |
// QuickNoise -> Extremely fast noise that does repeat, but "feels" like | |
// perlin noise. Rewritten to avoid license issues. | |
// | |
// The original version of this noise is restrictively licensed. Code was | |
// re-written for HLSL 2020 <>< CNLohr, code henseforth may be liberally | |
// licensed under MIT-X11, NewBSD or Any Creative Commons License including | |
// CC0. | |
// | |
// There was also a bug in the version by stubbe which caused a migration in | |
// x/y/z when there was an applied w value. The matrix undoes the migration |
//from https://stackoverflow.com/questions/64722413/force-webpage-dom-wait-on-promise
initPage();
async function initPage() {
console.log('initializing page...');
const wasmExports = await initWasm();
renderPageContent(wasmExports);
}
Having a hard time getting the timings you want working? Try this. | |
config.txt: | |
Then execute this command (or put it in rc.local) | |
vcgencmd hdmi_timings 2880 0 55 10 55 1600 0 30 6 570 0 0 0 90 0 593000000 3 && tvservice -e "DMT 87" && tvservice -s |
Did you just check out / clone a repository and forget --recursive / --recurse-submodules? Well, do this:
git submodule update --init --recursive --remote
For information about why this nugget was lost and burried in another stack exchange article, see this: https://meta.stackoverflow.com/questions/400424/how-can-i-request-that-a-question-merge-be-reversed
#include "touch.h" | |
#include "systems.h" | |
uint8_t touch_calib[3]; | |
uint8_t done_startup; | |
//DO_PD means we use the internal pull-down resistors to measure the capacitance | |
//if we define this to be 0, then it will use the internal pull-up resistors. | |
//I am still experimenting with both options to see which is better overall and | |
//in a lot of situations. |
printf( "Conv: \n" ); | |
struct HmdMatrix34_t mzerotoabs = cnovrstate->oSystem->GetRawZeroPoseToStandingAbsoluteTrackingPose(); | |
printf( "%f %f %f %f\n", PFFOUR( mzerotoabs.m[0] ) ); | |
printf( "%f %f %f %f\n", PFFOUR( mzerotoabs.m[1] ) ); | |
printf( "%f %f %f %f\n", PFFOUR( mzerotoabs.m[2] ) ); | |
cnovr_pose pstanding; | |
matrix44_to_pose( &pstanding, &mzerotoabs.m[0][0] ); | |
printf( "%f %f %f %f %f %f %f %f\n", PFTHREE( pstanding.Pos ), PFFOUR( pstanding.Rot ), pstanding.Scale ); |
#include <string.h> | |
#include <stdio.h> | |
#include <hwcrypto/aes.h> | |
/* | |
For Encryption time: 1802.40us (9.09 MB/s) at 16kB blocks. | |
*/ | |
static inline int32_t _getCycleCount(void) { | |
int32_t ccount; |
/* | |
Copyright (c) 2012, Broadcom Europe Ltd | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright | |
notice, this list of conditions and the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright | |
notice, this list of conditions and the following disclaimer in the |
/dts-v1/; /plugin/; | |
/ { | |
// compatible = "allwinner,sun50i-h5-mali", | |
// "arm,mali-450";// "allwinner,sun50i-h5"; | |
fragment@0 { | |
target-path = "/"; | |
__overlay__ { |