mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
fixing the wrong calculations
This commit is contained in:
parent
5a56504fc1
commit
424e68dff6
3 changed files with 63 additions and 51 deletions
|
@ -65,17 +65,18 @@ typedef struct {
|
|||
} PACKED iso14b_raw_cmd_t;
|
||||
|
||||
|
||||
#define US_TO_SSP(x) ( (int32_t)((x) * 3.39) )
|
||||
#define US_TO_SSP(x) ( (int32_t) ((x) * 3.39) )
|
||||
#define SSP_TO_US(x) ( (int32_t)((x) / 3.39) )
|
||||
|
||||
#define ETU_TO_SSP(x) ( (int32_t)((x) * 32) )
|
||||
#define SSP_TO_ETU(x) ( (int32_t)((x) / 32) )
|
||||
#define HF14_ETU_TO_SSP(x) ((x) << 5) // 1 ETU = 32 SSP
|
||||
#define HF14_SSP_TO_ETU(x) ((x) >> 5) //
|
||||
|
||||
#define ONE_ETU_IN_US (12800000.0 / 1356000.0)
|
||||
#define ETU_TO_US(x) (float)(ONE_ETU_IN_US * (x))
|
||||
#define HF14_ETU_TO_US(x) ( (float)((x) * 9.4396) )
|
||||
#define HF14_ETU_TO_US_2(x) ( (int32_t)( ((x) * 9439600) / 1000000) )
|
||||
|
||||
// #define ETU_TO_US(x) ( (int32_t)( ((x) * 9440000) / 1000000) )
|
||||
#define US_TO_ETU(x) ( (int32_t)( ((x) * 1000000) / 9440000) )
|
||||
// #define US_TO_ETU(x) ( (int32_t)( ((x) * 1000000) / 9439600) )
|
||||
|
||||
#define US_TO_ETU(x) ( (float)((x) / 9.4396) )
|
||||
|
||||
#endif // _ISO14B_H_
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue