Skip to content

Commit

Permalink
TCP stack info css changes
Browse files Browse the repository at this point in the history
index.css
- add font size in theme, add in body, remove from comment, input, .modal, .tooltip
- add font-size smaller in input and select
- reorder elements
- decrease border size, border radius, padding

SysModSystem: add tcp stack info
  • Loading branch information
ewowi committed Mar 11, 2024
1 parent 02b7991 commit 9c81d4b
Show file tree
Hide file tree
Showing 6 changed files with 1,442 additions and 1,419 deletions.
112 changes: 61 additions & 51 deletions data/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
--h-color: #b60f62;
--border-color: #666;
--select-color: #FFFFFF; /*used for view buttons*/
--font-size: 10px;
}
:root.wled {
--bg-color: #121212;
Expand All @@ -25,6 +26,7 @@
--h-color: rgb(255, 160, 0);
--border-color: rgb(255, 160, 0);
--select-color: rgb(255, 160, 0);
--font-size: 10px;
}
:root.grayeen {
--bg-color: linear-gradient(to bottom, #979294 0%, #474542 100%);
Expand All @@ -33,6 +35,8 @@
--h-color: #21482b;
--border-color: #21482b;
--select-color: #21482b; /*used for view buttons*/
--font-size: 10px;
--font-size-s: 8px; /*var(--font-size-s) not working for some reason */
}
:root.dev {
--bg-color: #121212;
Expand All @@ -43,6 +47,7 @@
--select-color: #1a8aff; /*used for view buttons*/
--label-color: #83c5eb;
--comment-color: #598a43;
--font-size: 10px;
}
:root.light {
--bg-color: #fff;
Expand Down Expand Up @@ -114,23 +119,66 @@
--bmt: 0px;
}

body {
font-family: Arial, Helvetica, sans-serif;
background: black;
color: var(--text-color);
font-size: var(--font-size);
}

h1,h2 {
color: var(--h-color);
line-height: 5px;
}

div {
line-height: 2; /* 1.6 is recommended height */
}

/* default nodes */
label {
margin-right: 6px; /*space after*/
color: var(--label-color);
}

comment {
font-size: 10px;
/* font-size: 10px; */
font-style: italic;
margin-left: 6px; /*space before*/
color: var(--comment-color);
}

text { /*currently only for buttonSaveNode and buttonCancelNode*/
font-size: 10px;
input {
background: transparent;
color: var(--text-color);
font-size: 8px; /*var(--font-size-s) not working for some reason */
}

/* input[type="button"] {
padding: 7px;
}
*/

select {
background: transparent;
color: var(--text-color);
font-size: 8px; /*var(--font-size-s) not working for some reason */
}

option {
color: var(--text-color);
background: var(--bg-color);
}

a {
color: var(--h-color);
text-decoration: none;
}

/* text { /*currently only for buttonSaveNode and buttonCancelNode
font-size: 10px;
} */

/* For textarea variables */
textarea {
width: 100%;
Expand All @@ -149,17 +197,6 @@ canvas {
cursor: default;
}

body {
font-family: Arial, Helvetica, sans-serif;
background: black;
color: var(--text-color);
}

input {
background: transparent;
color: var(--text-color);
}

/* https://blog.openreplay.com/how-to-customize-checkboxes-with-css/ */
/* WIP */
/*
Expand All @@ -185,34 +222,6 @@ input {
}
*/

select {
background: transparent;
color: var(--text-color);
}

option {
color: var(--text-color);
background: var(--bg-color);
}

input[type="button"] {
padding: 7px;
}

h1,h2 {
color: var(--h-color);
line-height: 5px;
}

a {
color: var(--h-color);
text-decoration: none;
}

div {
line-height: 2; /* 1.6 is recommended height */
}

/* for toggleModal */
.modal {
position:fixed;
Expand All @@ -226,7 +235,7 @@ div {
transform: translateY(100%);
transition: transform 0.4s;
padding: 8px;
font-size: 18px; /* WLEDMM: smaller is better (was 20px)*/
/* font-size: 18px; WLEDMM: smaller is better (was 20px) */
overflow: auto;
border-radius: 42px;
}
Expand Down Expand Up @@ -279,12 +288,12 @@ div {
}

.module, .appmod, .sysmod, .usermod {
border: 3px solid var(--border-color);
border: 2px solid var(--border-color);
/* background-color: #ddd; */
/* background: linear-gradient(to bottom, #33ccff 0%, #ff99cc 100%); */
background: var(--bg-color); /* linear-gradient(to bottom, #ffbe33 0%, #b60f62 100%); */
border-radius: 21px; /* from .5em */
padding: 10px;
border-radius: 10px; /* from .5em */
padding: 5px;
margin: 10px; /*space around modules */
cursor: move;
}
Expand All @@ -294,17 +303,18 @@ div {
}

.mdlColumn {
border: 3px solid var(--border-color);
border: 2px solid var(--border-color);
/* border-radius: .5em; */
border-radius: 21px;
padding: 10px;
border-radius: 10px;
/* padding: 5px; */
/* cursor: move; */
}

.module.over, .appmod.over, .sysmod.over, .usermod.over, .mdlColumn.over {
border: 3px dotted var(--border-color);
border: 2px dotted var(--border-color);
}

/*Connection indicator*/
#connind {
position: fixed;
bottom: calc(var(--bh) + 5px);
Expand Down Expand Up @@ -334,7 +344,7 @@ div {
text-align: center;
padding: 5px 0;
border-radius: 6px;
font-size: 10px; /*SM*/
/* font-size: 10px; SM */

/* Position the tooltip text */
position: absolute;
Expand Down
10 changes: 5 additions & 5 deletions src/App/LedLeds.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,18 @@ class Leds {
unsigned8 fx = -1;
unsigned8 projectionNr = -1;
unsigned8 effectDimension = -1;

Coord3D startPos = {0,0,0}, endPos = {UINT16_MAX,UINT16_MAX,UINT16_MAX}; //default
unsigned8 proRSpeed = 128;

SharedData sharedData;

std::vector<PhysMap> mappingTable;

unsigned16 indexVLocal = 0; //set in operator[], used by operator=

bool doMap = false;

unsigned16 XY(unsigned16 x, unsigned16 y) {
return XYZ(x, y, 0);
}
Expand All @@ -177,10 +182,6 @@ class Leds {
return x + y * size.x + z * size.x * size.y;
}

unsigned16 indexVLocal = 0; //set in operator[], used by operator=

bool doMap = false;

Leds(Fixture &fixture) {
USER_PRINTF("Leds[%d] constructor %d\n", UINT8_MAX, sizeof(PhysMap));
this->fixture = &fixture;
Expand Down Expand Up @@ -252,7 +253,6 @@ class Leds {
void fill_solid(const struct CRGB& color, bool noBlend = false);
void fill_rainbow(unsigned8 initialhue, unsigned8 deltahue);


void blur1d(fract8 blur_amount)
{
uint8_t keep = 255 - blur_amount;
Expand Down
4 changes: 2 additions & 2 deletions src/App/LedModEffects.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,13 @@ class LedModEffects:public SysModule {
options.add("Default");
options.add("Multiply");
options.add("Rotate");
options.add("Distance from point ");
options.add("Distance ⌛");
options.add("Preset (WIP)");
options.add("None");
options.add("Random");
options.add("Mirror WIP");
options.add("Reverse WIP");
options.add("Kaleidoscope WIP");
// options.add("Kaleidoscope WIP");
return true;
}
case f_ChangeFun:
Expand Down
10 changes: 3 additions & 7 deletions src/App/LedModFixtureGen.h
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,6 @@ class LedModFixtureGen:public SysModule {
options.add("CubeBox");
options.add("Cube3D");
options.add("Sticks");
options.add("Great Plains");
return true; }
case f_ChangeFun: {
stackUnsigned8 optionNr = 1; // 0 is none, maintain the same order here as the options
Expand Down Expand Up @@ -620,9 +619,9 @@ class LedModFixtureGen:public SysModule {
else if (var["value"] == optionNr++) { //Cube 3D
stackUnsigned8 length = 8; stackUnsigned8 size = length -1;
for (forUnsigned8 panel=0; panel < length; panel++) {
mdl->setValue("pnlFirst", Coord3D{0,0,panel}, panel);
mdl->setValue("mrxRowEnd", Coord3D{0,size,panel}, panel);
mdl->setValue("mrxColEnd", Coord3D{size,size,panel}, panel);
mdl->setValue("pnlFirst", Coord3D{0,0,(unsigned16)panel}, panel);
mdl->setValue("mrxRowEnd", Coord3D{0,size,(unsigned16)panel}, panel);
mdl->setValue("mrxColEnd", Coord3D{size,size,(unsigned16)panel}, panel);
mdl->setValue("fixPin", 12, panel);
}
}
Expand All @@ -636,9 +635,6 @@ class LedModFixtureGen:public SysModule {
mdl->setValue("fixPin", 12, panel);
}
}
else if (var["value"] == optionNr++) { //Great plains
//tbd
}
return true; }
default: return false;
}});
Expand Down
23 changes: 20 additions & 3 deletions src/Sys/SysModSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,28 @@ void SysModSystem::setup() {
}});
}

ui->initProgress(parentVar, "stack", UINT16_MAX, 0, 4096, true, [](JsonObject var, unsigned8 rowNr, unsigned8 funType) { switch (funType) { //varFun
ui->initProgress(parentVar, "mainStack", UINT16_MAX, 0, getArduinoLoopTaskStackSize(), true, [](JsonObject var, unsigned8 rowNr, unsigned8 funType) { switch (funType) { //varFun
case f_ValueFun:
mdl->setValue(var, uxTaskGetStackHighWaterMark(NULL));
return true;
case f_UIFun:
ui->setLabel(var, "Main stack");
return true;
case f_ChangeFun:
web->addResponseV(var["id"], "comment", "%d of %d B", uxTaskGetStackHighWaterMark(NULL), getArduinoLoopTaskStackSize());
return true;
default: return false;
}});

ui->initProgress(parentVar, "tcpStack", UINT16_MAX, 0, CONFIG_ASYNC_TCP_TASK_STACK_SIZE, true, [](JsonObject var, unsigned8 rowNr, unsigned8 funType) { switch (funType) { //varFun
case f_ValueFun:
mdl->setValue(var, uxTaskGetStackHighWaterMark(xTaskGetHandle("async_tcp")));
return true;
case f_UIFun:
ui->setLabel(var, "TCP stack");
return true;
case f_ChangeFun:
web->addResponseV(var["id"], "comment", "%d / 4096 B", uxTaskGetStackHighWaterMark(NULL));
web->addResponseV(var["id"], "comment", "%d of %d B", uxTaskGetStackHighWaterMark(xTaskGetHandle("async_tcp")), CONFIG_ASYNC_TCP_TASK_STACK_SIZE);
return true;
default: return false;
}});
Expand Down Expand Up @@ -169,7 +185,8 @@ void SysModSystem::loop1s() {
}
void SysModSystem::loop10s() {
ui->callVarFun(mdl->findVar("heap"));
ui->callVarFun(mdl->findVar("stack"));
ui->callVarFun(mdl->findVar("mainStack"));
ui->callVarFun(mdl->findVar("tcpStack"));

if (psramFound()) {
ui->callVarFun(mdl->findVar("psram"));
Expand Down
Loading

0 comments on commit 9c81d4b

Please sign in to comment.