]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/ui.c
ADD: `data detectclock` - added clock blocks in plot window. Its a draft. Not working...
[proxmark3-svn] / client / ui.c
index 6819f649f0b47b3f0ad398f5ae61c0801007b72c..2c344b680713c747e152afb340c8236fa1d3d632 100644 (file)
 //-----------------------------------------------------------------------------
 
 #include "ui.h"
+
+// set QT vars
 double CursorScaleFactor;
-int PlotGridX, PlotGridY, PlotGridXdefault= 64, PlotGridYdefault= 64;
+int PlotGridX, PlotGridY, PlotGridXdefault = 64, PlotGridYdefault = 64, CursorCPos = 0, CursorDPos = 0;
+int PlotClock = 0, PlockClockStartIndex = 0;
+
 int offline;
 int flushAfterWrite = 0;
 extern pthread_mutex_t print_lock;
@@ -25,7 +29,10 @@ void PrintAndLog(char *fmt, ...)
        va_list argptr, argptr2;
        static FILE *logfile = NULL;
        static int logging = 1;
-
+       // time_t current_time;
+       // struct tm* tm_info;
+       // char buffer[26] = {0};
+               
        // lock this section to avoid interlacing prints from different threats
        pthread_mutex_lock(&print_lock);
   
@@ -63,6 +70,16 @@ void PrintAndLog(char *fmt, ...)
        }
        
        if (logging && logfile) {
+
+               /*
+               // Obtain current time.
+               current_time = time(NULL);
+               // Convert to local time format.
+               tm_info = localtime(&current_time);             
+               strftime(buffer, 26, "%Y-%m-%d %H:%M:%S", tm_info);
+               fprintf(logfile, "%s  ", buffer);
+               */
+               
                vfprintf(logfile, fmt, argptr2);
                fprintf(logfile,"\n");
                fflush(logfile);
Impressum, Datenschutz