commonMain.com.divpundir.mavlink.definitions.matrixpilot.MavPreflightStorageAction.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of definitions-jvm Show documentation
Show all versions of definitions-jvm Show documentation
A modern MAVLink library for the JVM written in Kotlin.
The newest version!
package com.divpundir.mavlink.definitions.matrixpilot
import com.divpundir.mavlink.api.GeneratedMavEnum
import com.divpundir.mavlink.api.GeneratedMavEnumEntry
import com.divpundir.mavlink.api.MavEnum
import kotlin.UInt
/**
* Action required when performing CMD_PREFLIGHT_STORAGE
*/
@GeneratedMavEnum
public enum class MavPreflightStorageAction(
override val `value`: UInt,
) : MavEnum {
/**
* Read all parameters from storage
*/
@GeneratedMavEnumEntry
MAV_PFS_CMD_READ_ALL(0u),
/**
* Write all parameters to storage
*/
@GeneratedMavEnumEntry
MAV_PFS_CMD_WRITE_ALL(1u),
/**
* Clear all parameters in storage
*/
@GeneratedMavEnumEntry
MAV_PFS_CMD_CLEAR_ALL(2u),
/**
* Read specific parameters from storage
*/
@GeneratedMavEnumEntry
MAV_PFS_CMD_READ_SPECIFIC(3u),
/**
* Write specific parameters to storage
*/
@GeneratedMavEnumEntry
MAV_PFS_CMD_WRITE_SPECIFIC(4u),
/**
* Clear specific parameters in storage
*/
@GeneratedMavEnumEntry
MAV_PFS_CMD_CLEAR_SPECIFIC(5u),
/**
* do nothing
*/
@GeneratedMavEnumEntry
MAV_PFS_CMD_DO_NOTHING(6u),
;
public companion object : MavEnum.MavCompanion {
override fun getEntryFromValueOrNull(v: UInt): MavPreflightStorageAction? = when (v) {
0u -> MAV_PFS_CMD_READ_ALL
1u -> MAV_PFS_CMD_WRITE_ALL
2u -> MAV_PFS_CMD_CLEAR_ALL
3u -> MAV_PFS_CMD_READ_SPECIFIC
4u -> MAV_PFS_CMD_WRITE_SPECIFIC
5u -> MAV_PFS_CMD_CLEAR_SPECIFIC
6u -> MAV_PFS_CMD_DO_NOTHING
else -> null
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy