Skip to content

Commit

Permalink
0.14.0-b15.21 release!
Browse files Browse the repository at this point in the history
  • Loading branch information
ewoudwijma committed Apr 2, 2023
1 parent 11a02bb commit eead626
Show file tree
Hide file tree
Showing 12 changed files with 1,350 additions and 1,340 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wled",
"version": "0.14.0-b2.20",
"version": "0.14.0-b15.21",
"description": "Tools for WLED project",
"main": "tools/cdata.js",
"directories": {
Expand Down
44 changes: 27 additions & 17 deletions usermods/EXAMPLE_v2/usermod_v2_example.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,32 @@
* 2. Register the usermod by adding #include "usermod_filename.h" in the top and registerUsermod(new MyUsermodClass()) in the bottom of usermods_list.cpp
*/

/* WLEDMM: move usermod variables to class.
As of March 2023 this is work in progress, more variables will be moved in the future.
See Example v2, Temperature, MPU6050 and weather and fastled (rest to be done) as examples which has been converted using the steps below:
Part 1
- remove bool enabled = false/true (now default false)
- remove static const char _name[] and _enabled[]
- add constructor which calls superclass (temp?): XXXUsermod(const char *name, bool enabled):Usermod(name, enabled) {}
- replace _enabled with "enabled"
- remove const char PROGMEM init for _name[] and _enabled[]
Part 2
- Remove bool initDone = false;
- addToConfig: replace createNestedObject with Usermod::addToConfig(root); JsonObject top = root[FPSTR(_name)];
- readFromConfig: replace !top.isNull and enabled with bool configComplete = Usermod::readFromConfig(root);JsonObject top = root[FPSTR(_name)];
Part 3
- remove unsigned long lastTime = 0; //WLEDMM
*/

//class name. Use something descriptive and leave the ": public Usermod" part :)
class MyExampleUsermod : public Usermod {

private:

// Private class members. You can declare variables and functions only accessible to your usermod here
bool enabled = false;
bool initDone = false;
unsigned long lastTime = 0;

// set your config variables to their boot default value (this can also be done in readFromConfig() or a constructor if you prefer)
bool testBool = false;
Expand All @@ -41,28 +58,25 @@ class MyExampleUsermod : public Usermod {
long testLong;
int8_t testPins[2];

// string that are used multiple time (this will save some flash memory)
static const char _name[];
static const char _enabled[];


// any private methods should go here (non-inline methosd should be defined out of class)
void publishMqtt(const char* state, bool retain = false); // example for publishing MQTT message


public:

MyExampleUsermod(const char *name, bool enabled):Usermod(name, enabled) {} //WLEDMM

// non WLED related methods, may be used for data exchange between usermods (non-inline methods should be defined out of class)

/**
* Enable/Disable the usermod
*/
inline void enable(bool enable) { enabled = enable; }
// inline void enable(bool enable) { enabled = enable; }

/**
* Get usermod enabled/disabled state
*/
inline bool isEnabled() { return enabled; }
// inline bool isEnabled() { return enabled; }

// in such case add the following to another usermod:
// in private vars:
Expand Down Expand Up @@ -222,8 +236,8 @@ class MyExampleUsermod : public Usermod {
*/
void addToConfig(JsonObject& root)
{
JsonObject top = root.createNestedObject(FPSTR(_name));
top[FPSTR(_enabled)] = enabled;
Usermod::addToConfig(root); JsonObject top = root[FPSTR(_name)]; //WLEDMM

//save these vars persistently whenever settings are saved
top["great"] = userVar0;
top["testBool"] = testBool;
Expand Down Expand Up @@ -258,9 +272,7 @@ class MyExampleUsermod : public Usermod {
// default settings values could be set here (or below using the 3-argument getJsonValue()) instead of in the class definition or constructor
// setting them inside readFromConfig() is slightly more robust, handling the rare but plausible use case of single value being missing after boot (e.g. if the cfg.json was manually edited and a value was removed)

JsonObject top = root[FPSTR(_name)];

bool configComplete = !top.isNull();
bool configComplete = Usermod::readFromConfig(root);JsonObject top = root[FPSTR(_name)]; //WLEDMM

configComplete &= getJsonValue(top["great"], userVar0);
configComplete &= getJsonValue(top["testBool"], testBool);
Expand Down Expand Up @@ -386,8 +398,6 @@ class MyExampleUsermod : public Usermod {


// add more strings here to reduce flash memory usage
const char MyExampleUsermod::_name[] PROGMEM = "ExampleUsermod";
const char MyExampleUsermod::_enabled[] PROGMEM = "enabled";


// implementation of non-inline member methods
Expand Down
4 changes: 2 additions & 2 deletions usermods/multi_relay/usermod_multi_relay.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ class MultiRelay : public Usermod {
/**
* Enable/Disable the usermod
*/
inline void enable(bool enable) { enabled = enable; }
// inline void enable(bool enable) { enabled = enable; }
/**
* Get usermod enabled/disabled state
*/
inline bool isEnabled() { return enabled; }
// inline bool isEnabled() { return enabled; }

/**
* switch relay on/off
Expand Down
3 changes: 1 addition & 2 deletions usermods/usermod_v2_weather/usermod_v2_weather.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ uint16_t mode_2DWeather(void) {
return FRAMETIME;
}

static const char _data_FX_MODE_2DWEATHER[] PROGMEM = "Weather ☾@;!;!;2;pal=54"; //temperature palette
static const char _data_FX_MODE_2DWEATHER[] PROGMEM = "🌦Weather ☾@;!;!;2;pal=54"; //temperature palette

//utility function, move somewhere else???
void epochToString(time_t time, char *timeString) {
Expand Down Expand Up @@ -144,7 +144,6 @@ class WeatherUsermod : public Usermod {
// strings to reduce flash memory usage (used more than twice)
String apiKey = ""; //config var

unsigned long lastTime = 0; //will be used to download new forecast every hour
char errorMessage[100] = "";
bool isConnected = false; //only call openweathermap if connected

Expand Down
2 changes: 1 addition & 1 deletion wled00/data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ function populateInfo(i)
if (i.ver.includes("0.14.1")) vcn = "Sitting Ducks"; // easter egg
if (i.ver.includes("0.14.0")) vcn = "Lupo"; // check for MM versioning scheme
if (i.ver.includes("0.14.0-b2.2")) vcn = "Sitting Ducks"; // early easter egg
if (i.ver.includes("0.14.0-b2.20")) vcn = "Lupo";
if (i.ver.includes("0.14.0-b15.21")) vcn = "Lupo";
cn += `v${i.ver} &nbsp;<i>"${vcn}"</i><p>(WLEDMM_${i.ver} ${i.rel}.bin)</p><p><em>build ${i.vid}</em></p><table>
${urows}
${urows===""?'':'<tr><td colspan=2><hr style="height:1px;border-width:0;color:SeaGreen;background-color:Seagreen"></td></tr>'}
Expand Down
1 change: 1 addition & 0 deletions wled00/fcn_declare.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ class Usermod {
bool enabled = false; //WLEDMM
const char *_name; //WLEDMM
bool initDone = false; //WLEDMM
unsigned long lastTime = 0; //WLEDMM
public:
Usermod(const char *_name = nullptr, bool enabled=false) { um_data = nullptr; this->_name = _name; this->enabled=enabled;}
virtual ~Usermod() { if (um_data) delete um_data; }
Expand Down
76 changes: 38 additions & 38 deletions wled00/html_other.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,46 +41,46 @@ const char PAGE_dmxmap[] PROGMEM = R"=====()=====";
#endif

// Autogenerated from wled00/data/update.htm, do not edit!!
const uint16_t PAGE_update_length = 605;
const uint16_t PAGE_update_length = 606;
const uint8_t PAGE_update[] PROGMEM = {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x75, 0x53, 0xd1, 0x6e, 0xd3, 0x30,
0x14, 0x7d, 0xcf, 0x57, 0x78, 0x7e, 0x6a, 0x25, 0xea, 0x8c, 0x89, 0x17, 0x46, 0x92, 0xa1, 0xb2,
0x09, 0x21, 0x31, 0x6d, 0xd2, 0x36, 0x10, 0x4f, 0xc8, 0x89, 0x6f, 0x12, 0x53, 0xc7, 0xce, 0xec,
0x9b, 0x56, 0xd5, 0xb4, 0x7f, 0xe7, 0xda, 0x69, 0x07, 0xd2, 0xe0, 0x25, 0xaa, 0xe3, 0x73, 0x4f,
0xcf, 0x3d, 0xe7, 0xa4, 0x38, 0xb9, 0xbc, 0xf9, 0x74, 0xff, 0xe3, 0xf6, 0x8a, 0xf5, 0x38, 0x98,
0xaa, 0x38, 0x3c, 0x41, 0xaa, 0xaa, 0x18, 0x00, 0x25, 0x6b, 0x9c, 0x45, 0xb0, 0x58, 0xf2, 0x9d,
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x75, 0x53, 0xc1, 0x6e, 0xd4, 0x30,
0x14, 0xbc, 0xe7, 0x2b, 0x5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 0xfe, 0x23, 0x11, 0x3d, 0x11, 0xa1, 0xd7, 0x60, 0x54, 0x10, 0xda, 0x1d, 0x78, 0x8f,
0x14, 0x2f, 0xb8, 0x45, 0xd8, 0x76, 0x97, 0xc9, 0xf9, 0xb2, 0x25, 0x91, 0xab, 0xf0, 0x38, 0x91,
0x9b, 0xb1, 0x9f, 0xb9, 0x4c, 0x6b, 0x14, 0xda, 0x8e, 0x13, 0xb2, 0xd9, 0xa2, 0x56, 0x1b, 0x38,
0x76, 0xf9, 0x68, 0xa4, 0x87, 0xc7, 0x49, 0x7b, 0x50, 0x33, 0xba, 0x9e, 0x10, 0xa9, 0x8e, 0x33,
0x7c, 0xb6, 0x8e, 0xc8, 0xe6, 0x70, 0x4e, 0x8a, 0x7c, 0x7e, 0xfd, 0x0f, 0xe8, 0x7c, 0x88, 0x7e,
0x37, 0x46, 0x37, 0x9b, 0x92, 0xaf, 0xa3, 0xdd, 0x6b, 0x6a, 0xf9, 0x9f, 0xa1, 0x94, 0x4b, 0x55,
0x28, 0xbd, 0xcd, 0x52, 0x7c, 0xb1, 0xa3, 0x44, 0x53, 0x25, 0x76, 0x2a, 0x9e, 0x10, 0x82, 0xc0,
0x89, 0xfc, 0x36, 0x6d, 0xcb, 0x94, 0x63, 0xd6, 0x21, 0xe5, 0xe5, 0xe8, 0xe0, 0x3c, 0x69, 0x6d,
0x3d, 0x84, 0x3e, 0x45, 0x32, 0xca, 0x0e, 0xd8, 0xc5, 0xb2, 0xc8, 0x89, 0x2f, 0xae, 0x1b, 0x0b,
0x17, 0xdb, 0x17, 0x7f, 0xeb, 0xdf, 0x2e, 0x45, 0x6b, 0xaa, 0xec, 0x03, 0x00, 0x00
};


Expand Down
Loading

0 comments on commit eead626

Please sign in to comment.