mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-07-16 10:03:04 -07:00
cmd_hf_15: fix & simplify flag parsing
This commit is contained in:
parent
7c44337941
commit
7f666d445c
1 changed files with 6 additions and 8 deletions
|
@ -532,15 +532,13 @@ static uint8_t arg_add_default(void *at[]) {
|
|||
}
|
||||
static uint16_t arg_get_raw_flag(uint8_t uidlen, bool unaddressed, bool scan, bool add_option) {
|
||||
uint16_t flags = 0;
|
||||
if (unaddressed) {
|
||||
// unaddressed mode may not be supported by all vendors
|
||||
flags |= (ISO15_REQ_SUBCARRIER_SINGLE | ISO15_REQ_DATARATE_HIGH | ISO15_REQ_NONINVENTORY);
|
||||
;
|
||||
if (uidlen == 8 || scan || unaddressed) {
|
||||
flags = (ISO15_REQ_SUBCARRIER_SINGLE | ISO15_REQ_DATARATE_HIGH | ISO15_REQ_NONINVENTORY);
|
||||
}
|
||||
if (uidlen == 8) {
|
||||
flags |= (ISO15_REQ_SUBCARRIER_SINGLE | ISO15_REQ_DATARATE_HIGH | ISO15_REQ_NONINVENTORY | ISO15_REQ_ADDRESS);
|
||||
}
|
||||
if (scan) {
|
||||
flags |= (ISO15_REQ_SUBCARRIER_SINGLE | ISO15_REQ_DATARATE_HIGH | ISO15_REQ_NONINVENTORY | ISO15_REQ_ADDRESS);
|
||||
if ((!unaddressed) || scan)
|
||||
{
|
||||
flags |= ISO15_REQ_ADDRESS;
|
||||
}
|
||||
if (add_option) {
|
||||
flags |= (ISO15_REQ_OPTION);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue