Skip to content

Commit

Permalink
Add multiple fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerdiyde committed Nov 23, 2021
1 parent 1887f5b commit 79d1744
Show file tree
Hide file tree
Showing 58 changed files with 2,577 additions and 1,417 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Changelog
### 0.2.1
#### Feature:
- Extend "bar-graph"-feature by an additional parameter to make the "display-direction" selectable
- Extend "bar-graph"-feature by an additional paramater to make the "display-direction" selectable
### 0.2
#### Feature:
- Add functionality to display "bar-graph"-values via command "pbbar"
Expand Down
2 changes: 1 addition & 1 deletion PCB/infos.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Additonal build isntructions:
Additonal build instructions:
English: https://nerdiy.de/en/howto-pcb-pxlblck_multipcb/
German: https://nerdiy.de/howto-pcb-pxlblck_multipcb/

Expand Down
Binary file not shown.
Binary file not shown.
70 changes: 47 additions & 23 deletions plugin/ESPEasy/_P205_pxlBlck.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1848,6 +1848,7 @@ struct P205_data_struct : public PluginTaskData_base
case PXLBLCK_DIAL_NAME_RINGGCLOCK_DIAL_ID_INT:
{
//this dial shows the ringclock dial
colorFourTemp = pxlBlckUtils_add_brightness_to_color(Plugin_205_ringclockHourMarksBrightness, Plugin_205_minimalBrightness, Plugin_205_colorFour); //in case of the ringClock dial we have a seperate brightness setting for the hands brightness,
pxlBlckUtils_clear_matrix();
Plugin_205_show_dial_ringClock(hours, minutes, seconds, colorOneTemp, colorTwoTemp, colorThreeTemp, colorFourTemp, Plugin_205_twentyFourHr_mode_activated);
pxlBlckUtils_update_matrix();
Expand Down Expand Up @@ -3828,8 +3829,6 @@ struct P205_data_struct : public PluginTaskData_base
log += String(outDelay);
addLog(LOG_LEVEL_DEBUG, log);

Serial.println("Here1");

int8_t x = 0;
//if there is also a text displayed the number of steps for moving out the display-content needs to be increased depending on the number of characters of the displayed text
int16_t limit = (PXLBLCK_ICON_STRUCT.textThatFollows.length() > 1) ? (0 - (PXLBLCK_ICON_WIDTH + (PXLBLCK_ICON_STRUCT.textThatFollows.length() * 6) + 1)) : (0 - PXLBLCK_ICON_WIDTH);
Expand Down Expand Up @@ -5258,7 +5257,7 @@ boolean Plugin_205(byte function, struct EventStruct * event, String & string)
}
addLog(LOG_LEVEL_DEBUG, log);

addFormSelector(F("Dial version"), F(PXLBLCK_WEBSERVER_FORM_ID_DIAL), possibleDialValueLength, possibleDials, possibleDialsValues, Plugin_205_selectedDial, true);
addFormSelector(F("Dial type"), F(PXLBLCK_WEBSERVER_FORM_ID_DIAL), possibleDialValueLength, possibleDials, possibleDialsValues, Plugin_205_selectedDial, true);
addFormNote(F("Select the dial that will be used to display time."));

//=== preparing the available dials for the selected Plugin_205_selectedMatrixId === end ==
Expand Down Expand Up @@ -5312,8 +5311,12 @@ boolean Plugin_205(byte function, struct EventStruct * event, String & string)
addFormNote(F("Enabling display of leading Zeros."));
}

addFormCheckBox(F("24-hour-mode enabled"), F(PXLBLCK_WEBSERVER_FORM_ID_TWENTY_FOUR_HR_MODE_ENABLED), Plugin_205_twentyFourHr_mode_activated);
addFormNote(F("Display time using 24hrs instead of 12hrs."));
//support the following option only for dials that support 24hr mode
if (Plugin_205_selectedDial != PXLBLCK_DIAL_NAME_WORDCLOCK_DIAL_ID_INT)
{
addFormCheckBox(F("24-hour-mode enabled"), F(PXLBLCK_WEBSERVER_FORM_ID_TWENTY_FOUR_HR_MODE_ENABLED), Plugin_205_twentyFourHr_mode_activated);
addFormNote(F("Display time using 24hrs instead of 12hrs."));
}

//General form parts
addFormNumericBox(F("Display brightness"), F(PXLBLCK_WEBSERVER_FORM_ID_BRIGHTNESS), Plugin_205_displayBrightness, 0, PXLBLCK_MAX_SETABLE_BRIGHTNESS);
Expand Down Expand Up @@ -5781,7 +5784,6 @@ boolean Plugin_205(byte function, struct EventStruct * event, String & string)
Plugin_205_matrixArrangement,
PXLBLCK_LED_COLOR_ORDER +
NEO_KHZ800);
String log = F("pxlBlck : Here1: ");
addLog(LOG_LEVEL_INFO, log);
}
else
Expand All @@ -5797,7 +5799,7 @@ boolean Plugin_205(byte function, struct EventStruct * event, String & string)
PXLBLCK_LED_COLOR_ORDER +
NEO_KHZ800 +
Plugin_205_matrixTileArrangement);
String log = F("pxlBlck : Here2: ");

addLog(LOG_LEVEL_INFO, log);
}

Expand Down Expand Up @@ -6629,19 +6631,33 @@ boolean Plugin_205(byte function, struct EventStruct * event, String & string)
uint8_t anim_blue_off = 0;
uint8_t anim_mode = 1;
uint16_t anim_delay = PXLBLCK_COMMAND_ANIMATION_STANDARD_TIME;


#define ANIMATION_MAX_DURATION 1000
#define ANIMATION_MIN_DURATION 10
#define ANIMATION_MAX_ID 7
#define ANIMATION_MIN_ID 0
#define ANIMATION_STANDARD_ID 1
#define ANIMATION_MAX_COLOR_BRIGHTNESS 255
#define ANIMATION_MIN_COLOR_BRIGHTNESS 0

if (param1 != "")
{
if (param1.toInt() > 0 && param1.toInt() <= 7)

anim_delay = (param1.toInt() > 0 && param1.toInt() <= ANIMATION_MAX_ID) ? param1.toInt() : ANIMATION_STANDARD_ID;
/*if (param1.toInt() > 0 && param1.toInt() <= ANIMATION_MAX_ID)
{
anim_mode = param1.toInt();
}
else
{
anim_mode = 1;
}
}*/
}
if (param2 != "")
{
anim_red_on = (param2.toInt() >= ANIMATION_MIN_COLOR_BRIGHTNESS && param2.toInt() <= ANIMATION_MAX_COLOR_BRIGHTNESS) ? param2.toInt() : ANIMATION_MAX_COLOR_BRIGHTNESS;
/*
int r = param2.toInt();
if (r > -1 && r < 255)
{
Expand All @@ -6650,80 +6666,88 @@ boolean Plugin_205(byte function, struct EventStruct * event, String & string)
else
{
anim_red_on = 255;
}
}*/
}
if (param3 != "")
{
int g = param3.toInt();
anim_green_on = (param3.toInt() >= ANIMATION_MIN_COLOR_BRIGHTNESS && param3.toInt() <= ANIMATION_MAX_COLOR_BRIGHTNESS) ? param3.toInt() : ANIMATION_MAX_COLOR_BRIGHTNESS;
/*int g = param3.toInt();
if (g > -1 && g < 255)
{
anim_green_on = g;
}
else
{
anim_green_on = 255;
}
}*/
}
if (param4 != "")
{
int b = param4.toInt();
anim_blue_on = (param4.toInt() >= ANIMATION_MIN_COLOR_BRIGHTNESS && param4.toInt() <= ANIMATION_MAX_COLOR_BRIGHTNESS) ? param4.toInt() : ANIMATION_MAX_COLOR_BRIGHTNESS;
/*int b = param4.toInt();
if (b > -1 && b < 255)
{
anim_blue_on = b;
}
else
{
anim_blue_on = 255;
}
}*/
}

if (param5 != "")
{
int r = param5.toInt();
anim_red_off = (param5.toInt() >= ANIMATION_MIN_COLOR_BRIGHTNESS && param5.toInt() <= ANIMATION_MAX_COLOR_BRIGHTNESS) ? param5.toInt() : ANIMATION_MAX_COLOR_BRIGHTNESS;
/*int r = param5.toInt();
if (r > -1 && r < 255)
{
anim_red_off = r;
}
else
{
anim_red_off = 255;
}
}*/
}
if (param6 != "")
{
int g = param6.toInt();
anim_green_off = (param6.toInt() >= ANIMATION_MIN_COLOR_BRIGHTNESS && param6.toInt() <= ANIMATION_MAX_COLOR_BRIGHTNESS) ? param6.toInt() : ANIMATION_MAX_COLOR_BRIGHTNESS;
/*int g = param6.toInt();
if (g > -1 && g < 255)
{
anim_green_off = g;
}
else
{
anim_green_off = 255;
}
}*/
}
if (param7 != "")
{
int b = param7.toInt();
anim_blue_off = (param7.toInt() >= ANIMATION_MIN_COLOR_BRIGHTNESS && param7.toInt() <= ANIMATION_MAX_COLOR_BRIGHTNESS) ? param7.toInt() : ANIMATION_MAX_COLOR_BRIGHTNESS;
/*int b = param7.toInt();
if (b > -1 && b < 255)
{
anim_blue_off = b;
}
else
{
anim_blue_off = 255;
}
}*/
}
if (param8 != "")
{
int b = param8.toInt();
if (b > 10 && b < 1000)
//int b = param8.toInt();
anim_delay = (param8.toInt() >= ANIMATION_MIN_DURATION && param8.toInt() <= ANIMATION_MAX_DURATION) ? param8.toInt() : ANIMATION_MIN_DURATION;


/*if (b > 10 && b < 1000)
{
anim_delay = b;
}
else
{
anim_delay = 1000;
}
}*/
}

switch (anim_mode)
Expand Down
29 changes: 0 additions & 29 deletions plugin/ESPEasy/_P206_PCF8575.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,6 @@
#include "src/DataStructs/PinMode.h"
#include "src/Commands/GPIO.h"

// #######################################################################################################
// #################################### Plugin : PCF8575 ##############################################
// #######################################################################################################

/**************************************************\
CONFIG
TaskDevicePluginConfig settings:
0: send boot state (true,false)
1:
2:
3:
4: use doubleclick (0,1,2,3)
5: use longpress (0,1,2,3)
6: LP fired (true,false)
7: doubleclick counter (=0,1,2,3)
TaskDevicePluginConfigFloat settings:
0: debounce interval ms
1: doubleclick interval ms
2: longpress interval ms
3: use safebutton (=0,1)
TaskDevicePluginConfigLong settings:
0: clickTime debounce ms
1: clickTime doubleclick ms
2: clickTime longpress ms
3: safebutton counter (=0,1)
\**************************************************/

#define PLUGIN_206
#define PLUGIN_ID_206 206
#define PLUGIN_NAME_206 "GPIO Ext. - PCF8575"
Expand Down
13 changes: 0 additions & 13 deletions plugin/libraries/AS_BH1750/.gitignore

This file was deleted.

46 changes: 0 additions & 46 deletions plugin/libraries/Adafruit_BME680/.github/ISSUE_TEMPLATE.md

This file was deleted.

26 changes: 0 additions & 26 deletions plugin/libraries/Adafruit_BME680/.github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

32 changes: 0 additions & 32 deletions plugin/libraries/Adafruit_BME680/.github/workflows/githubci.yml

This file was deleted.

9 changes: 0 additions & 9 deletions plugin/libraries/Adafruit_BME680/.gitignore

This file was deleted.

Loading

0 comments on commit 79d1744

Please sign in to comment.