EmotiBit / ofxEmotiBit

OpenFrameworks library and examples for the EmotiBit
MIT License
34 stars 8 forks source link

Added advertising control to set unicast pacing #174

Closed produceconsumerobot closed 1 year ago

produceconsumerobot commented 1 year ago

Description

Advertising is on a separate thread and has timers that can be set in emotibitCommsSettings.json

Requirements

Issues Referenced

Documentation update

Documentation update is short-term optional, but needs to be added to the roadmap

Testing

Checklist:

Screenshots:

nitin710 commented 1 year ago

testing on windows

nitin710 commented 1 year ago

testing on macos

nitin710 commented 1 year ago

bug fix https://github.com/EmotiBit/ofxEmotiBit/commit/a3d2d9b5b426b0d52c20a58be1ec97ff349ac255 Weird behavior found: with

          "enabled": true,
          "ipMax": 254,
          "ipMin": 250,
          "nUnicastIpsPerLoop": 3,
          "unicastMinLoopDelay_msec": 50

The unicast is missing pinging certain IP addresses. notice below, xxx.xxx.xxx.250 is missed in attempt 2, and xxx,xxx,xxx,250 $ xxx,xxx,xxx,251 are missed in attempt 3 image image

nitin710 commented 1 year ago

testing on linux

nitin710 commented 1 year ago

bug fix explanation for https://github.com/EmotiBit/ofxEmotiBit/pull/174/commits/a3d2d9b5b426b0d52c20a58be1ec97ff349ac255

case

"ipMax": 254,
"ipMin": 250,
"nUnicastIpsPerLoop": 3,
after reaching ip: 254, the variable is updated sendInProgress = false; which disables advertisement. Cycle\IP address 250 251 252 253 254 250 251 252
0 tx tx tx - - - -
1 - - - tx tx no tx -
2 - tx tx tx - -
3 - - - - tx no tx no tx
4 - - tx tx tx