--- a/svghmi/gen_index_xhtml.xslt Sat Apr 04 22:32:54 2020 +0200
+++ b/svghmi/gen_index_xhtml.xslt Tue Apr 07 10:01:23 2020 +0200
@@ -984,10 +984,6 @@
<xsl:text> let new_val = change_hmi_value(this.indexes[0], opstr);
- <xsl:if test="$have_value">
- <xsl:text> this.value_elt.textContent = String(new_val);
<xsl:text> on_edit_click: function(opstr) {
@@ -1004,10 +1000,6 @@
<xsl:text> apply_hmi_value(this.indexes[0], new_val);
- <xsl:if test="$have_value">
- <xsl:text> this.value_elt.textContent = String(new_val);
@@ -1567,6 +1559,7 @@
<xsl:text>Made with SVGHMI. https://beremiz.org</xsl:text>
+ <xsl:apply-templates mode="debug_as_comment" select="document('')/*/reflect:*"/> <html xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/1999/xhtml">
<body style="margin:0;overflow:hidden;">
@@ -2152,7 +2145,9 @@
- <xsl:text> cache[index] = value;
+ <xsl:text> // DON'T DO THAT unless read_iterator in svghmi.c modifies wbuf as well, not only rbuf + <xsl:text> // cache[index] = value; @@ -2162,10 +2157,16 @@
<xsl:text> let old_val = cache[index]
- <xsl:text> if(new_val != undefined && old_val != new_val)
+ <xsl:text> console.log("apply", index, new_val); + <xsl:text> if(new_val != undefined && old_val != new_val){ + <xsl:text> console.log("sending", new_val); <xsl:text> send_hmi_value(index, new_val);
<xsl:text> return new_val;
--- a/svghmi/svghmi.js Sat Apr 04 22:32:54 2020 +0200
+++ b/svghmi/svghmi.js Tue Apr 07 10:01:23 2020 +0200
@@ -236,7 +236,8 @@
new Uint32Array([index]),
+ // DON'T DO THAT unless read_iterator in svghmi.c modifies wbuf as well, not only rbuf + // cache[index] = value; function apply_hmi_value(index, new_val) {
--- a/svghmi/widget_input.ysl2 Sat Apr 04 22:32:54 2020 +0200
+++ b/svghmi/widget_input.ysl2 Tue Apr 07 10:01:23 2020 +0200
@@ -27,10 +27,10 @@
| on_op_click: function(opstr) {
| let new_val = change_hmi_value(this.indexes[0], opstr);
- | this.value_elt.textContent = String(new_val);
- /* TODO gray out value until refreshed */
+ // | this.value_elt.textContent = String(new_val); + // /* TODO gray out value until refreshed */ | on_edit_click: function(opstr) {
| edit_value("«path/@value»", "«path/@type»", this, this.last_val);
@@ -38,9 +38,9 @@
| edit_callback: function(new_val) {
| apply_hmi_value(this.indexes[0], new_val);
- | this.value_elt.textContent = String(new_val);
- /* TODO gray out value until refreshed */
+ // | this.value_elt.textContent = String(new_val); + // /* TODO gray out value until refreshed */