Skip to content

Commit

Permalink
[datalink] rename pprz_telemetry struct to periodic_telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Mar 24, 2015
1 parent a893003 commit b2e0cd3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions sw/airborne/subsystems/datalink/telemetry.c
Expand Up @@ -33,7 +33,7 @@
/** Implement global structures from generated header
*/
struct telemetry_msg telemetry_msgs[TELEMETRY_NB_MSG] = TELEMETRY_STRUCT;
struct pprz_telemetry pprz_telemetry = { TELEMETRY_NB_MSG, telemetry_msgs };
struct periodic_telemetry pprz_telemetry = { TELEMETRY_NB_MSG, telemetry_msgs };


/** Register a telemetry callback function.
Expand All @@ -42,9 +42,9 @@ struct pprz_telemetry pprz_telemetry = { TELEMETRY_NB_MSG, telemetry_msgs };
* @param _cb callback function, called according to telemetry mode and specified period
* @return TRUE if message registered with success, FALSE otherwise
*/
bool_t register_periodic_telemetry(struct pprz_telemetry *_pt, const char *_msg, telemetry_cb _cb)
bool_t register_periodic_telemetry(struct periodic_telemetry *_pt, const char *_msg, telemetry_cb _cb)
{
// return FALSE if NULL is passed as pprz_telemetry
// return FALSE if NULL is passed as periodic_telemetry
if (_pt == NULL) { return FALSE; }
// look for message name
uint8_t i;
Expand Down
2 changes: 1 addition & 1 deletion sw/airborne/subsystems/datalink/telemetry.h
Expand Up @@ -60,7 +60,7 @@
* Filled with generated structure from periodic_telemetry.h
*/
extern struct telemetry_msg telemetry_msgs[TELEMETRY_NB_MSG];
extern struct pprz_telemetry pprz_telemetry;
extern struct periodic_telemetry pprz_telemetry;

/** Set default periodic telemetry
*/
Expand Down
8 changes: 4 additions & 4 deletions sw/airborne/subsystems/datalink/telemetry_common.h
Expand Up @@ -45,11 +45,11 @@ struct telemetry_msg {
telemetry_cb cb; ///< callback funtion
};

/** Telemetry structure.
/** Periodic telemetry structure.
* Contains the total number of messages (from generated telemetry file)
* and the list of registered callbacks
*/
struct pprz_telemetry {
struct periodic_telemetry {
uint8_t nb; ///< number of messages
struct telemetry_msg *msgs; ///< the list of (msg name, callbacks)
};
Expand All @@ -62,9 +62,9 @@ struct pprz_telemetry {
* @return TRUE if message registered with success, FALSE otherwise
*/
#if PERIODIC_TELEMETRY
extern bool_t register_periodic_telemetry(struct pprz_telemetry *_pt, const char *_msg, telemetry_cb _cb);
extern bool_t register_periodic_telemetry(struct periodic_telemetry *_pt, const char *_msg, telemetry_cb _cb);
#else
static inline bool_t register_periodic_telemetry(struct pprz_telemetry *_pt __attribute__((unused)),
static inline bool_t register_periodic_telemetry(struct periodic_telemetry *_pt __attribute__((unused)),
const char *_msg __attribute__((unused)), telemetry_cb _cb __attribute__((unused))) { return FALSE; }
#endif

Expand Down
2 changes: 1 addition & 1 deletion sw/tools/generators/gen_periodic.ml
Expand Up @@ -191,7 +191,7 @@ let print_process_send = fun out_h xml freq modules ->
fprintf out_h "extern uint8_t telemetry_mode_%s;\n" process_name;
fprintf out_h "#endif /* PERIODIC_C_%s */\n" (String.uppercase process_name);

lprintf out_h "static inline void periodic_telemetry_send_%s(struct pprz_telemetry *telemetry, struct transport_tx *trans, struct link_device *dev) { /* %dHz */\n" process_name freq;
lprintf out_h "static inline void periodic_telemetry_send_%s(struct periodic_telemetry *telemetry, struct transport_tx *trans, struct link_device *dev) { /* %dHz */\n" process_name freq;
right ();
output_modes out_h process_name modes freq modules;
left ();
Expand Down

0 comments on commit b2e0cd3

Please sign in to comment.