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

User configurable usermods. #1951

Merged
merged 4 commits into from
May 9, 2021

Conversation

blazoncek
Copy link
Collaborator

  • Utilizing addToConfig() & readFromConfig()
  • UM configuration Settings page
  • MQTT support for usermods
  • A few sample usermods including rewritten Temparature and new Multi-Relay, enhanced Four Line Display, Auto Save and PIR sensor switch.

blazoncek and others added 3 commits May 7, 2021 12:41
- Utilizing addToConfig() & readFromConfig()
- UM configuration Settings page
- MQTT support for usermods
- A few sample usermods including rewritten Temparature and new Multi-Relay
@Aircoookie
Copy link
Owner

A lot of great additions in this one!
I slightly adjusted the button sizes in the settings, so there is no scrollbar with the new extra button.
Just as a heads up, changes to wled_server.cpp and set.cpp were missing in this PR, I pulled them manually from your dev. Verified working with the Temperature usermod :)

virtual uint16_t getId() {return USERMOD_ID_UNSPECIFIED;}
};

class UsermodManager {
class UsermodManager : public Usermod {
Copy link
Owner

Choose a reason for hiding this comment

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

What is the reason you want UsermodManager to be a child class of Usermod?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was trying to get virtual functions propagate to UsermodManager (since I'm still not very good at OOP).
It has no added value and can be removed (to a previous no parent-child relationship).

@blazoncek
Copy link
Collaborator Author

Just as a heads up, changes to wled_server.cpp and set.cpp were missing in this PR, I pulled them manually from your dev. Verified working with the Temperature usermod :)

I knew I'd screw up eventually. :) I am so pushing forward that I always have to edit a few things manually before creating a PR. I am happy that you managed to overcome my sloppiness.

@Aircoookie Aircoookie merged commit 119826c into Aircoookie:master May 9, 2021
@blazoncek
Copy link
Collaborator Author

I have updated MQTT handling since payload is often not null terminated.

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