Fix the problem where the end of the speech wasn't being detected. This is caused by a couple of issues - there was extra data in the speech array and an off by one error in calculating the end pointer.

This commit is contained in:
Jeremy Rand 2016-10-30 23:07:13 -04:00
parent 4e3c65288f
commit 4bc5131b2f
2 changed files with 2 additions and 3 deletions

View File

@ -67,8 +67,7 @@ uint8_t mySpeechData[] = {
0x6B, 0xA8, 0x59, 0x32, 0xE8, 0x6A, 0xA8, 0x4D,
0x60, 0xE7, 0x29, 0xA8, 0x41, 0x0A, 0xE8, 0x78,
0xA8, 0x41, 0x30, 0xE8, 0x70, 0xA8, 0x39, 0xFF,
0xE8, 0x70, 0xA8, 0x39, 0x00, 0xE8, 0xFF, 0xFF,
0xFF, 0xFF
0xE8, 0x70, 0xA8, 0x39, 0x00, 0xE8
};

View File

@ -34,7 +34,7 @@ bool speakMessage(uint8_t *data, uint16_t dataLen)
return false;
speechData = data;
speechLen = dataLen;
speechLen = dataLen + 1;
setupSpeech();
return true;