dataman: remove obsolete persistence and reset reason

This commit is contained in:
Daniel Agar
2021-12-12 12:06:35 -05:00
committed by GitHub
parent ad1bfb5410
commit 986cf288da
10 changed files with 61 additions and 287 deletions
-23
View File
@@ -52,7 +52,6 @@ typedef enum {
DM_KEY_FENCE_POINTS, /* Fence vertex coordinates */
DM_KEY_WAYPOINTS_OFFBOARD_0, /* Mission way point coordinates sent over mavlink */
DM_KEY_WAYPOINTS_OFFBOARD_1, /* (alternate between 0 and 1) */
DM_KEY_WAYPOINTS_ONBOARD, /* Mission way point coordinates generated onboard */
DM_KEY_MISSION_STATE, /* Persistent mission state */
DM_KEY_COMPAT,
DM_KEY_NUM_KEYS /* Total number of item types defined */
@@ -64,7 +63,6 @@ enum {
DM_KEY_FENCE_POINTS_MAX = 16,
DM_KEY_WAYPOINTS_OFFBOARD_0_MAX = NUM_MISSIONS_SUPPORTED,
DM_KEY_WAYPOINTS_OFFBOARD_1_MAX = NUM_MISSIONS_SUPPORTED,
DM_KEY_WAYPOINTS_ONBOARD_MAX = (NUM_MISSIONS_SUPPORTED / 10),
DM_KEY_MISSION_STATE_MAX = 1,
DM_KEY_COMPAT_MAX = 1
};
@@ -75,24 +73,10 @@ enum {
DM_KEY_FENCE_POINTS_MAX = 64,
DM_KEY_WAYPOINTS_OFFBOARD_0_MAX = NUM_MISSIONS_SUPPORTED,
DM_KEY_WAYPOINTS_OFFBOARD_1_MAX = NUM_MISSIONS_SUPPORTED,
DM_KEY_WAYPOINTS_ONBOARD_MAX = NUM_MISSIONS_SUPPORTED,
DM_KEY_MISSION_STATE_MAX = 1,
DM_KEY_COMPAT_MAX = 1
};
#endif
/** Data persistence levels */
typedef enum {
DM_PERSIST_POWER_ON_RESET = 0, /* Data survives all resets */
DM_PERSIST_IN_FLIGHT_RESET, /* Data survives in-flight resets only */
DM_PERSIST_VOLATILE /* Data does not survive resets */
} dm_persitence_t;
/** The reason for the last reset */
typedef enum {
DM_INIT_REASON_POWER_ON = 0, /* Data survives resets */
DM_INIT_REASON_IN_FLIGHT, /* Data survives in-flight resets only */
DM_INIT_REASON_VOLATILE /* Data does not survive reset */
} dm_reset_reason;
struct dataman_compat_s {
uint64_t key;
@@ -120,7 +104,6 @@ __EXPORT ssize_t
dm_write(
dm_item_t item, /* The item type to store */
unsigned index, /* The index of the item */
dm_persitence_t persistence, /* The persistence level of this item */
const void *buffer, /* Pointer to caller data buffer */
size_t buflen /* Length in bytes of data to retrieve */
);
@@ -157,12 +140,6 @@ dm_clear(
dm_item_t item /* The item type to clear */
);
/** Tell the data manager about the type of the last reset */
__EXPORT int
dm_restart(
dm_reset_reason restart_type /* The last reset type */
);
#ifdef __cplusplus
}
#endif