kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
Merge branch 'dev1.2' of https://github.com/geeksville/Meshtastic-Android into dev1.2
# Conflicts: # app/src/main/java/com/geeksville/mesh/service/MeshService.ktpull/276/head^2
commit
d3556ea9f9
|
@ -488,11 +488,11 @@ class MeshService : Service(), Logging {
|
|||
/**
|
||||
* Return the nodeinfo for the local node, or null if not found
|
||||
*/
|
||||
private val localNodeInfo get(): NodeInfo? =
|
||||
private val localNodeInfo
|
||||
get(): NodeInfo? =
|
||||
try {
|
||||
toNodeInfo(myNodeNum)
|
||||
}
|
||||
catch(ex: Exception) {
|
||||
} catch (ex: Exception) {
|
||||
null
|
||||
}
|
||||
|
||||
|
@ -542,7 +542,11 @@ class MeshService : Service(), Logging {
|
|||
}
|
||||
|
||||
/// A helper function that makes it easy to update node info objects
|
||||
private fun updateNodeInfo(nodeNum: Int, withBroadcast: Boolean = true, updateFn: (NodeInfo) -> Unit) {
|
||||
private fun updateNodeInfo(
|
||||
nodeNum: Int,
|
||||
withBroadcast: Boolean = true,
|
||||
updateFn: (NodeInfo) -> Unit
|
||||
) {
|
||||
val info = getOrCreateNodeInfo(nodeNum)
|
||||
updateFn(info)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue