X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fcore%2Fao_log.h;h=dce12f02279a19ae7c44acb4f5382dad1e68799e;hb=62547a042d042fadec652c5081f96816a8e66970;hp=95b3764991c47554669132244cc27b0c3a24a9e9;hpb=57b4d82dee10b142b820aa306028a288a85214f6;p=fw%2Faltos diff --git a/src/core/ao_log.h b/src/core/ao_log.h index 95b37649..dce12f02 100644 --- a/src/core/ao_log.h +++ b/src/core/ao_log.h @@ -236,7 +236,8 @@ struct ao_log_mega { int16_t v_pbatt; /* 6 */ int16_t n_sense; /* 8 */ int16_t sense[10]; /* 10 */ - } volt; /* 30 */ + uint16_t pyro; /* 30 */ + } volt; /* 32 */ /* AO_LOG_GPS_TIME */ struct { int32_t latitude; /* 4 */ @@ -289,12 +290,11 @@ struct ao_log_mini { } u; /* 16 */ }; /* 16 */ -static inline void -ao_log_pack24(uint8_t *dst, uint32_t value) { - dst[0] = value; - dst[1] = value >> 8; - dst[2] = value >> 16; -} +#define ao_log_pack24(dst,value) do { \ + (dst)[0] = (value); \ + (dst)[1] = (value) >> 8; \ + (dst)[2] = (value) >> 16; \ + } while (0) /* Write a record to the eeprom log */ uint8_t