From bc1ca9a4c44e019638adc51af66db1a578c851b6 Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Wed, 16 May 2012 22:04:50 +0200 Subject: digital/beacon: fix bad crc computation for TXbuffer --- digital/beacon/src/twi_specific.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'digital/beacon/src/twi_specific.c') diff --git a/digital/beacon/src/twi_specific.c b/digital/beacon/src/twi_specific.c index 5def1a2b..30da73d9 100644 --- a/digital/beacon/src/twi_specific.c +++ b/digital/beacon/src/twi_specific.c @@ -62,7 +62,7 @@ void twi_task(void) TXbuffer[TWI_TX_TRUST2_FIELD] = position_get_trust(OPPONENT_2); /* Compute CRC */ - TXbuffer[TWI_TX_CRC_FIELD] = crc_compute (&TXbuffer[1], sizeof (TXbuffer) - 1); + TXbuffer[TWI_TX_CRC_FIELD] = crc_compute (&TXbuffer[1],TWI_TX_FIELD_NB-1); /* data to be communicated to the master */ twi_slave_update (TXbuffer, sizeof (TXbuffer)); -- cgit v1.2.3