Skip to content

Instantly share code, notes, and snippets.

View BrianAdams's full-sized avatar

badevguru BrianAdams

  • Bay Area, CA
View GitHub Profile
@BrianAdams
BrianAdams / BNO055.cpp
Last active February 1, 2022 05:20
Arduino code for OpenROV BNO055 based AHRS+Depth Module
#include "AConfig.h"
#if(HAS_BNO055)
#include "BNO055.h"
#include "Timer.h"
/* BNO055 OpenROV AHRS Module
By Brian Adams
Adopted from code by Kris Winer
@BrianAdams
BrianAdams / gist:8fef9e168310250795bc0ba6d596b9a0
Created September 23, 2021 02:41
livebook branced section bug
# Bug Repo Case
## Tools
### How to use this notebook
This notebook will crash when the index of the first branch is set to a 0 index
```
<!-- livebook:{"branch_parent_index":0} -->
@BrianAdams
BrianAdams / mjepg_bandwidth.patch
Last active June 25, 2021 20:37
v4l2 driver patch
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 7c8322d..f389ccb 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -36,6 +36,7 @@ unsigned int uvc_no_drop_param;
static unsigned int uvc_quirks_param = -1;
unsigned int uvc_trace_param;
unsigned int uvc_timeout_param = UVC_CTRL_STREAMING_TIMEOUT;
+unsigned int uvc_jpeg_comp_param;
@BrianAdams
BrianAdams / gist:b289f782ed3bb186aadbd90b02c23db2
Created July 24, 2017 19:08
Modifed preload script that allows passing in the container size instead of trying to calculate it (work around for compressed images issue)
#!/bin/bash
set -e
set -o pipefail
IMAGE=${IMAGE:-"/img/resin.img"}
API_HOST=${API_HOST:-"https://api.resin.io"}
REGISTRY_HOST=${REGISTRY_HOST:-"registry2.resin.io"}
SPLASH_IMAGE=${SPLASH_IMAGE:-"/img/resin-logo.png"}
@BrianAdams
BrianAdams / OpenROVTestJigErrorCodes
Last active November 13, 2016 05:04
OpenROV TestJig Error Codes
For 2.8 Test Jig
01 | 5V out of tolerance
02 | 3V3 out of tolerance
03 | Homeplug 3V3 out of tolerance
04 | PWM1 battery voltage too low (PWM on)
05 | PWM1 negative lead not ground
06 | PWM1 battery voltage too low (PWM off)
07 | PWM1 netative lead not 5V
08 | PWM2 5V out of tolerance (PWM on)
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../orov-behaviors/orov-behavior.html">
<link rel="import" href="orov-horizon-behavior.html">
<link rel="import" href="../iron-resizable-behavior/iron-resizable-behavior.html">
<dom-module id="orov-horizon-test">
<style type="text/css">
.hidden { display: none }
.horizon {
width:100%;
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../orov-behaviors/orov-behavior.html">
<script>
(function (window) {
'use strict';
//ensure the namespace exists in the window object
if(!(window.OROV)){window.OROV={}}
if(!(window.OROV.behaviors)){window.OROV.behaviors={}}
var behaviors = window.OROV.behaviors;
@BrianAdams
BrianAdams / headers-debian-byteshift.patch
Last active September 23, 2016 17:14
ARM patch for kernel module builds referencing cross compiled kernel headers (https://github.com/igorpecovnik/lib/blob/next/patch/headers-debian-byteshift.patch)
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Link: http://lkml.kernel.org/r/1330436245-24875-2-git-send-email-matt@console-pimps.org
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
tools/include/tools/be_byteshift.h | 70 +++++++++++++++++++++++++++++++++++++
tools/include/tools/le_byteshift.h | 70 +++++++++++++++++++++++++++++++++++++
2 files changed, 140 insertions(+)
consulmasterserver:
command: -server -bootstrap-expect 3 -config-file /etc/configs/acl.json
image: progrium/consul:latest
hostname: node_1
name: node_1
ports:
- "27017:27017"
volumes:
- ~/docker-consul/config:/etc/configs:ro
@BrianAdams
BrianAdams / index.html
Created August 4, 2016 19:15
openscience-auth-question
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>OpenScience</title>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.3/angular.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.3/angular-route.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>