Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enabledChanged/isEnabled and connectedChanged/isConnected + setOn/Off #21

Merged
merged 1 commit into from
Aug 12, 2023

Conversation

ewoudwijma
Copy link
Collaborator

pio.ini: enable artnet and ddp

Module.h

  • rename enabled to isEnabled
  • refactor event functions enabledChanged and connectedChanged

SysModModules

  • rename Modules class to SysModModules
  • add isConnected
  • mdlEnabled: check of value.size same as nrOfModules otherwise recreate
  • rename connected() to connectedChanged()

SysModWeb

  • connectedChanged: only addhandlers if isConnected (tbd: disable???)

UserModArtNet and DDP

  • disabled by default (in constructor)
  • connectedChanged commented! (as main checks if connected)

UserModE131

  • disabled by default (in constructor)
  • connectedChanged and enabledChanged call setOn and setOff (tbd setoff!)

UserModHA (not included in built yet)

  • disabled by default (in constructor)
  • connectedChanged; tbd if disconnected, and move to setOn and setOff (see E131)

pio.ini: enable artnet and ddp

Module.h
- rename enabled to isEnabled
- refactor event functions enabledChanged and connectedChanged

SysModModules
- rename Modules class to SysModModules
- add isConnected
- mdlEnabled: check of value.size same as nrOfModules otherwise recreate
- rename connected() to connectedChanged()

SysModWeb
- connectedChanged: only addhandlers if isConnected (tbd: disable???)

UserModArtNet and DDP
- disabled by default (in constructor)
- connectedChanged commented! (as main checks if connected)

UserModE131
- disabled by default (in constructor)
- connectedChanged and enabledChanged call setOn and setOff (tbd setoff!)

 UserModHA (not included in built yet)
- disabled by default (in constructor)
- connectedChanged; tbd if disconnected, and move to setOn and setOff (see E131)
@ewowi
Copy link
Owner

ewowi commented Aug 9, 2023

Implement model which deals with connected goes on or off and enabled goes on or off.
Based on combination of a trigger function (e.g. enabledChanged) and a boolean (eg isEnabled)

Modules catches these functions and can use it to setOn or setOff their functionality.

@ewoudwijma ewoudwijma merged commit a44e461 into main Aug 12, 2023
1 check passed
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.

3 participants