1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-28 06:24:10 +01:00

OP-1365 Flight code instrumentation API: Fix wrapper not publishing last counter

This commit is contained in:
Alessio Morale 2014-06-07 17:33:37 +02:00
parent 08e4ec7fd3
commit e8a3706351

View File

@ -49,7 +49,7 @@ void InstrumentationPublishAllCounters()
void counterCallback(const pios_perf_counter_t *counter, const int8_t index, __attribute__((unused)) void *context)
{
if (publishedCountersInstances < index) {
if (publishedCountersInstances < index + 1) {
PerfCounterCreateInstance();
publishedCountersInstances++;
}