dataman: don't wrap around at 256

The dataman started overwriting contents after 256 items because the
item index were only uint8_t. This fix allows for more than 256
waypoints.
This commit is contained in:
Julian Oes
2017-02-15 22:29:24 -05:00
committed by Daniel Agar
parent 081c40c6fa
commit 8c1e85a65f
2 changed files with 19 additions and 19 deletions
+2 -2
View File
@@ -134,7 +134,7 @@ typedef union dataman_max_size_t {
__EXPORT ssize_t
dm_read(
dm_item_t item, /* The item type to retrieve */
unsigned char index, /* The index of the item */
unsigned index, /* The index of the item */
void *buffer, /* Pointer to caller data buffer */
size_t buflen /* Length in bytes of data to retrieve */
);
@@ -143,7 +143,7 @@ dm_read(
__EXPORT ssize_t
dm_write(
dm_item_t item, /* The item type to store */
unsigned char index, /* The index of the item */
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 */