main.com.divpundir.mavlink.definitions.common.StorageUsageFlag.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of definitions Show documentation
Show all versions of definitions Show documentation
A modern MAVLink library for the JVM written in Kotlin.
package com.divpundir.mavlink.definitions.common
import com.divpundir.mavlink.api.GeneratedMavEnum
import com.divpundir.mavlink.api.GeneratedMavEnumEntry
import com.divpundir.mavlink.api.MavEnum
import kotlin.UInt
/**
* Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and
* MAV_CMD_SET_STORAGE_USAGE).
*/
@GeneratedMavEnum
public enum class StorageUsageFlag(
public override val `value`: UInt,
) : MavEnum {
/**
* Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported).
*/
@GeneratedMavEnumEntry
SET(1u),
/**
* Storage for saving photos.
*/
@GeneratedMavEnumEntry
PHOTO(2u),
/**
* Storage for saving videos.
*/
@GeneratedMavEnumEntry
VIDEO(4u),
/**
* Storage for saving logs.
*/
@GeneratedMavEnumEntry
LOGS(8u),
;
public companion object : MavEnum.Companion {
public override fun getEntryFromValueOrNull(v: UInt): StorageUsageFlag? = when (v) {
1u -> SET
2u -> PHOTO
4u -> VIDEO
8u -> LOGS
else -> null
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy