Skip to content

Commit

Permalink
Merge branch 'develop' pre-release 2.1.0
Browse files Browse the repository at this point in the history
# Conflicts:
#	Myo Mapper/Builds/MacOSX/Myo Mapper.xcodeproj/project.pbxproj
#	README.md
  • Loading branch information
balandinodidonato committed Nov 14, 2016
2 parents b1b0c61 + 4862c46 commit 5532af4
Show file tree
Hide file tree
Showing 33 changed files with 302 additions and 285 deletions.
8 changes: 5 additions & 3 deletions Myo Mapper/Builds/MacOSX/Info-App.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.0.2</string>
<string>2.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2.0.2</string>
<string>2.1.0.13</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.music</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Integra Lab</string>
<string>Copyright © 2016 Balandino Di Donato</string>
</dict>
</plist>
64 changes: 56 additions & 8 deletions Myo Mapper/Builds/MacOSX/Myo Mapper.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion Myo Mapper/Myo Mapper.jucer
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<JUCERPROJECT id="m7UYPj" name="Myo Mapper" projectType="guiapp" version="1.0.0"
bundleIdentifier="com.yourcompany.MyoMapper" includeBinaryInAppConfig="1"
jucerVersion="4.2.4" companyName="Integra Lab" companyWebsite="http://integra.io/"
jucerVersion="4.3.0" companyName="Integra Lab" companyWebsite="http://integra.io/"
companyEmail="[email protected] ">
<MAINGROUP id="G7OLDm" name="Myo Mapper">
<GROUP id="{A855A8B0-1BF1-10A8-F066-98F2E790D7DC}" name="Source">
Expand Down Expand Up @@ -38,6 +38,13 @@
<FILE id="q0Or2R" name="rescale.cpp" compile="1" resource="0" file="Source/rescale.cpp"/>
<FILE id="DuDYqV" name="mav.h" compile="0" resource="0" file="Source/mav.h"/>
<FILE id="KlHUWG" name="mav.cpp" compile="1" resource="0" file="Source/mav.cpp"/>
<FILE id="iqYY9F" name="waveformLength.cpp" compile="1" resource="0"
file="Source/waveformLength.cpp"/>
<FILE id="I8qni4" name="waveformLength.h" compile="0" resource="0"
file="Source/waveformLength.h"/>
<FILE id="X3YNFS" name="ZeroCrossing.cpp" compile="1" resource="0"
file="Source/ZeroCrossing.cpp"/>
<FILE id="UdsBEv" name="ZeroCrossing.h" compile="0" resource="0" file="Source/ZeroCrossing.h"/>
</GROUP>
</MAINGROUP>
<EXPORTFORMATS>
Expand Down
10 changes: 0 additions & 10 deletions Myo Mapper/Source/AboutWindow.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
/*
==============================================================================
AboutWindow.cpp
Created: 18 Jun 2016 9:49:25am
Author: Balandino Di Donato
==============================================================================
*/

#include "../JuceLibraryCode/JuceHeader.h"
#include "AboutWindow.h"

Expand Down
10 changes: 0 additions & 10 deletions Myo Mapper/Source/AboutWindow.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
/*
==============================================================================
AboutWindow.h
Created: 18 Jun 2016 9:49:25am
Author: Balandino Di Donato
==============================================================================
*/

#ifndef ABOUTWINDOW_H_INCLUDED
#define ABOUTWINDOW_H_INCLUDED

Expand Down
10 changes: 0 additions & 10 deletions Myo Mapper/Source/AboutWindowContent.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
/*
==============================================================================
AboutWindow.cpp
Created: 20 Jun 2016 1:51:25pm
Author: Balandino Di Donato
==============================================================================
*/

#include "AboutWindowContent.h"

AboutWindowContent::AboutWindowContent ()
Expand Down
10 changes: 0 additions & 10 deletions Myo Mapper/Source/AboutWindowContent.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
/*
==============================================================================
AboutWindow.cpp
Created: 20 Jun 2016 1:51:25pm
Author: Balandino Di Donato
==============================================================================
*/

#ifndef __JUCE_HEADER_CDC82D17D8FC0FC8__
#define __JUCE_HEADER_CDC82D17D8FC0FC8__

Expand Down
10 changes: 0 additions & 10 deletions Myo Mapper/Source/HelpWindow.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
/*
==============================================================================
HelpWindow.cpp
Created: 18 Jun 2016 12:33:00pm
Author: Balandino Di Donato
==============================================================================
*/

#include "../JuceLibraryCode/JuceHeader.h"
#include "HelpWindow.h"

Expand Down
10 changes: 0 additions & 10 deletions Myo Mapper/Source/HelpWindow.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
/*
==============================================================================
HelpWindow.h
Created: 18 Jun 2016 12:33:00pm
Author: Balandino Di Donato
==============================================================================
*/

#ifndef HELPWINDOW_H_INCLUDED
#define HELPWINDOW_H_INCLUDED

Expand Down
13 changes: 1 addition & 12 deletions Myo Mapper/Source/MainComponent.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
/*
==============================================================================
MainComponent.cpp
Created: 9 Jun 2016 3:54:58pm
Author: Jamie Bullock
==============================================================================
*/

#include "MainComponent.h"

#include "MyoData.h"

MainComponent::MainComponent()
Expand Down Expand Up @@ -125,7 +114,7 @@ void MainComponent::timerCallback()
orientation.setValues(myoData[id].orientationRaw);
pose.setPoseLabel(myoData[id].pose+" - "+String(myoData[id].poseID));

osc.sendOSC(id, myoData[id].emgRaw, myoData[id].emgScaled, mav.getMav(), myoData[id].gyro, myoData[id].acceleration, myoData[id].orientationRaw, orientation.getValue(), myoData[id].pose, myoData[id].poseID);
osc.sendOSC(id, myoData[id].emgRaw, myoData[id].emgScaled, mav.getMav(), mav.getMavWl(), myoData[id].gyro, myoData[id].gyroWl, myoData[id].acceleration, myoData[id].accelerationWl, myoData[id].orientationRaw, orientation.getValue(), orientation.getWl(), myoData[id].pose, myoData[id].poseID);


if(osc.vibrate)
Expand Down
13 changes: 1 addition & 12 deletions Myo Mapper/Source/MainComponent.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
/*
==============================================================================
MainComponent.h
Created: 7 Jun 2016 1:14:39pm
Author: Balandino Di Donato
==============================================================================
*/

#ifndef MAINCOMPONENT_H_INCLUDED
#define MAINCOMPONENT_H_INCLUDED

Expand All @@ -19,7 +9,6 @@
#include "OSC.h"
#include "AboutWindow.h"
#include "HelpWindow.h"

#include "../JuceLibraryCode/JuceHeader.h"


Expand Down Expand Up @@ -78,4 +67,4 @@ class MainComponent : public Component,
};


#endif // MAINCOMPONENT_H_INCLUDED
#endif // MAINCOMPONENT_H_INCLUDED
12 changes: 2 additions & 10 deletions Myo Mapper/Source/MyoData.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
/*
==============================================================================
MyoData.h
Created: 10 Jun 2016 4:27:48pm
Author: Jamie Bullock
==============================================================================
*/

#ifndef MYODATA_H_INCLUDED
#define MYODATA_H_INCLUDED

Expand All @@ -18,7 +8,9 @@ struct MyoData
std::array<int8_t, 8> emgRaw;
std::array<float, 8> emgScaled;
Vector3D< float > gyro;
Vector3D< float > gyroWl;
Vector3D< float > acceleration;
Vector3D< float > accelerationWl;
Vector3D< float > orientationScaled;
Vector3D< float > orientationRaw;
String pose;
Expand Down
18 changes: 6 additions & 12 deletions Myo Mapper/Source/MyoListener.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
/*
==============================================================================
MyoListener.cpp
Created: 10 Jun 2016 11:54:24am
Author: Jamie Bullock
==============================================================================
*/

#include "MyoListener.h"
#include <array>
#include <iostream>
Expand All @@ -34,7 +24,6 @@ Pose("null")
{
}


void MyoListener::onConnect(myo::Myo* myo, uint64_t timestamp, myo::FirmwareVersion firmwareVersion)
{
knownMyos.push_back(myo);
Expand Down Expand Up @@ -112,6 +101,8 @@ void MyoListener::onAccelerometerData(myo::Myo* myo, uint64_t timestamp, const m
myoData[myoID].acceleration.x = accel.x();
myoData[myoID].acceleration.y = accel.y();
myoData[myoID].acceleration.z = accel.z();
accWl.set3DValue(myoData[myoID].acceleration);
myoData[myoID].accelerationWl = accWl.get3DValue();
}

void MyoListener::onGyroscopeData(myo::Myo* myo, uint64_t timestamp, const myo::Vector3<float>& gyro)
Expand All @@ -123,6 +114,9 @@ void MyoListener::onGyroscopeData(myo::Myo* myo, uint64_t timestamp, const myo::
myoData[myoID].gyro.x = gyro.x();
myoData[myoID].gyro.y = gyro.y();
myoData[myoID].gyro.z = gyro.z();
gyroWl.set3DValue(myoData[myoID].gyro);
myoData[myoID].gyroWl = gyroWl.get3DValue();

}


Expand Down Expand Up @@ -200,4 +194,4 @@ int MyoListener::getMyoID(myo::Myo* myo)
}

return -1;
}
}
7 changes: 5 additions & 2 deletions Myo Mapper/Source/MyoListener.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@

#include "myo/myo.hpp"
#include "orientation.h"

#include "waveformLength.h"
#include "MyoData.h"

#include <array>

class MyoListener : public myo::DeviceListener
Expand Down Expand Up @@ -66,6 +65,10 @@ class MyoListener : public myo::DeviceListener
String Pose;

int numberOfMyos;

WaveformLength accWl;
WaveformLength gyroWl;

};


Expand Down
12 changes: 1 addition & 11 deletions Myo Mapper/Source/MyoManager.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
/*
==============================================================================
MyoManager.cpp
Created: 10 Jun 2016 12:22:24pm
Author: Jamie Bullock
==============================================================================
*/

#include "MyoManager.h"
#include "MyoListener.h"

Expand Down Expand Up @@ -133,4 +123,4 @@ void MyoManager::vibrate(String VibrationType)
myo->vibrate(myo::Myo::vibrationMedium);
if(VibrationType == "short")
myo->vibrate(myo::Myo::vibrationShort);
}
}
10 changes: 0 additions & 10 deletions Myo Mapper/Source/MyoManager.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
/*
==============================================================================
MyoManager.h
Created: 10 Jun 2016 12:22:24pm
Author: Jamie Bullock
==============================================================================
*/

#ifndef MYOMANAGER_H_INCLUDED
#define MYOMANAGER_H_INCLUDED

Expand Down
37 changes: 21 additions & 16 deletions Myo Mapper/Source/OSC.cpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
/*
==============================================================================
OSC.cpp
Created: 14 Jun 2016 4:33:38pm
Author: Balandino Di Donato
==============================================================================
*/

#include "../JuceLibraryCode/JuceHeader.h"
#include "OSC.h"
#include "MyoData.h"

//==============================================================================
OSC::OSC()
:
vibrate(false),
Expand Down Expand Up @@ -77,24 +66,40 @@ void OSC::sendOSC(int id,
std::array<int8_t, 8> emgRaw,
std::array<float, 8> emgScaled,
float mav,
float mavWl,
Vector3D< float > gyro,
Vector3D< float > gyroWl,
Vector3D< float > acceleration,
Vector3D< float > accelerationWl,
Vector3D< float > orientationRaw,
Vector3D< float > orientationScaled,
Vector3D< float > orientationWl,
String pose,
int poseID
)
{
String ID = String (id);

sender.send ("/myo"+ID+"/emgRaw", (int) emgRaw[0], (int) emgRaw[1], (int) emgRaw[2], (int) emgRaw[3], (int) emgRaw[4], (int) emgRaw[5], (int) emgRaw[6], (int) emgRaw[7]);
sender.send ("/myo"+ID+"/emgScaled", (float) emgScaled[0], (float) emgScaled[1], (float) emgScaled[2], (float) emgScaled[3], (float) emgScaled[4], (float) emgScaled[5], (float) emgScaled[6], (float) emgScaled[7]);
sender.send("/myo"+ID+"/mav", (float) mav);
sender.send ("/myo"+ID+"/EMG", (int) emgRaw[0], (int) emgRaw[1], (int) emgRaw[2], (int) emgRaw[3], (int) emgRaw[4], (int) emgRaw[5], (int) emgRaw[6], (int) emgRaw[7]);
sender.send ("/myo"+ID+"/EMG/scaled", (float) emgScaled[0], (float) emgScaled[1], (float) emgScaled[2], (float) emgScaled[3], (float) emgScaled[4], (float) emgScaled[5], (float) emgScaled[6], (float) emgScaled[7]);
sender.send("/myo"+ID+"/EMGs/mav", (float) mav);
sender.send("/myo"+ID+"/EMGs/mav/wl", (float) mavWl);

sender.send("/myo"+ID+"/gyro", (float) gyro.x, (float) gyro.y, (float) gyro.z);
sender.send("/myo"+ID+"/gyro/wl", (float) gyroWl.x, (float) gyroWl.y, (float) gyroWl.z);

sender.send("/myo"+ID+"/acceleration", (float) acceleration.x, (float) acceleration.y, (float) acceleration.z);
sender.send("/myo"+ID+"/orientationRaw", (float) orientationRaw.x, (float) orientationRaw.y, (float) orientationRaw.z);
sender.send("/myo"+ID+"/orientationScaled", (float) orientationScaled.x, (float) orientationScaled.y, (float) orientationScaled.z);
sender.send("/myo"+ID+"/acceleration/wl", (float) accelerationWl.x, (float) accelerationWl.y, (float) accelerationWl.z);

sender.send("/myo"+ID+"/orientation", (float) orientationRaw.x, (float) orientationRaw.y, (float) orientationRaw.z);
sender.send("/myo"+ID+"/orientation/abs", (float) orientationScaled.x, (float) orientationScaled.y, (float) orientationScaled.z);
sender.send("/myo"+ID+"/orientation/wl", (float) orientationWl.x, (float) orientationWl.y, (float) orientationWl.z);

sender.send("/myo"+ID+"/pose", (int) poseID, (String) pose);

sender.send("/myo"+ID+"/all", (float) orientationScaled.x, (float) orientationScaled.y, (float) orientationScaled.z, (float) orientationWl.x, (float) orientationWl.y, (float) orientationWl.z, (float) acceleration.x, (float) acceleration.y, (float) acceleration.z, (float) accelerationWl.x, (float) accelerationWl.y, (float) accelerationWl.z, (float) gyro.x, (float) gyro.y, (float) gyro.z, (float) gyroWl.x, (float) gyroWl.y, (float) gyroWl.z, (float) mav, (float) mavWl);
sender.send("/myo"+ID+"/allEMG", (float) orientationScaled.x, (float) orientationScaled.y, (float) orientationScaled.z, (float) orientationWl.x, (float) orientationWl.y, (float) orientationWl.z, (float) acceleration.x, (float) acceleration.y, (float) acceleration.z, (float) accelerationWl.x, (float) accelerationWl.y, (float) accelerationWl.z, (float) gyro.x, (float) gyro.y, (float) gyro.z, (float) gyroWl.x, (float) gyroWl.y, (float) gyroWl.z, (float) mav, (float) mavWl, (float) emgScaled[0], (float) emgScaled[1], (float) emgScaled[2], (float) emgScaled[3], (float) emgScaled[4], (float) emgScaled[5], (float) emgScaled[6], (float) emgScaled[7]);

}

// ============== END SENDER ==============
Expand Down
Loading

0 comments on commit 5532af4

Please sign in to comment.