aboutsummaryrefslogtreecommitdiff
path: root/apps/hott_telemetry/messages.h
diff options
context:
space:
mode:
authorSimon Wilks <sjwilks@gmail.com>2012-11-22 16:20:48 +0100
committerSimon Wilks <sjwilks@gmail.com>2012-11-22 16:20:48 +0100
commit14d874f4a15653fce2902f016b1e75373afadd51 (patch)
tree41ff65116a1d1c0884bdd96252979ab743b767db /apps/hott_telemetry/messages.h
parentcc7952ea94f30b62be70486f42b47bcffee7f8eb (diff)
downloadpx4-firmware-14d874f4a15653fce2902f016b1e75373afadd51.tar.gz
px4-firmware-14d874f4a15653fce2902f016b1e75373afadd51.tar.bz2
px4-firmware-14d874f4a15653fce2902f016b1e75373afadd51.zip
Fix some memory corruption bugs.
Diffstat (limited to 'apps/hott_telemetry/messages.h')
-rw-r--r--apps/hott_telemetry/messages.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/hott_telemetry/messages.h b/apps/hott_telemetry/messages.h
index 74418fd01..2e0699ace 100644
--- a/apps/hott_telemetry/messages.h
+++ b/apps/hott_telemetry/messages.h
@@ -43,13 +43,19 @@
#include <stdlib.h>
+/* The buffer size used to store messages. This must be at least as big as the number of
+ * fields in the largest message struct.
+ */
+#define MESSAGE_BUFFER_SIZE 50
+
/* The HoTT receiver demands a minimum 5ms period of silence after delivering its request.
* Note that the value specified here is lower than 5000 (5ms) as time is lost constucting
* the message after the read which takes some milliseconds.
*/
#define POST_READ_DELAY_IN_USECS 4000
/* A pause of 3ms is required between each uint8_t sent back to the HoTT receiver. Much lower
- values can be used in practise though. */
+ * values can be used in practise though.
+ */
#define POST_WRITE_DELAY_IN_USECS 1500
// Protocol constants.
@@ -112,6 +118,6 @@ struct eam_module_msg {
};
void messages_init(void);
-void build_eam_response(char **buffer, int *size);
+void build_eam_response(uint8_t *buffer, int *size);
#endif /* MESSAGES_H_ */