kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
new play store release
rodzic
c568b04354
commit
aab062b06f
17
TODO.md
17
TODO.md
|
@ -4,24 +4,23 @@ MVP features required for first public alpha
|
|||
* describe user experience: devices always point to each other and show distance, you can send texts between nodes
|
||||
the channel is encrypted, you can share the the channel key with others by qr code or by sharing a special link
|
||||
|
||||
* let user set name and shortname
|
||||
* take video
|
||||
* make a working currently vs not working list
|
||||
|
||||
* make node list view not look like ass
|
||||
* record analytics events when radio connects/disconnects, include # of nodes in mesh
|
||||
* make channel button look like a button
|
||||
* generate real channel QR codes
|
||||
* when we connect to radio, distances to nodes in the chat log should automatically redraw
|
||||
* show pointer arrow on the outside of the user icons, always pointing towoards them
|
||||
* stop scan when we start the service
|
||||
* set the radio by using the service
|
||||
* startforegroundservice only if we have a valid radio
|
||||
* if no radio is selected, launch app on the radio select screen
|
||||
* let user send texts
|
||||
* when we select a new radio, restart the service
|
||||
* show bt scan progress centered and towards the bottom of the screen
|
||||
* get rid of green bar at top
|
||||
* change titlebar based off which screen we are showing
|
||||
* fix app icon in title bar
|
||||
* treat macaddrs as the unique id, not the app layer user id
|
||||
* on onStop somehow stop the BT scan (to prevent burning battery)
|
||||
* add alphatest screen at boot
|
||||
* have the foreground service's notification show a summary of network status, add (individually maskable) notifications for received texts or new positions
|
||||
* test bt boot behavior
|
||||
|
@ -60,6 +59,7 @@ Do this "Signal app compatible" release relatively soon after the alpha release
|
|||
# Medium priority
|
||||
Things for the betaish period.
|
||||
|
||||
* MeshService.reinitFromRadio can take 300 ms, run it in a worker thread instead
|
||||
* show user icons in chat
|
||||
* keep past messages in db, one db per channel
|
||||
* spend some quality power consumption tuning with https://developer.android.com/studio/profile/energy-profiler and https://developer.android.com/topic/performance/power/battery-historian
|
||||
|
@ -135,4 +135,9 @@ Don't leave device discoverable. Don't let unpaired users do things with device
|
|||
* prompt user to turnon bluetooth and bind
|
||||
* show real ID of me when I sent texts
|
||||
* keep text entry box at bottom of screen
|
||||
* when I enter texts, send them to the device
|
||||
* when I enter texts, send them to the device
|
||||
* let user set name and shortname
|
||||
* let user send texts
|
||||
* get rid of green bar at top
|
||||
* change titlebar based off which screen we are showing
|
||||
* on onStop somehow stop the BT scan (to prevent burning battery)
|
|
@ -16,8 +16,8 @@ android {
|
|||
applicationId "com.geeksville.mesh"
|
||||
minSdkVersion 22 // The oldest emulator image I have tried is 22 (though 21 probably works)
|
||||
targetSdkVersion 29
|
||||
versionCode 2
|
||||
versionName "0.1"
|
||||
versionCode 3
|
||||
versionName "0.0.3"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
|
|
|
@ -47,5 +47,5 @@ object NodeDB {
|
|||
val nodes = mutableMapOf(* testNodes.map { it.user!!.id to it }.toTypedArray())
|
||||
|
||||
/// Could be null if we haven't received our node DB yet
|
||||
val ourNodeInfo get() = nodes[myId.value!!]
|
||||
val ourNodeInfo get() = nodes[myId.value]
|
||||
}
|
|
@ -532,6 +532,51 @@ class MeshService : Service(), Logging {
|
|||
}
|
||||
}
|
||||
|
||||
/// We are reconnecting to a radio, redownload the full state. This operation might take hundreds of milliseconds
|
||||
private fun reinitFromRadio() {
|
||||
// Read the MyNodeInfo object
|
||||
val myInfo = MeshProtos.MyNodeInfo.parseFrom(
|
||||
connectedRadio.readMyNode()
|
||||
)
|
||||
|
||||
val mynodeinfo = MyNodeInfo(myInfo.myNodeNum, myInfo.hasGps)
|
||||
myNodeInfo = mynodeinfo
|
||||
|
||||
// Ask for the current node DB
|
||||
connectedRadio.restartNodeInfo()
|
||||
|
||||
// read all the infos until we get back null
|
||||
var infoBytes = connectedRadio.readNodeInfo()
|
||||
while (infoBytes != null) {
|
||||
val info =
|
||||
MeshProtos.NodeInfo.parseFrom(infoBytes)
|
||||
debug("Received initial nodeinfo $info")
|
||||
|
||||
// Just replace/add any entry
|
||||
updateNodeInfo(info.num) {
|
||||
if (info.hasUser())
|
||||
it.user =
|
||||
MeshUser(
|
||||
info.user.id,
|
||||
info.user.longName,
|
||||
info.user.shortName
|
||||
)
|
||||
|
||||
if (info.hasPosition())
|
||||
it.position = Position(
|
||||
info.position.latitude,
|
||||
info.position.longitude,
|
||||
info.position.altitude
|
||||
)
|
||||
|
||||
it.lastSeen = info.lastSeen
|
||||
}
|
||||
|
||||
// advance to next
|
||||
infoBytes = connectedRadio.readNodeInfo()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Called when we gain/lose connection to our radio
|
||||
private fun onConnectionChanged(c: Boolean) {
|
||||
|
@ -540,53 +585,10 @@ class MeshService : Service(), Logging {
|
|||
if (c) {
|
||||
// Do our startup init
|
||||
try {
|
||||
// FIXME - don't do this until after we see that the radio is connected to the phone
|
||||
//val sim = SimRadio(this@MeshService)
|
||||
//sim.start() // Fake up our node id info and some past packets from other nodes
|
||||
|
||||
val myInfo = MeshProtos.MyNodeInfo.parseFrom(
|
||||
connectedRadio.readMyNode()
|
||||
)
|
||||
|
||||
val mynodeinfo = MyNodeInfo(myInfo.myNodeNum, myInfo.hasGps)
|
||||
myNodeInfo = mynodeinfo
|
||||
|
||||
// Ask for the current node DB
|
||||
connectedRadio.restartNodeInfo()
|
||||
|
||||
// read all the infos until we get back null
|
||||
var infoBytes = connectedRadio.readNodeInfo()
|
||||
while (infoBytes != null) {
|
||||
val info =
|
||||
MeshProtos.NodeInfo.parseFrom(infoBytes)
|
||||
debug("Received initial nodeinfo $info")
|
||||
|
||||
// Just replace/add any entry
|
||||
updateNodeInfo(info.num) {
|
||||
if (info.hasUser())
|
||||
it.user =
|
||||
MeshUser(
|
||||
info.user.id,
|
||||
info.user.longName,
|
||||
info.user.shortName
|
||||
)
|
||||
|
||||
if (info.hasPosition())
|
||||
it.position = Position(
|
||||
info.position.latitude,
|
||||
info.position.longitude,
|
||||
info.position.altitude
|
||||
)
|
||||
|
||||
it.lastSeen = info.lastSeen
|
||||
}
|
||||
|
||||
// advance to next
|
||||
infoBytes = connectedRadio.readNodeInfo()
|
||||
}
|
||||
reinitFromRadio()
|
||||
|
||||
// we don't ask for GPS locations from android if our device has a built in GPS
|
||||
if (!mynodeinfo.hasGPS)
|
||||
if (!myNodeInfo!!.hasGPS)
|
||||
startLocationRequests()
|
||||
else
|
||||
debug("Our radio has a built in GPS, so not reading GPS in phone")
|
||||
|
|
|
@ -20,7 +20,7 @@ object SettingsLog : Logging
|
|||
|
||||
@Composable
|
||||
fun SettingsContent() {
|
||||
val typography = MaterialTheme.typography()
|
||||
//val typography = MaterialTheme.typography()
|
||||
|
||||
val context = ambient(ContextAmbient)
|
||||
Column(modifier = LayoutSize.Fill + LayoutPadding(16.dp)) {
|
||||
|
|
|
@ -148,9 +148,6 @@ message MeshPacket {
|
|||
/// Shared constants between device and phone
|
||||
enum Constants {
|
||||
Unused = 0; // First enum must be zero, and we are just using this enum to pass int constants between two very different environments
|
||||
|
||||
/// # of legal channels
|
||||
NumChannels = 13;
|
||||
}
|
||||
|
||||
// Full settings (center freq, spread factor, pre-shared secret key etc...) needed to configure a radio for speaking on a particlar channel
|
||||
|
@ -267,6 +264,9 @@ message MyNodeInfo {
|
|||
/// if false it would be great if the phone can help provide gps coordinates
|
||||
bool has_gps = 2;
|
||||
|
||||
/// # of legal channels (set at build time in the device flash image)
|
||||
int32 num_channels = 3;
|
||||
|
||||
/// FIXME - add useful debugging state (queue depths etc)
|
||||
}
|
||||
|
||||
|
@ -295,10 +295,10 @@ message DeviceState {
|
|||
|
||||
/// We bump up the integer values in this enum to indicate minimum levels of encodings for saved files
|
||||
/// if your file is below the Minimum you should discard it.
|
||||
Minimum = 12;
|
||||
Minimum = 13;
|
||||
|
||||
/// The current value we are using for saved files
|
||||
Current = 12;
|
||||
Current = 13;
|
||||
};
|
||||
|
||||
/// A version integer used to invalidate old save files when we make incompatible changes
|
||||
|
|
Ładowanie…
Reference in New Issue