example 'meshtastic': fix for Windows; revisions

This commit is contained in:
pls.153 2023-08-14 13:53:58 +02:00
parent 936d563128
commit 00375ff3f4
6 changed files with 19 additions and 13 deletions

View file

@ -13,7 +13,7 @@ class TileProvider : public QTcpServer {
public:
TileProvider(int port = 0, QObject* parent = nullptr) : QTcpServer(parent) {
listen(QHostAddress::Any, port);
qDebug() << "tile server started at IP" << serverAddress() << "port" << serverPort();
qDebug() << "tile provider started at IP" << serverAddress() << "port" << serverPort();
}
void incomingConnection(qintptr socket) override {

View file

@ -473,6 +473,7 @@ PRINT-JSON-IMPL for any types."
(print-json-impl packed-message indent stream camel-case-p
numeric-enums-p t))))
((google:timestamp)
#-os-windows
(let* ((nsec (google:timestamp.nanos object))
(timestamp (local-time:unix-to-timestamp
(google:timestamp.seconds object)
@ -567,6 +568,7 @@ calls to PARSE-JSON-IMPL."
(wkt:pack-any ret)))))
((google:timestamp)
#-os-windows
(let* ((timestring (pi::parse-string stream))
(timestamp (local-time:parse-rfc3339-timestring timestring)))
(google:make-timestamp

View file

@ -92,7 +92,7 @@
(start-swank)
(clear))
#+mobile
((string= ":w" text) ; for saving/restoring message DB and settings
((string= ":w" text) ; for saving/restoring message DB, settings, map tiles
(s-http-server:start)
(clear))
#+mobile

View file

@ -15,6 +15,7 @@
:alexandria
:trivial-garbage
:cl-base64
#-os-windows
:local-time
:float-features)
:components (;; cl-protobufs

View file

@ -108,8 +108,8 @@ phone is sent once (at startup) to the radio.
Save / Restore data
-------------------
A local web-server is included on mobile for saving and restoring the message
DB, the app settings, plus eventually cached map tiles (for offline usage).
A local web-server is included on mobile for saving and restoring all of:
message DB, app settings, eventually cached map tiles (for offline usage).
Just use special text message `:w` (for 'web-server') and `:ws` (for 'stop
web-server') after you're done.
@ -146,11 +146,11 @@ different places, and have it logged in your messages.
Hacker tips
-----------
If it occurs that a RAK device goes into an undefined state and doesn't seem
If it occurs that a radio device goes into an undefined state and doesn't seem
to work anymore, you can try a factory reset (see CLI) and flash the latest
firmware.
Alternatively you can completely erase the flash memory from an arduino IDE,
RAK devices can also completely erase the flash memory from an arduino IDE,
see RAK on github and file `reset-flash.ino` (re-flash firmware afterwards).
If you are a Lisp hacker, you may enjoy the integrated Swank server (on
@ -158,5 +158,8 @@ mobile). Just type special text message `:s`. A message with the IP to connect
to will be shown once the server is running. Beware though that Swank on mobile
isn't very stable, but it's perfect for simple debugging purposes, or to
get/set variables on the fly (but it might crash regularily if you try to eval
some buffer).
some buffer, or even during auto-completion).
For full Swank/Slime power you'll need the desktop version anyway (this is how
this app was developed).

View file

@ -53,14 +53,12 @@ of cl-sqlite) currently needs a small hack to even work on mobile.
Tested
------
Tested on Linux, macOS, android, iOS.
Tested on Linux, macOS, Windows 10+, android, iOS.
The macOS version must be compiled first, moved to `/Applications/` and started
from Finder (not the console), otherwise BLE permissions will not work (if run
from console, the app will show a BLE exception and consume 100% CPU).
Windows 10+ will follow soon.
How to use cl-meshtastic
@ -71,9 +69,11 @@ start the app.
On android coarse location permission is required for BLE to work.
Pairing of your LoRa radios is generally not needed beforehand, the app will
ask for pairing/PIN during BLE ini. If your device doesn't have a display, use
`123456` as your PIN.
Except for Windows, pairing of your LoRa radios is generally not needed
beforehand, the app will ask for pairing/PIN during BLE ini. If your device
doesn't have a display, use `123456` as your PIN.
On Windows it didn't work for me if not paired previously.
It may occur that your radio device is sometimes not found; first