diff eventLogger.h @ 38:0dfe9e0c01aa

Evnt trails fit with uploads. Smooth button.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Wed, 10 Apr 2013 18:57:05 +0100
parents 790939017078
children df7c08faf541
line wrap: on
line diff
--- a/eventLogger.h	Tue Apr 09 17:14:31 2013 +0100
+++ b/eventLogger.h	Wed Apr 10 18:57:05 2013 +0100
@@ -28,7 +28,7 @@
 #import "ServerComms.h"
 #include "grid.h"
 
-#define EVENT_THIN_FACTOR 15
+#define EVENT_THIN_FACTOR 12
 #define EVENT_LOG_FILENAME "log.json"
 #define UPLOAD_CHUNK_SIZE 100
 #define APP_CREATION_TIME 381429000000   // milliseconds to the time i wrote this wee blighter. saves digits
@@ -174,9 +174,12 @@
     void drawTrail(const TwoVector min, const TwoVector max);
     vector<lEvent> getDrawableEventsInRange(const TwoVector min, const TwoVector max);
     vector<TwoVector> getRecentPath(int numEvents);
+    
+    void clearTrail();
 private:
   
-    vector<lEvent> theEvents;
+    vector<lEvent> theEvents; // all logged but not uploaded events
+    deque<lEvent> eventsToDraw; // 200 or so drawable events, maybe uploaded maybe not
 
     void thinnedLogEvent(lEvent nextEvent);
     void thinnedScrollEvent(lEvent nextEvent);
@@ -186,7 +189,7 @@
     
     ofxiPhoneDeviceType iOSdeviceType;
     
-    bool testConnection();
+    void testConnection();
     vector<int> questionnaireAnswers;
     int interfaceOrder;