Indala fixes - set accurate preamble and start of.. (#385)

.. data for both format types (64 bit and 224 bit)
also adjust 224 bit demod and clone to output and input in PSK2 instead
of PSK1 as this appears to be most common for this format.
This commit is contained in:
marshmellow42 2017-08-27 06:10:28 -04:00 committed by pwpiwi
commit 1dae9811f2
4 changed files with 58 additions and 20 deletions

View file

@ -40,10 +40,16 @@ int CmdIndalaDecode(const char *Cmd) {
}
uint8_t invert=0;
size_t size = DemodBufferLen;
int startIdx = indala26decode(DemodBuffer, &size, &invert);
if (startIdx < 0 || size > 224) {
if (g_debugMode) PrintAndLog("Error2: %i",startIdx);
return -1;
int startIdx = indala64decode(DemodBuffer, &size, &invert);
if (startIdx < 0 || size != 64) {
// try 224 indala
invert = 0;
size = DemodBufferLen;
startIdx = indala224decode(DemodBuffer, &size, &invert);
if (startIdx < 0 || size != 224) {
if (g_debugMode) PrintAndLog("Error2: %i",startIdx);
return -1;
}
}
setDemodBuf(DemodBuffer, size, (size_t)startIdx);
setClockGrid(g_DemodClock, g_DemodStartIdx + (startIdx*g_DemodClock));