mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor(firmware): Simplify ESP32 firmware check (#4272)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
85a6900b74
commit
b73a304452
8 changed files with 37 additions and 247 deletions
|
|
@ -30,11 +30,6 @@ data class BootloaderOtaQuirk(
|
|||
* one-time bootloader upgrade (typically via USB) before DFU updates from the app work.
|
||||
*/
|
||||
@SerialName("requiresBootloaderUpgradeForOta") val requiresBootloaderUpgradeForOta: Boolean = false,
|
||||
/**
|
||||
* Indicates that the device supports the ESP32 Unified OTA protocol. When true, the app will use the unified OTA
|
||||
* handler instead of Nordic DFU.
|
||||
*/
|
||||
@SerialName("supportsUnifiedOta") val supportsUnifiedOta: Boolean = false,
|
||||
/** Optional URL pointing to documentation on how to update the bootloader. */
|
||||
@SerialName("infoUrl") val infoUrl: String? = null,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -38,7 +38,10 @@ data class DeviceHardware(
|
|||
val requiresBootloaderUpgradeForOta: Boolean? = null,
|
||||
/** Optional URL pointing to documentation for upgrading the bootloader. */
|
||||
val bootloaderInfoUrl: String? = null,
|
||||
val supportsUnifiedOta: Boolean = false,
|
||||
val supportLevel: Int? = null,
|
||||
val tags: List<String>? = null,
|
||||
)
|
||||
) {
|
||||
/** Returns true if the device architecture is ESP32-based. */
|
||||
val isEsp32Arc: Boolean
|
||||
get() = architecture.startsWith("esp32", ignoreCase = true)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue