- There were issues with Browserify-ing the library, specifically in regards to the
ws
lib - Removing the explicit dependacy on the
ws
lib, since it's not needed if the library is being used client-side - If developing in node, you must pass in
ws
as a second parameter onmyo.connect
- Added warnings explaining how to solve them if the lib is not provided.
- Fixed pairing to avoid duplicated myo on reconnect (Thanks u/Ucodia!)
- Updated
ws
lib to work with node v6 and higher (Thanks u/JoshuaJi!)
- Added an appId query param to the web socket. This can be set through the
Myo.connect(APP_ID)
command and is stored atMyo.defaults.app_id
. This app id is to help Thalmic track usage stats from different apps and to help us a bit with reporting if there's issues. If no appId is provided it will default tocom.myojs.default
, so this change won't break current applications using Myo.js
- Added the ability to pass
false
to.off()
to remove all events
- Left out
.requestBatteryLevel()
during the v2 overhaul
- Dramatically changed the way Myo.js creates myo instances. No more code needed! The library will create the instances for you as they are paired.
- Hiding the need for the developer to worry about the Myo index value in Myo Connect. Myo.js now uses mac addresses as the main form of Myo id
- Renamed
Myo.initSocket()
toMyo.connect()
and addedMyo.disconnect()
to close the web socket - Renamed
Myo.options
toMyo.defaults
- Removed
myo.timer()
- Fixed
myo.setLockingPolicy()
and moved it onto the core objectMyo
, since it controls the locking policy for all Myos. - Simplified the
myo.unlock()
command. Now takes a single boolean parameter to toggle betwen doing a timed unlock or a held unlock. - Pose events now implicitly call
.unlock(true)
while held and.unlock()
on release, if locking policy isstandard
. This mimics the behaviour of most other Myo apps. - Removed
rest
from being a pose - Removed edges from pose events. Added
_off
events to replace it. eg.fist
andfist_off
,pose
andpose_off
- Adding events for when the socket is ready and when the socket has closed.
ready
andsocket_closed
respectively - Now tracking battery level on the Myo instance.
myo.batteryLevel
- Added
.off()
to the core Myo object to turn off global events. myo.off()
now returns the Myo instance for chaining.- Now tracking warmup state on the myo instance.
myo.warmupState
- Fires event of
warmup_completed
when the myo has fully warmed up. bluetooth_strength
event now emits a percentage.- Added a
rssi
event that emits the dBm of the bluetooth signal. - Created a
methods
object on the Myo library to let developers add custom functions to myo instances. This object will be used as the prototype of all myo instances. - Modifed the parameters on the
Myo.create()
call. It's also now not needed, but leaving it exposed for other add-ons to use. - Added a
myo.synced
flag to easily see which myos are synced with an arm or not.
- Added a
Myo.onError
function you can overwrite which will trigger if Myo.js can't make a connection with Myo Connect. - Creating mutliple instances of a myo with the same id won't clobber connection information now.
- Adding a new
status
event that gets triggered for any non-pose, non-IMU, and non-EMG event from the Myo. Useful for debug windows. This will also future-proof the library if new Myo Connect events get added. - On connect Myo.js now merges in all values from the data packet into the myo object. This is to future-proof additional properities Myo Connect may return.
- The catch-all event
*
now doesn't modify the arguments object.
- Moved repo and npm module over to ThalmicLabs
- Improved the doc structure (again)
- Moved the existing issues over
- Updated the locking policy (thanks andrebower!)
- Added better quaternion math (thanks freehaha!)
- Better doc structure
- Merged in BrianHeese's pull request for the locking policy change (thanks!)
- Added raw EMG support!
- Added a new EMG example
- Happy Holidays!
- Added a second data parameter to most events
- Added a nice example showing off graphing IMU data and event streams
- Removed the empty Myo.ui stuff
- Renamed
arm_recognized
event toarm_synced
- Renamed
arm_lost
event toarm_unsynced
- Updated
Myo.options.api_version
to3
to work with the newly released firmware.
- Renamed
Myo.start()
toMyo.initSocket()
- Myo.js now tries to create the socket when you create Myo instances. This allows developers to modify
Myo.options
before the socket is created. Useful for controlling API versions. - Added error handling messages on the socket.
- Updated
Myo.options.api_version
to2
to work with the newly released firmware.