@@ -234,9 +234,9 @@ void Data_Packet::GetData(uint8_t buffer[], uint16_t length)
234
234
}
235
235
236
236
// Get the last data packet (<=128 bytes), calculate checksum, validate checksum received and send it to serial
237
- void Data_Packet::GetLastData (uint8_t * buffer, uint16_t length, bool UseSerialDebug)
237
+ void Data_Packet::GetLastData (uint8_t buffer[] , uint16_t length, bool UseSerialDebug)
238
238
{
239
- for (uint16_t i = 0 ; i<length-2 , i++) Serial.write (buffer[i]);
239
+ for (uint16_t i = 0 ; i<( length-2 ); i++) Serial.write (buffer[i]);
240
240
// The checksum here is arguably useless and may make the serial buffer overflow
241
241
/* this->checksum = CalculateChecksum(buffer, length);
242
242
uint8_t checksum_low = GetLowByte(this->checksum);
@@ -727,11 +727,15 @@ bool FPS_GT511C3::CaptureFinger(bool highquality)
727
727
728
728
// Gets an image that is 258x202 (52116 bytes) and sends it over serial
729
729
// Returns: True (device confirming download)
730
+ // It only worked with baud rate at 38400-57600 in GT-511C3.
731
+ // Slower speeds and the FPS will shutdown. Higher speeds and the serial buffer will overflow.
732
+ // Make sure you are allocating enough CPU time for this task or you will overflow nonetheless.
733
+ // Also, avoid using UseSerialDebug for this task, since it's easier to overflow.
730
734
bool FPS_GT511C3::GetImage ()
731
735
{
732
736
if (UseSerialDebug) Serial.println (" FPS - GetImage" );
733
737
Command_Packet* cp = new Command_Packet ();
734
- cp->Command = Command_Packet::Commands::GetRawImage ;
738
+ cp->Command = Command_Packet::Commands::GetImage ;
735
739
uint8_t * packetbytes = cp->GetPacketBytes ();
736
740
delete cp;
737
741
SendCommand (packetbytes, 12 );
0 commit comments