Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,18 +319,7 @@ There are three font types defined:

Note, the default font type is "normal".

The font type can be selected per plugin instance in the settings web page.

Example:

```json
{
"name": "IconTextPlugin",
"uid": 32690,
"alias": "",
"fontType": "large"
}
```
The font type can be selected per plugin instance in the display web page.

Not all plugin may support this in case they get conflicts with their layout.
If a plugin don't support it, it will use the default font type.
Expand Down
5 changes: 3 additions & 2 deletions config/mcu.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; MCU ESP32 configuration
; ********************************************************************************
[mcu:esp32]
platform = espressif32 @ ~6.12.0
platform = espressif32 @ ~6.13.0
platform_packages =
framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#release/v2.x
framework = arduino
Expand All @@ -24,7 +24,8 @@ build_flags =
-D CONFIG_FILESYSTEM_TYPE=FILESYSTEM_LITTLEFS
-D CONFIG_ASYNC_TCP_RUNNING_CORE=APP_CPU_NUM
-D CONFIG_ASYNC_TCP_USE_WDT=1
-D CONFIG_ASYNC_TCP_STACK_SIZE=8192
-D CONFIG_ASYNC_TCP_STACK=8192 ; AsyncTcpSock
-D CONFIG_ASYNC_TCP_STACK_SIZE=8192 ; AsyncTcp
-D ASYNC_TCP_SSL_ENABLED=1
"-D TEMPLATE_PLACEHOLDER='~'"
-D PIO_ENV="$PIOENV"
Expand Down
421 changes: 201 additions & 220 deletions data/display.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<link rel="stylesheet" type="text/css" href="/style/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="/style/sticky-footer-navbar.css" />
<link rel="stylesheet" type="text/css" href="/style/style.css" />
<link rel="stylesheet" type="text/css" href="/style/edit.css" />
<link rel="stylesheet" type="text/css" href="/style/tree.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ace-builds@1.43.5/css/ace.min.css">

Expand Down
56 changes: 51 additions & 5 deletions data/js/ws.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ pixelix.ws.Client.prototype._onMessage = function(msg) {
} else if ("EFFECT" === this._pendingCmd.name) {
rsp.fadeEffect = parseInt(data[0]);
this._pendingCmd.resolve(rsp);
} else if ("FONTTYPE" === this._pendingCmd.name) {
rsp.fontSize = data[0];
this._pendingCmd.resolve(rsp);
} else if ("INSTALL" === this._pendingCmd.name) {
rsp.slotId = parseInt(data[0]);
rsp.uid = this._removeQuotes(data[1]);
Expand Down Expand Up @@ -249,16 +252,17 @@ pixelix.ws.Client.prototype._onMessage = function(msg) {
} else if ("SLOTS" === this._pendingCmd.name) {
rsp.maxSlots = parseInt(data.shift());
rsp.slots = [];
elements = 7;
elements = 8;
for(index = 0; index < (data.length / elements); ++index) {
rsp.slots.push({
name: this._removeQuotes(data[elements * index + 0]),
uid: parseInt(data[elements * index + 1]),
alias: this._removeQuotes(data[elements * index + 2]),
isLocked: this._toBoolean(data[elements * index + 3]),
isSticky: this._toBoolean(data[elements * index + 4]),
isDisabled: this._toBoolean(data[elements * index + 5]),
duration: parseInt(data[elements * index + 6])
fontType: this._removeQuotes(data[elements * index + 3]),
isLocked: this._toBoolean(data[elements * index + 4]),
isSticky: this._toBoolean(data[elements * index + 5]),
isDisabled: this._toBoolean(data[elements * index + 6]),
duration: parseInt(data[elements * index + 7])
});
}
this._pendingCmd.resolve(rsp);
Expand Down Expand Up @@ -737,3 +741,45 @@ pixelix.ws.Client.prototype.setPluginAlias = function(options) {
}
}.bind(this));
};

pixelix.ws.Client.prototype.getPluginFontType = function(options) {
return new Promise(function(resolve, reject) {
if (null === this._socket) {
reject();
} else if ("number" !== typeof options.uuid) {
reject();
} else {
this._sendCmd({
name: "FONTTYPE",
par: options.uuid,
resolve: resolve,
reject: reject
});
}
}.bind(this));
};

pixelix.ws.Client.prototype.setPluginFontType = function(options) {
return new Promise(function(resolve, reject) {
var par = "";
if (null === this._socket) {
reject();
} else if ("number" !== typeof options.uid) {
reject();
} else if ("string" !== typeof options.fontType) {
reject();
} else {

par += options.uid;
par += ";";
par += options.fontType;

this._sendCmd({
name: "FONTTYPE",
par: par,
resolve: resolve,
reject: reject
});
}
}.bind(this));
};
Loading
Loading