When this happens, a message appears at push of "Start" button similar to:
Code: Select all
invalid checksum for command 116: 32 expected, got 0
<116 99> {656767596665827959776571596765778384656686697659123677627111906500050065367762301124030234030238545016157110020845142080701010040000001263677622811300000000001000000000} [0]
ACC;BARO;MAG;CAMSTABVEL;$M>oZA
Environment:
- Arduino 1.0.1
- Processing 1.5.1
- Fresh download of Multiwii 2.1 zip file and/or fresh pull of tip of shared (both fail)
- Fails on Genuine Arduino Mega 2560
- Fails on Sparkfun Arduino Pro Mini
Increasing serial.ino "#define TX_BUFFER_SIZE 128" to 256 fixes this. Obviously, not a suitable fix (because of RAM constraints).
Changing the lines
Code: Select all
uint8_t bytesTXBuff = ((uint8_t)(headTX-tailTX))%TX_BUFFER_SIZE; // indicates the number of occupied bytes in TX buffer
if (bytesTXBuff > TX_BUFFER_SIZE - 40 ) return; // ensure there is enough free TX buffer to go further (40 bytes margin)
Why does this fail for me and not others?
Is it OK to change the free space to 50? This seems to fix it and doesn't break anything else.
Danal