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
/** | |
* Triggers an action when the total price of a composite product changes | |
* | |
*/ | |
;( function ( $, window, document, undefined ) { | |
$( '.composite_data' ) | |
.on( 'wc-composite-initializing', function( event, composite ) { | |
var obj = composite.api; |
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
#define DEADBAND 25 | |
int rawJS1 = analogRead(JS_ADC_1); | |
if (rawJS1 > JS_CENTER_1 && rawJS1 < JS_CENTER_1 + DEADBAND) { | |
rawJS1 = JS_CENTER_1; | |
} | |
if (rawJS1 < JS_CENTER_1 && rawJS1 > JS_CENTER_1 - DEADBAND) { | |
rawJS1 = JS_CENTER_1; |
Serial communication protocol for the Ping and other Blue Robotics products.
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/python | |
from pymavlink import mavutil | |
from pymavlink.dialects.v10 import common as mavlink | |
# UDP settings (must match a udpout port running on mavproxy) | |
address = 'localhost' | |
port = 9001 | |
#master = mavutil.mavlink_connection(args.device, baud=args.baudrate, source_system=args.SOURCE_SYSTEM) |
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
# Companion Computer Scripts | |
# Add these two lines to /etc/rc.local | |
screen -dm -S mavproxy /home/pi/companion/RPI2/Raspbian/start_mavproxy_telem_splitter.sh | |
screen -dm -S video /home/pi/companion/RPI2/Raspbian/start_video.sh |
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
/* Blue Robotics Example Code | |
------------------------------- | |
Title: Multiple ESC Control via I2C (Arduino) | |
Description: This example code demonstrates the I2C communication capability | |
of the Blue Robotics "BlueESC". Motor speed commands are sent via I2C and | |
voltage, current, rpm, and temperature data is returned. | |
The code is designed for the Arduino Uno board and can be compiled and | |
uploaded via the Arduino 1.0+ software. | |
------------------------------- |
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/python | |
# Testing T200 thruster activation | |
from Adafruit_PWM_Servo_Driver import PWM | |
import time | |
# Initialize the PWM device using the default address | |
pwm = PWM(0x40) | |
frequency = 100 |