summaryrefslogtreecommitdiffhomepage
path: root/digital/beacon/src/twi_specific.c
diff options
context:
space:
mode:
authorFlorent Duchon2012-05-16 22:04:50 +0200
committerFlorent Duchon2012-12-24 17:47:56 +0100
commitbc1ca9a4c44e019638adc51af66db1a578c851b6 (patch)
tree19489200a134bf165ea87366db8462b148c43638 /digital/beacon/src/twi_specific.c
parent708585e42c44bc73d4f949174c738f4935556bbf (diff)
digital/beacon: fix bad crc computation for TXbuffer
Diffstat (limited to 'digital/beacon/src/twi_specific.c')
-rw-r--r--digital/beacon/src/twi_specific.c2
1 files changed, 1 insertions, 1 deletions
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));