From 10677a19c961a308bcd9ef09cefc97837c866c3b Mon Sep 17 00:00:00 2001 From: "pls.153" Date: Tue, 5 Sep 2023 22:38:18 +0200 Subject: [PATCH] revisions --- examples/cl-repl/build-android/apk-release.sh | 6 ++---- .../meshtastic/build-android/apk-release.sh | 19 +++++++++++++++++++ examples/meshtastic/lisp/lora.lisp | 4 ++-- examples/meshtastic/qml/ext/Group.qml | 7 +++++++ examples/meshtastic/qml/main.qml | 2 ++ 5 files changed, 32 insertions(+), 6 deletions(-) create mode 100755 examples/meshtastic/build-android/apk-release.sh diff --git a/examples/cl-repl/build-android/apk-release.sh b/examples/cl-repl/build-android/apk-release.sh index 33daece..38f721c 100755 --- a/examples/cl-repl/build-android/apk-release.sh +++ b/examples/cl-repl/build-android/apk-release.sh @@ -1,9 +1,7 @@ # This creates a signed APK for the PlayStore. # -# (1) run 'make apk' before running this script -# -# (2) don't set min sdk and target sdk in 'AndroidManifest.xml'; instead, -# set them in 'app.pro' +# (1) set min sdk and target sdk in'app.pro' +# (2) run 'make apk' before running this script # hack to not include Qt Widgets on mobile (not used) rm -f android-build/libs/arm64-v8a/libQt5Widgets_arm64-v8a.so diff --git a/examples/meshtastic/build-android/apk-release.sh b/examples/meshtastic/build-android/apk-release.sh new file mode 100755 index 0000000..38f721c --- /dev/null +++ b/examples/meshtastic/build-android/apk-release.sh @@ -0,0 +1,19 @@ +# This creates a signed APK for the PlayStore. +# +# (1) set min sdk and target sdk in'app.pro' +# (2) run 'make apk' before running this script + +# hack to not include Qt Widgets on mobile (not used) +rm -f android-build/libs/arm64-v8a/libQt5Widgets_arm64-v8a.so +mv ../qml/ext/dialogs/Confirm.qml ../qml/ext/dialogs/.Confirm.qml +mv ../qml/ext/dialogs/Message.qml ../qml/ext/dialogs/.Message.qml + +~/Qt/5.15.2/android/bin/androiddeployqt \ + --input android-app-deployment-settings.json \ + --output android-build \ + --release \ + --sign /my.keystore repl + +# restore +mv ../qml/ext/dialogs/.Confirm.qml ../qml/ext/dialogs/Confirm.qml +mv ../qml/ext/dialogs/.Message.qml ../qml/ext/dialogs/Message.qml diff --git a/examples/meshtastic/lisp/lora.lisp b/examples/meshtastic/lisp/lora.lisp index 3f0a24a..795b8fa 100644 --- a/examples/meshtastic/lisp/lora.lisp +++ b/examples/meshtastic/lisp/lora.lisp @@ -51,6 +51,7 @@ (q> |playing| ui:*busy* t)) (defun get-node-config () + ;; see also Timer in 'qml/ext/Group.qml' (when *ready* (setf *schedule-clear* t) (setf *config-complete* nil @@ -59,8 +60,7 @@ (incf *config-id*) (send-to-radio (me:make-to-radio :want-config-id *config-id*)) - (q> |playing| ui:*busy* t) - (qsingle-shot (* 15 60 1000) 'get-node-config))) ; every 15 min + (q> |playing| ui:*busy* t))) (defun set-ready (name &optional (ready t)) ; see Qt (setf *ready* ready) diff --git a/examples/meshtastic/qml/ext/Group.qml b/examples/meshtastic/qml/ext/Group.qml index 2efc96f..278c720 100644 --- a/examples/meshtastic/qml/ext/Group.qml +++ b/examples/meshtastic/qml/ext/Group.qml @@ -227,5 +227,12 @@ Rectangle { anchors.fill: rect visible: false } + + Timer { + interval: 15 * 60 * 1000 // 15 min + repeat: true + running: true + onTriggered: Lisp.call("lora:get-node-config") + } } diff --git a/examples/meshtastic/qml/main.qml b/examples/meshtastic/qml/main.qml index 4e5070e..7e5bd64 100644 --- a/examples/meshtastic/qml/main.qml +++ b/examples/meshtastic/qml/main.qml @@ -42,6 +42,8 @@ Item { Image { source: "img/logo-128.png" + x: 2 + y: 2 width: headerHeight height: width