lpcmanager

Create new widget - HMI:TouchDetect that can be added as page sibling to detect screen touches independently of screen saver and set PLC variable accordingly
#! gmake
# yml2c resolves includes by merging EVERY matching file on YML_PATH (see yml2/backend.py).
# gen_index_xhtml.ysl2 uses "include detachable_pages.ysl2", so both this directory and
# beremiz/svghmi would be concatenated if stock detachable_pages.ysl2 stayed in place.
# Before compiling, we temporarily hide beremiz's copy so only LPCSVGHMI/detachable_pages.ysl2
# is included.
our_lib_path = $(abspath .)
original_svghmi_path = $(abspath ../../beremiz/svghmi)
our_widgets := $(wildcard *.ysl2)
xsltfiles := gen_index_xhtml.xslt gen_dnd_widget_svg.xslt analyse_widget.xslt
STOCK_DETACHABLE := $(original_svghmi_path)/detachable_pages.ysl2
HIDDEN_DETACHABLE := $(original_svghmi_path)/detachable_pages.ysl2._lpc_build_hidden
all: $(xsltfiles)
$(xsltfiles): $(our_widgets)
for f in $(xsltfiles); do rm -f $(original_svghmi_path)/$$f; done
@test -f '$(STOCK_DETACHABLE)' && mv '$(STOCK_DETACHABLE)' '$(HIDDEN_DETACHABLE)' || true
@YML_PATH=$(our_lib_path):$(original_svghmi_path) $(MAKE) -C $(original_svghmi_path) \
|| { test -f '$(HIDDEN_DETACHABLE)' && mv '$(HIDDEN_DETACHABLE)' '$(STOCK_DETACHABLE)'; exit 1; }; \
test -f '$(HIDDEN_DETACHABLE)' && mv '$(HIDDEN_DETACHABLE)' '$(STOCK_DETACHABLE)'; exit 0
for f in $(xsltfiles); do cp $(original_svghmi_path)/$$f $(our_lib_path)/$$f; done