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 / ParseS3FilesForLatest.sh
Created May 27, 2015 00:16
Given a regex patten, parses the feed from and S3 XML listing from the bucket and finds the file matching the pattern with the most recent date.
#!/bin/bash
read_dom () {
local IFS=\>
read -d \< ENTITY CONTENT
local ret=$?
TAG_NAME=${ENTITY%% *}
ATTRIBUTES=${ENTITY#* }
return $ret
}
@BrianAdams
BrianAdams / plugindevguide.md
Created May 13, 2015 00:22
Developer Guide : Plugins

Packaging

Place all of the dependent files with the package that is being downloaded.

OpenROV provides a set of "standard" controls that you can use in your themese. The contracts with these controls will be versioned to prevent breaking plugins. The standard controls can be found in the \src\static\webcomponents folder. There may be some in the \src\static\bower_components folder, but we will be setting up links so that you can find everything in the first spot.

@BrianAdams
BrianAdams / index.js
Last active August 29, 2015 14:18
Initial example of adding other connectivity protocols to OpenROV
function curlAPI(name, deps) {
console.log('This is where curlAPI plugin code would execute in the node process.');
var sockets = [];
deps.cockpit.onAny(function(value){
var event = this.event;
if (event !== 'newListener') {
sockets.forEach(function(socket) {
socket.write(JSON.stringify([event,value]));
});
@BrianAdams
BrianAdams / photoedits.js
Created March 30, 2015 05:01
Changes to photo capture code
this.getBase64Image = function getBase64Image(img) {
// Create an empty canvas element
var canvas = document.createElement("canvas");
canvas.width = img.width;
canvas.height = img.height;
// Copy the image contents to the canvas
var ctx = canvas.getContext("2d");
ctx.drawImage(img, 0, 0);

Keybase proof

I hereby claim:

  • I am brianadams on github.
  • I am badevguru (https://keybase.io/badevguru) on keybase.
  • I have a public key whose fingerprint is 9508 E43F 4544 7012 5EE4 DF84 0DF5 CFBC 73CF D7B3

To claim this, I am signing this object:

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

This release is compatible with beagle bone blacks. If you are using the beaglebone white + cape, you will need to wait for v2.5.2

This is the first release where we have switched to the suite concept. The suite simply combines the sub projects we are using to build the image we put on the ROV. This also simplifies the upgrade process as we no longer expose upgrade detail for each sub project, just the suite itself.

Upgrade instructions: If you are already on Release Candidate 3 or above, you can use the built in upgrade feature instead of burning a new SD card of the image.

Built-in upgrade feature:

  1. Go to dashboard (http://192.168.254.1)
<html>
<head>
<script src="/socket.io/socket.io.js"></script>
<script src="socket.io-stream.js"></script>
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script>
$(function() {
var socket = io.connect();
var stream = ss.createStream();
// receive data
@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)