-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #848 from OpenBCI/development
GUI v5
- Loading branch information
Showing
249 changed files
with
205,834 additions
and
40,175 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
os: | ||
- linux | ||
- osx | ||
|
||
addons: | ||
artifacts: | ||
paths: | ||
- $(ls $TRAVIS_BUILD_DIR/openbcigui_*_macosx.dmg | tr "\n" ":") | ||
- $(ls $TRAVIS_BUILD_DIR/openbcigui_*_linux64.zip | tr "\n" ":") | ||
target_paths: | ||
- /${TRAVIS_BRANCH}/${TRAVIS_COMMIT} | ||
- /${TRAVIS_BRANCH}/latest | ||
working_dir: $TRAVIS_BUILD_DIR | ||
|
||
before_install: | ||
- if [ "$TRAVIS_OS_NAME" = osx ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then openssl aes-256-cbc -K $encrypted_2f5d2771e3cb_key -iv $encrypted_2f5d2771e3cb_iv -in release_script/mac_only/Certificates.p12.enc -out release_script/mac_only/Certificates.p12 -d; fi | ||
- if [ "$TRAVIS_OS_NAME" = osx ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then chmod +x release_script/mac_only/add-osx-cert.sh; fi | ||
- if [ "$TRAVIS_OS_NAME" = osx ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./release_script/mac_only/add-osx-cert.sh; fi | ||
|
||
install: | ||
- mkdir $TRAVIS_BUILD_DIR/temp; cd $TRAVIS_BUILD_DIR/temp | ||
|
||
### ### LINUX ### ### | ||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then curl -O -L http://download.processing.org/processing-3.5.3-linux64.tgz ;fi | ||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then tar -xzvf processing-3.5.3-linux64.tgz ;fi | ||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then export PATH=$TRAVIS_BUILD_DIR/temp/processing-3.5.3:$PATH ;fi | ||
# copy libraries to linux location | ||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then mkdir -p $HOME/sketchbook/libraries/ ;fi | ||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then cp -a $TRAVIS_BUILD_DIR/OpenBCI_GUI/libraries/. $HOME/sketchbook/libraries/ ;fi | ||
|
||
### ### MAC ### ### | ||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then curl -O -L http://download.processing.org/processing-3.5.3-macosx.zip ;fi | ||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then unzip processing-3.5.3-macosx.zip ;fi | ||
# Processing.app must be in this location for processing-java to work | ||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then mv Processing.app /Applications/Processing.app ;fi | ||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export PATH=$TRAVIS_BUILD_DIR/release_script/mac_only:$PATH ;fi | ||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then chmod +x $TRAVIS_BUILD_DIR/release_script/mac_only/processing-java ;fi | ||
# copy libraries to mac location | ||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then mkdir -p $HOME/Documents/Processing/libraries/ ;fi | ||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then cp -a $TRAVIS_BUILD_DIR/OpenBCI_GUI/libraries/. $HOME/Documents/Processing/libraries/ ;fi | ||
# used to create .dmg | ||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then pip install dmgbuild ;fi | ||
|
||
script: | ||
- cd $TRAVIS_BUILD_DIR | ||
- python $TRAVIS_BUILD_DIR/release_script/make-release.py --no-prompts | ||
|
||
notifications: | ||
email: | ||
on_success: never | ||
on_failure: always |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import com.fazecast.jSerialComm.*; | ||
|
||
println("GETTING A LIST OF SERIAL PORTS: "); | ||
|
||
printArray(SerialPort.getCommPorts()); | ||
|
||
SerialPort comPort = SerialPort.getCommPorts()[1]; | ||
|
||
println(comPort.getSystemPortName()); | ||
|
||
println("Done :)"); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* | ||
* Copyright (C) 2014 Klaus Reimer <[email protected]> | ||
* See LICENSE.txt for licensing information. | ||
*/ | ||
import java.nio.ByteBuffer; | ||
import org.usb4java.Context; | ||
import org.usb4java.Device; | ||
import org.usb4java.DeviceDescriptor; | ||
import org.usb4java.DeviceList; | ||
import org.usb4java.LibUsb; | ||
import org.usb4java.LibUsbException; | ||
import org.usb4java.BufferUtils; | ||
|
||
// This example will fetch Vendor ID and Product ID for all USB ports | ||
// However, this doesn't help identify COM port names across OS | ||
|
||
/** | ||
* Simply lists all available USB devices. | ||
* | ||
* @author Klaus Reimer <k@ailis.de> | ||
*/ | ||
|
||
// Create the libusb context | ||
Context context = new Context(); | ||
|
||
// Initialize the libusb context | ||
int result = LibUsb.init(context); | ||
if (result < 0) | ||
{ | ||
throw new LibUsbException("Unable to initialize libusb", result); | ||
} | ||
|
||
// Read the USB device list | ||
DeviceList list = new DeviceList(); | ||
result = LibUsb.getDeviceList(context, list); | ||
if (result < 0) | ||
{ | ||
throw new LibUsbException("Unable to get device list", result); | ||
} | ||
|
||
try | ||
{ | ||
// Iterate over all devices and list them | ||
for (Device device: list) | ||
{ | ||
int address = LibUsb.getDeviceAddress(device); | ||
int busNumber = LibUsb.getBusNumber(device); | ||
DeviceDescriptor descriptor = new DeviceDescriptor(); | ||
result = LibUsb.getDeviceDescriptor(device, descriptor); | ||
if (result < 0) | ||
{ | ||
throw new LibUsbException( | ||
"Unable to read device descriptor", result); | ||
} | ||
System.out.format( | ||
"Bus %03d, Device %03d: Vendor %04x, Product %04x%n", | ||
busNumber, address, descriptor.idVendor(), | ||
descriptor.idProduct()); | ||
|
||
println(descriptor.dump()); | ||
|
||
ByteBuffer path = BufferUtils.allocateByteBuffer(8); | ||
result = LibUsb.getPortNumbers(device, path); | ||
if (result > 0) | ||
{ | ||
for (int i = 0; i < result; i++) | ||
{ | ||
System.out.print(path.get(i)); | ||
if (i + 1 < result) System.out.print("-"); | ||
} | ||
System.out.println(""); | ||
} | ||
|
||
} | ||
|
||
|
||
} | ||
finally | ||
{ | ||
// Ensure the allocated device list is freed | ||
LibUsb.freeDeviceList(list, true); | ||
} | ||
|
||
// Deinitialize the libusb context | ||
LibUsb.exit(context); |
Oops, something went wrong.