mirror of
https://gitlab.com/eql/lqml.git
synced 2026-01-04 08:11:52 -08:00
example 'meshtastic': send phone GPS position to radio; revisions
This commit is contained in:
parent
80acb3c92d
commit
9699a0ce6f
28 changed files with 1566 additions and 79 deletions
|
|
@ -1,5 +1,16 @@
|
|||
(in-package :radios)
|
||||
|
||||
(defvar *found* nil)
|
||||
|
||||
(defun device-discovered (name)
|
||||
"Show discovered (cached) device, which may not be reachable / turned on."
|
||||
(unless *found*
|
||||
(add-radio
|
||||
(list :name name
|
||||
:hw-model "Meshtastic" ; we don't know yet
|
||||
:current (equal name (app:setting :device))
|
||||
:ini t))))
|
||||
|
||||
(defun add-radio (radio)
|
||||
"Adds passed RADIO (a PLIST) to QML item model.
|
||||
The model keys are:
|
||||
|
|
@ -10,10 +21,17 @@
|
|||
(setf lora:*schedule-clear* nil)
|
||||
(q! |clear| ui:*radios*))
|
||||
|
||||
(defun change-radio (name) ; called from QML
|
||||
(defun change-radio (name) ; see QML
|
||||
(app:change-setting :device name)
|
||||
(unless *found*
|
||||
(clear))
|
||||
(qlater (lambda () (lora:start-device-discovery name)))
|
||||
(values))
|
||||
|
||||
(defun reset-default-radio ()
|
||||
;; TODO: add in UI settings
|
||||
(app:change-setting :device nil))
|
||||
|
||||
(defun reset-configured ()
|
||||
;; TODO: add in UI settings
|
||||
(app:change-setting :configured nil))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue