mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-06 10:31:34 -08:00
example 'meshtastic': add app icon, splash screen; revisions
This commit is contained in:
parent
0826049568
commit
189adc7919
42 changed files with 174 additions and 27 deletions
|
|
@ -1,6 +1,6 @@
|
|||
(in-package :loc)
|
||||
|
||||
(defvar *positions* nil)
|
||||
(defvar *positions* nil) ; will be shown on an offline map (TODO)
|
||||
(defvar *my-position* nil)
|
||||
|
||||
(defun ini ()
|
||||
|
|
@ -11,29 +11,33 @@
|
|||
#+mobile
|
||||
(update-my-position))
|
||||
|
||||
#+mobile
|
||||
(defun last-gps-position ()
|
||||
#+android
|
||||
(qt:last-position qt:*cpp*)
|
||||
#+ios
|
||||
(qjs |lastPosition| ui:*position-source*))
|
||||
|
||||
#+mobile
|
||||
(defun update-my-position ()
|
||||
"Mobile only: update position from GPS of mobile device."
|
||||
(unless (getf *positions* (lora:my-num))
|
||||
(destructuring-bind (lat lon time)
|
||||
#+android
|
||||
(qt:last-position qt:*cpp*)
|
||||
#+ios
|
||||
(qjs |lastPosition| ui:*position-source*)
|
||||
(if (zerop lat)
|
||||
(qsingle-shot 1000 'update-my-position)
|
||||
(let ((pos (list :lat lat
|
||||
:lon lon
|
||||
:time (if (zerop (length time)) 0 (parse-integer time)))))
|
||||
(setf *my-position* pos)
|
||||
(qlog "position-updated: ~A" pos)
|
||||
(set-position (lora:my-num) pos)
|
||||
(send-to-radio)))))) ; just once on startup (for now)
|
||||
(destructuring-bind (lat lon time)
|
||||
(last-gps-position)
|
||||
(if (zerop lat)
|
||||
(qsingle-shot 1000 'update-my-position)
|
||||
(let ((pos (list :lat lat
|
||||
:lon lon
|
||||
:time (if (zerop (length time)) 0 (parse-integer time)))))
|
||||
(setf *my-position* pos)
|
||||
(qlog "position-updated: ~A" pos)
|
||||
(set-position (lora:my-num) pos)
|
||||
(send-to-radio))))) ; just once on startup (for now)
|
||||
|
||||
#+mobile
|
||||
(defun send-to-radio ()
|
||||
(if lora:*config-complete*
|
||||
(lora:send-position *my-position*)
|
||||
(unless (getf *positions* (lora:my-num))
|
||||
(lora:send-position *my-position*))
|
||||
(qsingle-shot 1000 'send-to-radio)))
|
||||
|
||||
(defun set-position (node pos)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue