mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
dataman:fix types
This commit is contained in:
committed by
Julian Oes
parent
77082188d8
commit
350e43f02c
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2013-2016 PX4 Development Team. All rights reserved.
|
||||
* Copyright (c) 2013-2016, 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -834,7 +834,7 @@ _ram_initialize(unsigned max_offset)
|
||||
dm_operations_data.ram.data = (uint8_t *)malloc(max_offset);
|
||||
|
||||
if (dm_operations_data.ram.data == nullptr) {
|
||||
PX4_WARN("Could not allocate %d bytes of memory", max_offset);
|
||||
PX4_WARN("Could not allocate %u bytes of memory", max_offset);
|
||||
px4_sem_post(&g_init_sema); /* Don't want to hang startup */
|
||||
return -1;
|
||||
}
|
||||
@@ -1091,7 +1091,7 @@ task_main(int argc, char *argv[])
|
||||
_dm_write_perf = perf_alloc(PC_ELAPSED, MODULE_NAME": write");
|
||||
|
||||
/* see if we need to erase any items based on restart type */
|
||||
int sys_restart_val;
|
||||
int32_t sys_restart_val;
|
||||
|
||||
const char *restart_type_str = "Unknown restart";
|
||||
|
||||
@@ -1116,14 +1116,14 @@ task_main(int argc, char *argv[])
|
||||
switch (backend) {
|
||||
case BACKEND_FILE:
|
||||
if (sys_restart_val != DM_INIT_REASON_POWER_ON) {
|
||||
PX4_INFO("%s, data manager file '%s' size is %d bytes",
|
||||
PX4_INFO("%s, data manager file '%s' size is %u bytes",
|
||||
restart_type_str, k_data_manager_device_path, max_offset);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case BACKEND_RAM:
|
||||
PX4_INFO("%s, data manager RAM size is %d bytes",
|
||||
PX4_INFO("%s, data manager RAM size is %u bytes",
|
||||
restart_type_str, max_offset);
|
||||
break;
|
||||
|
||||
@@ -1247,11 +1247,11 @@ static void
|
||||
status()
|
||||
{
|
||||
/* display usage statistics */
|
||||
PX4_INFO("Writes %d", g_func_counts[dm_write_func]);
|
||||
PX4_INFO("Reads %d", g_func_counts[dm_read_func]);
|
||||
PX4_INFO("Clears %d", g_func_counts[dm_clear_func]);
|
||||
PX4_INFO("Restarts %d", g_func_counts[dm_restart_func]);
|
||||
PX4_INFO("Max Q lengths work %d, free %d", g_work_q.max_size, g_free_q.max_size);
|
||||
PX4_INFO("Writes %u", g_func_counts[dm_write_func]);
|
||||
PX4_INFO("Reads %u", g_func_counts[dm_read_func]);
|
||||
PX4_INFO("Clears %u", g_func_counts[dm_clear_func]);
|
||||
PX4_INFO("Restarts %u", g_func_counts[dm_restart_func]);
|
||||
PX4_INFO("Max Q lengths work %u, free %u", g_work_q.max_size, g_free_q.max_size);
|
||||
perf_print_counter(_dm_read_perf);
|
||||
perf_print_counter(_dm_write_perf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user