Skip to content

EmotiBit is identified by device Serial Number on Oscilloscope#188

Merged
nitin710 merged 8 commits intomasterfrom
feat-emotibitDeviceId
Apr 6, 2023
Merged

EmotiBit is identified by device Serial Number on Oscilloscope#188
nitin710 merged 8 commits intomasterfrom
feat-emotibitDeviceId

Conversation

@nitin710
Copy link
Collaborator

@nitin710 nitin710 commented Mar 21, 2023

Description

  • The EmotiBits can now be identified by the EmotiBit serial number (unique to every emotibit) on the oscilloscope

Requirements

Non-dependent requirements

To test the functionality, you will also need to flash the EmotiBit with the FW linked in the PR below.

Issues Referenced

  • None

Documentation update

  • None

Code change explained

  • The flow of information is shown below
    • EmotiBit -> EmotiBitWiFiHost (Oscilloscope) -> EmotiBit Oscilloscope (ofApp) -> GUI
  • Since the EmotiBit info data enters the Oscilloscope via WiFiHost, a new map has been created to store EmotiBit Info.
    • unordered_map<string, EmotibitInfo> _discoveredEmotibits;
  • New EmotiBits when discovered are added to this data structure.
  • If the EmotiBit transmits a device ID, then that is used as the "key". If no device ID is found, then the IP address is used as the key.
    • Example:
    • _discoveredEmotibits[192.168.1.100] = {IP address, availability, lastSeen} (for old firmware)
    • _discoveredEmotibits[MD-V5-0000100] = {IP address, availability, lastSeen} (for new firmware)
  • This data structure also allows extensibility, as it can hold additional information about EmotiBits on network like name, Fs. FW version etc.
  • The structure is updated periodically by the advertising channel (thread).
  • The structure is then pulled by the ofApp, where the "key" is used to populate the deviceGroup list.

Testing

Test Configuration:

  • Firmware version:
  • Hardware:
  • EmotiBit software version
Test Result Link

Checklist to allow merge

  • All dependent repositories used were on branch master
  • Software
    • Passed testing on Windows
    • Passed testing on macOS
    • Passed testing on linux (ubuntu)
  • Firmware
    • Set testingMode to TestingMode::NONE
    • Set const bool DIGITAL_WRITE_DEBUG = false (if set true while testing)
    • Update version in EmotiBit.h
    • Update library.properties to the correct version (should match EmotiBit.h)
  • reset log_level
  • Update software bundle version in ofxEmotiBitVersion.h
  • doxygen style comments included for new code snippets
  • Required documentation udpated

Screenshots:

image

@nitin710 nitin710 changed the title EmotiBit is identified by device ID on Oscilloscope EmotiBit is identified by device Serial number on Oscilloscope Mar 21, 2023
@nitin710 nitin710 changed the title EmotiBit is identified by device Serial number on Oscilloscope EmotiBit is identified by device Serial Number on Oscilloscope Mar 21, 2023
Copy link
Collaborator

@produceconsumerobot produceconsumerobot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review 01

Code review complete.
I'd prefer to see references to IP address removed from ofApp

@nitin710
Copy link
Collaborator Author

nitin710 commented Apr 6, 2023

Merging to master as approved here: EmotiBit/EmotiBit_FeatherWing#264 (comment)

@nitin710 nitin710 merged commit 9080f7c into master Apr 6, 2023
@nitin710 nitin710 deleted the feat-emotibitDeviceId branch May 11, 2023 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants