revisions

This commit is contained in:
pls.153 2024-05-15 17:41:33 +02:00
parent 43333bf12d
commit 53acccae3c
6 changed files with 11 additions and 140 deletions

View file

@ -59,6 +59,7 @@ win32 {
android {
QT += remoteobjects
QT -= serialport
DEFINES += INI_ASDF
DEFINES -= DESKTOP_APP
INCLUDEPATH = $$ECL/include

View file

@ -99,6 +99,8 @@ QVariant QT::lastPosition() {
return pos;
}
// USB
static void javaUsbDeviceAttached(JNIEnv*, jobject) { // see Java
QMetaObject::invokeMethod(QT::_this, "usbDeviceAttached");
}
@ -118,7 +120,6 @@ void QT::iniJni() {
#endif
jclass jcl = env->GetObjectClass(QtAndroid::androidActivity().object<jobject>());
env->RegisterNatives(jcl, methods, sizeof(methods) / sizeof(methods[0]));
env->DeleteLocalRef(jcl);
clearEventualExceptions();
}

View file

@ -56,7 +56,6 @@ USB_ME::USB_ME(QtAndroidService* service, Connection* _con) : emitter(service),
#endif
jclass jcl = env->GetObjectClass(service2.object<jobject>());
env->RegisterNatives(jcl, methods, sizeof(methods) / sizeof(methods[0]));
env->DeleteLocalRef(jcl);
clearEventualExceptions();
// ini
@ -81,9 +80,9 @@ void USB_ME::disconnect() {
void USB_ME::write2(const QByteArray& ba) {
if (ready) {
#if (QT_VERSION < 0x060000)
QAndroidJniEnvironment env;
QAndroidJniEnvironment env;
#else
QJniEnvironment env;
QJniEnvironment env;
#endif
jbyteArray jba = env->NewByteArray(ba.size());
env->SetByteArrayRegion(jba, 0, ba.size(), (jbyte*)ba.data());

View file

@ -2,11 +2,10 @@ package org.cl.meshtastic;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.location.LocationManager;
import android.location.LocationListener;
import android.location.LocationManager;
import android.location.LocationRequest;
import android.util.Log;
import org.qtproject.qt5.android.bindings.QtActivity;

View file

@ -1,9 +1,9 @@
package org.cl.meshtastic;
import android.content.Context;
import android.app.NotificationManager;
import android.app.NotificationChannel;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.hardware.usb.UsbDeviceConnection;
import android.hardware.usb.UsbManager;
import android.os.Build;

View file

@ -1,112 +1,7 @@
Info
Help
----
This describes how to use this specific meshtastic app, because it differs from
the official apps.
The main focus here is simple, basic usage, like in an emergency situation,
where we don't need all the special features, just basic communication.
You can send both direct and broadcast messages to any device which is within
the range of your mesh network.
Starting this app will automatically ensure a basic setup of your radio, with
the default primary channel settings of the official app, so you can
communicate with users of the official apps. The radio may reboot after first
app startup.
Initial setup
-------------
After the initial (automatic) setup, the app is ready for communication with
all the persons who either use this app, or the official meshtastic apps with
the default primary channel settings.
If you want to communicate with users using the official apps, make sure your
channel name is set to "LongFast" (see main menu / 'Channel name...').
3 main views
------------
Following there is a description of the 3 main views:
* Group
* Messages (initial view)
* Radios
Messages
--------
The initial view shows the messages between you and a chosen person. You choose
the desired person in the **Group** view (tap on group icon).
To copy a message to the clipboard, press-and-hold it.
To see the exact date of a message, tap on its hour.
To delete a message, swipe it to the right and tap on the delete button.
The search function (icon on the right) should be intuitive. The search term
(case insensitive) is highlighted in red. Tap again on the search icon to leave
search mode.
A double click on a message will change to Group.
Group
-----
Tapping on group (in **Messages**), you'll see the list of all persons. Every
person is associated to a specific radio. This view is populated automatically.
Choose 'Broadcast' (on top) to send a message to every person in the group.
You can set a name to every person associated to a radio, which defaults to
'Anonym': a press-and-hold on the name will enter edit mode.
A tap on the location item on the right shows a map with all known positions of
the persons. The map tiles are cached automatically for offline usage, which
means: once you visited a place on the map, it will remain available even
without internet connection.
Radios
------
Tapping on radio (in **Messages**), you'll see the list of all radios
visible to your phone's bluetooth. You generally just choose 1 device, which
will be remembered.
If you use more than 1 radio, just switch here to the radio you want to use.
Changing a radio will take several seconds, because the initial configuration
needs to be repeated.
Initially, the list will contain gray items, so you can choose another radio
if you experience that the connection didn't work, in case the selected radio
is currently not available.
Unread messages
---------------
When you are in the **Messages** view, a red circle on the group icon will
inform you of new, unread messages from another user.
Switching to **Group**, a red circle with the number of unread messages is
shown on the right of every person.
GPS position
------------
On mobile, the location of the phone is sent to the radio once an hour.
It's also possible to set a position manually, which will override any GPS
position, see 'hand' button when the map is shown.
Please see the 'Help' page included in the app (see main menu).
Save / Restore data
@ -137,33 +32,9 @@ directly in above path (that is, under `.../cl-meshtastic/` and restart the
app. The data will be restored and the (obsolete) backup files will be deleted.
Tips
----
If (for some reason) you want to redo the bluetooth discovery of your radio(s),
just press-and-hold on the **Radios** icon.
If (for some reason) you want to receive again the mesh node configuration from
your radio, just press-and-hold on the **Group** icon.
Both of above is meant to avoid app restart.
For a trivial signal test you can use the special text message `:e` (for
'echo'), which will send back the text you sent, adding signal SNR/RSSI,
position and distance. This is convenient to test signal strength from
different places, and have it logged in your messages.
Hacker tips
-----------
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.
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
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