From e4b55179d1f53c42916f5e62fb83789973bf4b01 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Tue, 29 Jan 2013 22:10:37 +0200 Subject: Add an example of handling doubles on AVR platform. --- example_avr_double/doubleproto.proto | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 example_avr_double/doubleproto.proto (limited to 'example_avr_double/doubleproto.proto') diff --git a/example_avr_double/doubleproto.proto b/example_avr_double/doubleproto.proto new file mode 100644 index 00000000..d8b7f2db --- /dev/null +++ b/example_avr_double/doubleproto.proto @@ -0,0 +1,13 @@ +// A message containing doubles, as used by other applications. +message DoubleMessage { + required double field1 = 1; + required double field2 = 2; +} + +// A message containing doubles, but redefined using uint64_t. +// For use in AVR code. +message AVRDoubleMessage { + required fixed64 field1 = 1; + required fixed64 field2 = 2; +} + -- cgit 1.2.3-korg