1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +01:00

OP-1365 Flight code instrumentation API: Fix min/max handling

This commit is contained in:
Alessio Morale 2014-06-06 22:38:49 +02:00
parent 5e9d107c0b
commit 1c92edb18b

View File

@ -49,6 +49,8 @@ int8_t PIOS_Instrumentation_CreateCounter(uint32_t id)
PIOS_Assert(pios_instrumentation_perf_counters && (pios_instrumentation_max_counters > pios_instrumentation_last_used_counter));
int8_t idx = ++pios_instrumentation_last_used_counter;
pios_instrumentation_perf_counters[idx].id = id;
pios_instrumentation_perf_counters[idx].max = INT32_MIN;
pios_instrumentation_perf_counters[idx].min = INT32_MAX;
return idx;
}