Skip to content

Commit

Permalink
Merge pull request letscontrolit#4985 from tonhuisman/feature/Docs-an…
Browse files Browse the repository at this point in the history
…d-easycolorcode-updates-feb-2024

[Docs] Documentation and EasyColorCode updates and fixes, Feb 2024
  • Loading branch information
TD-er authored Feb 22, 2024
2 parents 9b8b0f0 + 01ce6ff commit c4fd0e9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 19 deletions.
4 changes: 2 additions & 2 deletions docs/source/Plugin/AdaGFX_commands.repl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
Some display types may limit or extend the maximum accepted size.
"
"
``<trigger>,txtfull,<x>,<y>,<size=1>,<foreColor=current>,<backColor=foreColor>, <textPrintMode=current>,<maxTextWidthPixels=0>,<text>``
``<trigger>,txtfull,<x>,<y>,<size=1>,<foreColor=current>,<backColor=foreColor>,`` ``<textPrintMode=current>,<maxTextWidthPixels=0>,<text>``
","
Write text at position X/Y with all options. Depending on the setting **Text Coordinates in col/row**, these coordinates are pixels (default) or column/rows.

Expand Down Expand Up @@ -252,7 +252,7 @@
The file will be read from SD-card, when available, and the bmp file is not found on the internal file storage.
"
"
``<trigger>,btn,<state>,<mode>,<x>,<y>,<w>,<h>,<id>,<type>,<ONcolor=blue>,<OFFcolor=red>, <CaptionColor=white>,<fontsize>,<ONcaption>,<OFFcaption>,<BorderColor=white>, <DisabledColor=0x9410>,<DisabledCaptionColor=0x5A69>,<TaskIndex>,<Group>, <SelectGroup>,<objectname>``
``<trigger>,btn,<state>,<mode>,<x>,<y>,<w>,<h>,<id>,<type>,<ONcolor=blue>,<OFFcolor=red>,`` ``<CaptionColor=white>,<fontsize>,<ONcaption>,<OFFcaption>,<BorderColor=white>,`` ``<DisabledColor=0x9410>,<DisabledCaptionColor=0x5A69>,<TaskIndex>,<Group>,`` ``<SelectGroup>,<objectname>``
","
As a companion to the ESPEasy_TouchHelper, the AdafruitGFX_helper takes care of drawing button objects via this subcommand.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/Plugin/P164.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ The plugin provides the ``TVOC`` and ``eCO2`` values. A formula can be set to re

In selected builds, per Value is a **Stats** checkbox available, that when checked, gathers the data and presents recent data in a graph, as described here: :ref:`Task Value Statistics: <Task Value Statistics>`

Currently the extra features offered by the sensore are not configurable in this plugin.
Currently the extra features offered by the sensor are not configurable in this plugin.
These may be added later.

Change log
Expand Down
37 changes: 22 additions & 15 deletions static/espeasy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ var commonAtoms = ["And", "Or"];
var commonKeywords = ["If", "Else", "Elseif", "Endif"];
var commonCommands = ["AccessInfo", "Background", "Build", "ClearAccessBlock", "ClearRTCam", "Config", "ControllerDisable",
"ControllerEnable", "DateTime", "Debug", "Dec", "DeepSleep", "DisablePriorityTask", "DNS", "DST", "EraseSDKWiFi", "ExecuteRules", "Gateway", "I2Cscanner", "Inc",
"IP", "Let", "Load", "LogEntry", "LogPortStatus", "LoopTimerSet", "LoopTimerSet_ms", "MemInfo", "MemInfoDetail", "Name", "Password", "PostToHTTP", "Publish",
"IP", "Let", "Load", "LogEntry", "LogPortStatus", "LoopTimerSet", "LoopTimerSet_ms", "MemInfo", "MemInfoDetail", "Name", "Password", "PostToHTTP", "Publish", "PublishR",
"Reboot", "Reset", "Save", "SendTo", "SendToHTTP", "SendToUDP", "Settings", "Subnet", "Subscribe", "TaskClear", "TaskClearAll",
"TaskDisable", "TaskEnable", "TaskRun", "TaskValueSet", "TaskValueSetAndRun", "ThingspeakReply", "TimerPause", "TimerResume", "TimerSet", "TimerSet_ms", "TimeZone",
"UdpPort", "UdpTest", "Unit", "UseNTP", "WdConfig", "WdRead", "WiFi", "WiFiAPkey", "WiFiAllowAP", "WiFiAPMode", "WiFiConnect", "WiFiDisconnect", "WiFiKey",
"WiFiKey2", "WiFiScan", "WiFiSSID", "WiFiSSID2", "WiFiSTAMode", "WiFi#Disconnected",
"TaskDisable", "TaskEnable", "TaskRun", "TaskValueSet", "TaskValueSetAndRun", "TimerPause", "TimerResume", "TimerSet", "TimerSet_ms", "TimeZone",
"UdpPort", "UdpTest", "Unit", "UseNTP", "WdConfig", "WdRead", "WiFi", "WiFiAllowAP", "WiFiAPMode", "WiFiConnect", "WiFiDisconnect", "WiFiKey",
"WiFiKey2", "WiFiMode", "WiFiScan", "WiFiSSID", "WiFiSSID2", "WiFiSTAMode",
"Event", "AsyncEvent",
"GPIO", "GPIOToggle", "LongPulse", "LongPulse_mS", "Monitor", "Pulse", "PWM", "Servo", "Status", "Tone", "RTTTL", "UnMonitor",];
var commonString2 = ["Clock#Time", "Login#Failed", "MQTT#Connected", "MQTT#Disconnected", "MQTTimport#Connected", "MQTTimport#Disconnected", "Rules#Timer", "System#Boot",
"System#BootMode", "System#Sleep", "System#Wake", "TaskExit#", "TaskInit#", "Time#Initialized", "Time#Set", "WiFi#APmodeDisabled", "WiFi#APmodeEnabled",
"WiFi#ChangedAccesspoint", "WiFi#ChangedWiFichannel", "WiFi#Connected"];
var commonEvents = ["Clock#Time", "Login#Failed", "MQTT#Connected", "MQTT#Disconnected", "MQTTimport#Connected", "MQTTimport#Disconnected", "Rules#Timer", "System#Boot",
"System#BootMode", "System#Sleep", "System#Wake", "TaskExit#", "TaskInit#", "ThingspeakReply", "Time#Initialized", "Time#Set", "WiFi#APmodeDisabled", "WiFi#APmodeEnabled",
"WiFi#ChangedAccesspoint", "WiFi#ChangedWiFichannel", "WiFi#Connected", "WiFi#Disconnected"];
var commonPlugins = [
//P003
"ResetPulseCounter", "SetPulseCounterTotal", "LogPulseStatistic",
Expand Down Expand Up @@ -55,6 +55,8 @@ var commonPlugins = [
"7dn", "7dst", "7dsd", "7dtext", "7ddt", "7dt", "7dtfont", "7dtbin", "7don", "7doff", "7output",
//P076
"HLWCalibrate", "HLWReset",
//P077
"csecalibrate", "cseclearpulses", "csereset",
//P079
"WemosMotorShieldCMD", "LolinMotorShieldCMD",
//P082
Expand Down Expand Up @@ -106,6 +108,8 @@ var commonPlugins = [
"sht4x", "sht4x,startup",
//P159
"ld2410", "ld2410,factoryreset", "ld2410,logall",
//P166
"gp8403", "gp8403,volt,", "gp8403,mvolt,", "gp8403,range,", "gp8403,preset,", "gp8403,init,",
];
var pluginDispKind = [
//P095
Expand All @@ -122,7 +126,8 @@ var pluginDispKind = [
var pluginDispCmd = [
"cmd,on", "cmd,off", "cmd,clear", "cmd,backlight", "cmd,bright", "cmd,deepsleep", "cmd,seq_start", "cmd,seq_end", "cmd,inv", "cmd,rot",
",clear", ",rot", ",tpm", ",txt", ",txp", ",txz", ",txc", ",txs", ",txtfull", ",asciitable", ",font",
",l", ",lh", ",lv", ",lm", ",lmr", ",r", ",rf", ",c", ",cf", ",rf", ",t", ",tf", ",rr", ",rrf", ",px", ",pxh", ",pxv", ",bmp", ",btn"
",l", ",lh", ",lv", ",lm", ",lmr", ",r", ",rf", ",c", ",cf", ",rf", ",t", ",tf", ",rr", ",rrf", ",px", ",pxh", ",pxv", ",bmp", ",btn",
",win", ",defwin", ",delwin",
];
var commonTag = ["On", "Do", "Endon"];
var commonNumber = ["toBin", "toHex", "Constrain", "XOR", "AND:", "OR:", "Ord", "bitRead", "bitSet", "bitClear", "bitWrite", "urlencode"];
Expand All @@ -142,9 +147,11 @@ var AnythingElse = [
"%lcltime%", "%sunrise%", "%s_sunrise%", "%m_sunrise%", "%sunset%", "%s_sunset%", "%m_sunset%", "%lcltime_am%",
"%syshour%", "%syshour_0%", "%sysmin%", "%sysmin_0%", "%syssec%", "%syssec_0%", "%sysday%", "%sysday_0%", "%sysmonth%",
"%sysmonth_0%", "%sysyear%", "%sysyear_0%", "%sysyears%", "%sysweekday%", "%sysweekday_s%", "%unixtime%", "%uptime%", "%uptime_ms%",
"%rssi%", "%ip%", "%unit%", "%ssid%", "%bssid%", "%wi_ch%", "%iswifi%", "%vcc%", "%mac%", "%mac_int%", "%isntp%", "%ismqtt%",
"%rssi%", "%ip%", "%unit%", "%unit_0%", "%ssid%", "%bssid%", "%wi_ch%", "%iswifi%", "%vcc%", "%mac%", "%mac_int%", "%isntp%", "%ismqtt%",
"%dns%", "%dns1%", "%dns2%", "%flash_freq%", "%flash_size%", "%flash_chip_vendor%", "%flash_chip_model%", "%fs_free%", "%fs_size%",
"%cpu_id%", "%cpu_freq%", "%cpu_model%", "%cpu_rev%", "%cpu_cores%", "%board_name%",
"%cpu_id%", "%cpu_freq%", "%cpu_model%", "%cpu_rev%", "%cpu_cores%", "%board_name%", "%inttemp%",
//Ethernet
"%ethwifimode%", "%ethconnected%", "%ethduplex%", "%ethspeed%", "%ethstate%", "%ethspeedstate%",
//Standard Conversions
"%c_w_dir%", "%c_c2f%", "%c_ms2Bft%", "%c_dew_th%", "%c_alt_pres_sea%", "%c_sea_pres_alt%", "%c_cm2imp%", "%c_mm2imp%",
"%c_m2day%", "%c_m2dh%", "%c_m2dhm%", "%c_s2dhms%", "%c_2hex%", "%c_u2ip%",
Expand All @@ -163,7 +170,7 @@ for (const element2 of pluginDispKind) {
}
}

var EXTRAWORDS = commonAtoms.concat(commonPlugins, commonKeywords, commonCommands, commonString2, commonTag, commonNumber, commonMath, commonWarning, taskSpecifics, AnythingElse);
var EXTRAWORDS = commonAtoms.concat(commonPlugins, commonKeywords, commonCommands, commonEvents, commonTag, commonNumber, commonMath, commonWarning, taskSpecifics, AnythingElse);

var rEdit;
function initCM() {
Expand Down Expand Up @@ -219,8 +226,8 @@ function initCM() {
var lCcommonCommands = commonCommands.map(name => name.toLowerCase());
commonCommands = commonCommands.concat(lCcommonCommands);

var lCcommonString2 = commonString2.map(name => name.toLowerCase());
commonString2 = commonString2.concat(lCcommonString2);
var lCcommonString2 = commonEvents.map(name => name.toLowerCase());
commonEvents = commonEvents.concat(lCcommonString2);

var lCcommonPlugins = commonPlugins.map(name => name.toLowerCase());
commonPlugins = commonPlugins.concat(lCcommonPlugins);
Expand Down Expand Up @@ -249,7 +256,7 @@ function initCM() {
define('atom', commonAtoms);
define('keyword', commonKeywords);
define('builtin', commonCommands);
define('string-2', commonString2);
define('events', commonEvents);
define('def', commonPlugins);
define('tag', commonTag);
define('number', commonNumber);
Expand Down Expand Up @@ -350,7 +357,7 @@ function initCM() {
if (/\w/.test(ch)) {
if (stream.match("#")) {
stream.eatWhile(/[\w.#]/);
return 'string-2';
return 'events';
}
}

Expand Down
Loading

0 comments on commit c4fd0e9

Please sign in to comment.