}
int CmdAWIDDemodFSK(const char *Cmd) {
- int findone = 0;
- if (Cmd[0] == 'h' || Cmd[0] == 'H') return usage_lf_awid_fskdemod();
- if (Cmd[0] == '1') findone = 1;
+ if (Cmd[0] == 'h' || Cmd[0] == 'H') return usage_lf_awid_fskdemod();
+ uint8_t findone = (Cmd[0] == '1') ? 1 : 0;
UsbCommand c = {CMD_AWID_DEMOD_FSK, {findone, 0, 0}};
clearCommandBuffer();
SendCommand(&c);
if ( !fc || !cn) return usage_lf_awid_clone();
- if (param_getchar(Cmd, 4) == 'Q' || param_getchar(Cmd, 4) == 'q')
+ if (param_getchar(Cmd, 3) == 'Q' || param_getchar(Cmd, 3) == 'q')
//t5555 (Q5) BITRATE = (RF-2)/2 (iceman)
- blocks[0] = T5555_MODULATION_FSK2 | T5555_INVERT_OUTPUT | 50<<T5555_BITRATE_SHIFT | 3<<T5555_MAXBLOCK_SHIFT;
+ blocks[0] = T5555_MODULATION_FSK2 | T5555_INVERT_OUTPUT | ((50-2)>>1) << T5555_BITRATE_SHIFT | 3<<T5555_MAXBLOCK_SHIFT;
verify_values(&fmtlen, &fc, &cn);