kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
never let getMyNodeInfo ever return null. fixes an autobug for device removal
rodzic
5d9648f602
commit
cff90c5bd7
|
@ -64,7 +64,8 @@ interface IMeshService {
|
||||||
/// Users should not call this directly, only used internally by the MeshUtil activity
|
/// Users should not call this directly, only used internally by the MeshUtil activity
|
||||||
void setDeviceAddress(String deviceAddr);
|
void setDeviceAddress(String deviceAddr);
|
||||||
|
|
||||||
/// Get basic device hardware info about our connected radio
|
/// Get basic device hardware info about our connected radio. Will never return NULL. Will throw
|
||||||
|
/// RemoteException if no my node info is available
|
||||||
MyNodeInfo getMyNodeInfo();
|
MyNodeInfo getMyNodeInfo();
|
||||||
|
|
||||||
/// Start updating the radios firmware
|
/// Start updating the radios firmware
|
||||||
|
|
|
@ -1488,7 +1488,9 @@ class MeshService : Service(), Logging {
|
||||||
doFirmwareUpdate()
|
doFirmwareUpdate()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getMyNodeInfo(): MyNodeInfo? = this@MeshService.myNodeInfo
|
override fun getMyNodeInfo(): MyNodeInfo = toRemoteExceptions {
|
||||||
|
this@MeshService.myNodeInfo ?: throw RadioNotConnectedException("No MyNodeInfo")
|
||||||
|
}
|
||||||
|
|
||||||
override fun getMyId() = toRemoteExceptions { myNodeID }
|
override fun getMyId() = toRemoteExceptions { myNodeID }
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue