diff --git a/.pydevproject b/.pydevproject new file mode 100644 index 000000000..40e9f40a0 --- /dev/null +++ b/.pydevproject @@ -0,0 +1,5 @@ + + +Default +python 2.7 + diff --git a/flight/pios/inc/pios_instrumentation.h b/flight/pios/inc/pios_instrumentation.h index 1926cc734..8c1667d71 100644 --- a/flight/pios/inc/pios_instrumentation.h +++ b/flight/pios/inc/pios_instrumentation.h @@ -44,7 +44,7 @@ extern int8_t pios_instrumentation_last_used_counter; /** * Update a counter with a new value - * @param counterIdx index of the counter to update @see PIOS_Instrumentation_SearchCounter @see PIOS_Instrumentation_CreateCounter + * @param counter_handle handle of the counter to update @see PIOS_Instrumentation_SearchCounter @see PIOS_Instrumentation_CreateCounter * @param newValue the updated value. */ inline void PIOS_Instrumentation_updateCounter(pios_counter_t counter_handle, int32_t newValue) @@ -65,7 +65,7 @@ inline void PIOS_Instrumentation_updateCounter(pios_counter_t counter_handle, in /** * Used to determine the time duration of a code block, mark the begin of the block. @see PIOS_Instrumentation_TimeEnd - * @param counterIdx counterIdx index of the counter @see PIOS_Instrumentation_SearchCounter @see PIOS_Instrumentation_CreateCounter + * @param counter_handle handle of the counter @see PIOS_Instrumentation_SearchCounter @see PIOS_Instrumentation_CreateCounter */ inline void PIOS_Instrumentation_TimeStart(pios_counter_t counter_handle) { @@ -79,7 +79,7 @@ inline void PIOS_Instrumentation_TimeStart(pios_counter_t counter_handle) /** * Used to determine the time duration of a code block, mark the end of the block. @see PIOS_Instrumentation_TimeStart - * @param counterIdx counterIdx index of the counter @see PIOS_Instrumentation_SearchCounter @see PIOS_Instrumentation_CreateCounter + * @param counter_handle handle of the counter @see PIOS_Instrumentation_SearchCounter @see PIOS_Instrumentation_CreateCounter */ inline void PIOS_Instrumentation_TimeEnd(pios_counter_t counter_handle) { @@ -100,7 +100,7 @@ inline void PIOS_Instrumentation_TimeEnd(pios_counter_t counter_handle) /** * Used to determine the mean period between each call to the function - * @param counterIdx counterIdx index of the counter @see PIOS_Instrumentation_SearchCounter @see PIOS_Instrumentation_CreateCounter + * @param counter_handle handle of the counter @see PIOS_Instrumentation_SearchCounter @see PIOS_Instrumentation_CreateCounter */ inline void PIOS_Instrumentation_TrackPeriod(pios_counter_t counter_handle) { @@ -129,15 +129,16 @@ void PIOS_Instrumentation_Init(int8_t maxCounters); /** * Create a new counter. - * @param id the unique id to assig to the counter - * @return the counter index to be used to manage its content + * @param id the unique id to assign to the counter + * @return the counter handle to be used to manage its content */ pios_counter_t PIOS_Instrumentation_CreateCounter(uint32_t id); /** * search a counter index by its unique Id - * @param id the unique id to assig to the counter - * @return the counter index to be used to manage its content + * @param id the unique id to assign to the counter. + * If a counter with the same id exists, the previous instance is returned + * @return the counter handle to be used to manage its content */ pios_counter_t PIOS_Instrumentation_SearchCounter(uint32_t id); diff --git a/flight/pios/inc/pios_instrumentation_helper.h b/flight/pios/inc/pios_instrumentation_helper.h index 2ca62a845..43f3d2ff2 100644 --- a/flight/pios/inc/pios_instrumentation_helper.h +++ b/flight/pios/inc/pios_instrumentation_helper.h @@ -30,50 +30,50 @@ */ /** -* \par -* This is a collections of helper macros that ease adding instrumentation support. -* \par -* Step by step guide: -* -* Define PIOS_INSTRUMENT_MODULE before including this file to enable instrumentation for a module -* -*
#define PIOS_INSTRUMENT_MODULE
-* #include 
-* -* Declare the variables used to hold counter handlers. -* Place the following code along all module variables declaration. -*
PERF_DEFINE_COUNTER(counterUpd);
-* PERF_DEFINE_COUNTER(counterAccelSamples);
-* PERF_DEFINE_COUNTER(counterPeriod);
-* PERF_DEFINE_COUNTER(counterAtt);
-* -* Counters needs to be initialized before they are used. -* The following code needs to be added to a function called at module initialization. -* the second parameter is a unique counter Id. -* A good pracice is to use the upper half word as module id and lower as counter id -*
PERF_INIT_COUNTER(counterUpd, 0xA7710001);
-* PERF_INIT_COUNTER(counterAtt, 0xA7710002);
-* PERF_INIT_COUNTER(counterPeriod, 0xA7710003);
-* PERF_INIT_COUNTER(counterAccelSamples, 0xA7710004);
-* -* At this point you can start using the counters as in the following samples -* -* Track the time spent on a certain function: -*
PERF_TIMED_SECTION_START(counterAtt);
-* updateAttitude(&accelState, &gyros);
-* PERF_TIMED_SECTION_END(counterAtt);
-* PERF_TIMED_SECTION_[START!STOP] marks the beginning and the end of the code to monitor -* -* Measure the mean of the period a certain point is reached: -*
PERF_MEASURE_PERIOD(counterPeriod);
-* Note that the value stored in the counter is a long running mean while max and min are single point values -* -* Track an user defined int32_t value: -*
PERF_TRACK_VALUE(counterAccelSamples, i);
-* the counter is then updated with the value of i. -* -* \par -*/ + * \par + * This is a collections of helper macros that ease adding instrumentation support. + * \par + * Step by step guide: + * + * Define PIOS_INSTRUMENT_MODULE before including this file to enable instrumentation for a module + * + *
#define PIOS_INSTRUMENT_MODULE
+ * #include 
+ * + * Declare the variables used to hold counter handlers. + * Place the following code along all module variables declaration. + *
PERF_DEFINE_COUNTER(counterUpd);
+ * PERF_DEFINE_COUNTER(counterAccelSamples);
+ * PERF_DEFINE_COUNTER(counterPeriod);
+ * PERF_DEFINE_COUNTER(counterAtt);
+ * + * Counters needs to be initialized before they are used. + * The following code needs to be added to a function called at module initialization. + * the second parameter is a unique counter Id. + * A good pracice is to use the upper half word as module id and lower as counter id + *
PERF_INIT_COUNTER(counterUpd, 0xA7710001);
+ * PERF_INIT_COUNTER(counterAtt, 0xA7710002);
+ * PERF_INIT_COUNTER(counterPeriod, 0xA7710003);
+ * PERF_INIT_COUNTER(counterAccelSamples, 0xA7710004);
+ * + * At this point you can start using the counters as in the following samples + * + * Track the time spent on a certain function: + *
PERF_TIMED_SECTION_START(counterAtt);
+ * updateAttitude(&accelState, &gyros);
+ * PERF_TIMED_SECTION_END(counterAtt);
+ * PERF_TIMED_SECTION_[START!STOP] marks the beginning and the end of the code to monitor + * + * Measure the mean of the period a certain point is reached: + *
PERF_MEASURE_PERIOD(counterPeriod);
+ * Note that the value stored in the counter is a long running mean while max and min are single point values + * + * Track an user defined int32_t value: + *
PERF_TRACK_VALUE(counterAccelSamples, i);
+ * the counter is then updated with the value of i. + * + * \par + */ #ifndef PIOS_INSTRUMENTATION_HELPER_H #define PIOS_INSTRUMENTATION_HELPER_H