sforkowany z mirror/meshtastic-android
Don't include firmware in development builds (speeds install time)
rodzic
c7c89aeb71
commit
40055f603d
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>Mesh Util</name>
|
||||||
|
<comment>Project MeshUtil created by Buildship.</comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
|
@ -0,0 +1,13 @@
|
||||||
|
arguments=
|
||||||
|
auto.sync=false
|
||||||
|
build.scans.enabled=false
|
||||||
|
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
|
||||||
|
connection.project.dir=
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
gradle.user.home=
|
||||||
|
java.home=/usr/lib/jvm/java-8-oracle
|
||||||
|
jvm.arguments=
|
||||||
|
offline.mode=false
|
||||||
|
override.workspace.settings=true
|
||||||
|
show.console.view=true
|
||||||
|
show.executions.view=true
|
3
TODO.md
3
TODO.md
|
@ -1,10 +1,11 @@
|
||||||
# Remaining tasks before declaring 1.0
|
# Remaining tasks before declaring 1.0
|
||||||
|
|
||||||
|
- Android frontend should refetch the android messages from backend service on Resume
|
||||||
- disable software update button after update finishes
|
- disable software update button after update finishes
|
||||||
- first message sent is still doubled for some people
|
- first message sent is still doubled for some people
|
||||||
- Android frontend should refetch the android messages from backend service on Resume
|
|
||||||
- let users set arbitrary params in android
|
- let users set arbitrary params in android
|
||||||
* add a low level settings screen (let user change any of the RadioConfig parameters)
|
* add a low level settings screen (let user change any of the RadioConfig parameters)
|
||||||
|
- optionally include firmware files in debug builds - currently they are release only. per https://developer.android.com/studio/build/build-variants
|
||||||
|
|
||||||
Things for the betaish period.
|
Things for the betaish period.
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
|
||||||
|
<classpathentry kind="output" path="bin/default"/>
|
||||||
|
</classpath>
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>app</name>
|
||||||
|
<comment>Project app created by Buildship.</comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
|
@ -0,0 +1,2 @@
|
||||||
|
connection.project.dir=..
|
||||||
|
eclipse.preferences.version=1
|
|
@ -1442,7 +1442,7 @@ class MeshService : Service(), Logging {
|
||||||
/***
|
/***
|
||||||
* Return the filename we will install on the device
|
* Return the filename we will install on the device
|
||||||
*/
|
*/
|
||||||
fun setFirmwareUpdateFilename(info: MeshProtos.MyNodeInfo) {
|
private fun setFirmwareUpdateFilename(info: MeshProtos.MyNodeInfo) {
|
||||||
firmwareUpdateFilename = try {
|
firmwareUpdateFilename = try {
|
||||||
if (info.region != null && info.firmwareVersion != null && info.hwModel != null)
|
if (info.region != null && info.firmwareVersion != null && info.hwModel != null)
|
||||||
SoftwareUpdateService.getUpdateFilename(
|
SoftwareUpdateService.getUpdateFilename(
|
||||||
|
|
|
@ -219,7 +219,7 @@ class SoftwareUpdateService : JobIntentService(), Logging {
|
||||||
hwVerIn: String,
|
hwVerIn: String,
|
||||||
swVer: String,
|
swVer: String,
|
||||||
mfg: String
|
mfg: String
|
||||||
): String {
|
): String? {
|
||||||
val curver = context.getString(R.string.cur_firmware_version)
|
val curver = context.getString(R.string.cur_firmware_version)
|
||||||
|
|
||||||
val regionRegex = Regex(".+-(.+)")
|
val regionRegex = Regex(".+-(.+)")
|
||||||
|
@ -230,7 +230,12 @@ class SoftwareUpdateService : JobIntentService(), Logging {
|
||||||
val (region) = regionRegex.find(hwVer)?.destructured
|
val (region) = regionRegex.find(hwVer)?.destructured
|
||||||
?: throw Exception("Malformed hw version")
|
?: throw Exception("Malformed hw version")
|
||||||
|
|
||||||
return "firmware/firmware-$mfg-$region-$curver.bin"
|
val name = "firmware/firmware-$mfg-$region-$curver.bin"
|
||||||
|
// Check to see if the file exists (some builds might not include update files for size reasons)
|
||||||
|
return if (!context.assets.list(name).isNullOrEmpty())
|
||||||
|
name
|
||||||
|
else
|
||||||
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return the filename this device needs to use as an update (or null if no update needed)
|
/** Return the filename this device needs to use as an update (or null if no update needed)
|
||||||
|
|
Ładowanie…
Reference in New Issue