download-csv-js
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
download-csv-js [2022/05/10 12:45] – emozolyak | download-csv-js [2022/05/12 08:35] – [Button release script] emozolyak | ||
---|---|---|---|
Line 149: | Line 149: | ||
Because the dashboard expects the register change be greater than 0, we have to reset this register after each use. | Because the dashboard expects the register change be greater than 0, we have to reset this register after each use. | ||
- | The folloing | + | The following |
<code lua> | <code lua> | ||
BUTTON_REG_ID = 9 | BUTTON_REG_ID = 9 | ||
Line 158: | Line 158: | ||
| | ||
if (not resetDemand and cur_value > 0) then | if (not resetDemand and cur_value > 0) then | ||
- | resetDemand = true | + | resetDemand = true -- postpone reset for one scan for JS to detect change |
return | return | ||
end | end | ||
| | ||
if (resetDemand) then | if (resetDemand) then | ||
- | reset(BUTTON_REG_ID) | + | reset(BUTTON_REG_ID) |
resetDemand = false | resetDemand = false | ||
end | end |
download-csv-js.txt · Last modified: 2023/10/15 18:07 by emozolyak