]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/appmain.c
Merge remote-tracking branch 'upstream/master'
[proxmark3-svn] / armsrc / appmain.c
index 475b1c1b8e7e2a3e593d9dde365e70b5229a50a5..ffe6b7f22f745e47ccdd5c3ed0890682e63081ab 100644 (file)
@@ -37,8 +37,6 @@
  #include "iso14443a.h"
 #endif
 
-#define abs(x) ( ((x)<0) ? -(x) : (x) )
-
 //=============================================================================
 // A buffer where we can queue things up to be sent through the FPGA, for
 // any purpose (fake tag, as reader, whatever). We go MSB first, since that
@@ -842,7 +840,7 @@ void ListenReaderField(int limit)
 
                if (limit != HF_ONLY) {
                        if(mode == 1) {
-                               if (abs(lf_av - lf_baseline) > REPORT_CHANGE) 
+                               if (ABS(lf_av - lf_baseline) > REPORT_CHANGE) 
                                        LED_D_ON();
                                else
                                        LED_D_OFF();
@@ -850,7 +848,7 @@ void ListenReaderField(int limit)
 
                        lf_av_new = AvgAdc(ADC_CHAN_LF);
                        // see if there's a significant change
-                       if(abs(lf_av - lf_av_new) > REPORT_CHANGE) {
+                       if(ABS(lf_av - lf_av_new) > REPORT_CHANGE) {
                                Dbprintf("LF 125/134kHz Field Change: %5dmV", (MAX_ADC_LF_VOLTAGE * lf_av_new) >> 10);
                                lf_av = lf_av_new;
                                if (lf_av > lf_max)
@@ -860,7 +858,7 @@ void ListenReaderField(int limit)
 
                if (limit != LF_ONLY) {
                        if (mode == 1){
-                               if (abs(hf_av - hf_baseline) > REPORT_CHANGE)   
+                               if (ABS(hf_av - hf_baseline) > REPORT_CHANGE)   
                                        LED_B_ON();
                                else
                                        LED_B_OFF();
@@ -868,7 +866,7 @@ void ListenReaderField(int limit)
 
                        hf_av_new = AvgAdc(ADC_CHAN_HF);
                        // see if there's a significant change
-                       if(abs(hf_av - hf_av_new) > REPORT_CHANGE) {
+                       if(ABS(hf_av - hf_av_new) > REPORT_CHANGE) {
                                Dbprintf("HF 13.56MHz Field Change: %5dmV", (MAX_ADC_HF_VOLTAGE * hf_av_new) >> 10);
                                hf_av = hf_av_new;
                                if (hf_av > hf_max)
Impressum, Datenschutz