commit 7ed40befaf96de67f0e74c1ed1afe83fa8843704
Author: Simon Schulz <sschulz@cit-ec.uni-bielefeld.de>
Date:   Mon Dec 7 14:17:36 2015 +0100

    fixed intendation

diff --git a/src/timestamped_list.cpp b/src/timestamped_list.cpp
index 2f723fe..dc902b0 100644
--- a/src/timestamped_list.cpp
+++ b/src/timestamped_list.cpp
@@ -33,7 +33,7 @@ using namespace boost;
 using namespace humotion;
 
 TimestampedList::TimestampedList(unsigned int s){
-	//initialize the list to its desired size:
+    //initialize the list to its desired size:
     TimestampedFloat now;
     tsf_list.resize(s, now);
 }
@@ -73,7 +73,7 @@ Timestamp TimestampedList::get_last_timestamp(){
 }
 
 void TimestampedList::insert(Timestamp timestamp, float val){
-	//erase first element:
+    //erase first element:
     tsf_list.pop_front();
     tsf_list.push_back(TimestampedFloat(timestamp, val));
     //printf("insert [%5.3f] = %5.1f\n",timestamp,val);
@@ -91,8 +91,8 @@ float TimestampedList::get_newest_value(){
     }
 
     timestamped_float_list_t::iterator it = tsf_list.end();
-	it--;
-	return it->value;
+    it--;
+    return it->value;
 }
 
 float TimestampedList::get_interpolated_value(Timestamp target_ts){
@@ -102,77 +102,77 @@ float TimestampedList::get_interpolated_value(Timestamp target_ts){
     mutex::scoped_lock scoped_lock(access_mutex);
 
     ///target_ts -= 0.001 * 4;
-	
+
     TimestampedFloat previous;
     //printf("> latency %3.2fms\n", (Timestamped().to_seconds() - target_ts.to_seconds())*1000.0);
 
     for ( timestamped_float_list_t::iterator it = tsf_list.begin(); it != tsf_list.end(); ++it ){
-		if (it->timestamp >= target_ts){
-			//ok found close target
+        if (it->timestamp >= target_ts){
+            //ok found close target
             if (it == tsf_list.begin()){
-				//no preceding element
+                //no preceding element
                 printf("> warning, timestamp %6.3f smaller than first element %6.3f in timestamped list. this should not happen (increase ts buffer?)\n",target_ts.to_seconds(),tsf_list.begin()->timestamp.to_seconds());
-				return it->value;
-			}else{
-				//do interpolation
-				return interpolate(*it, previous, target_ts);
-			}
-		}
-		previous = *it;
-	}
-
-	//we reached the end, return the last value
+                return it->value;
+            }else{
+                //do interpolation
+                return interpolate(*it, previous, target_ts);
+            }
+        }
+        previous = *it;
+    }
+
+    //we reached the end, return the last value
     printf("> warning: found no timestamp bigger than %f in timestamped list...\n", target_ts.to_seconds());
-	printf("           this should not happen as images will always be behind\n");
+    printf("           this should not happen as images will always be behind\n");
     printf("           the motor data. returning most recent value (ts=%f)\n", previous.timestamp.to_seconds());
-	
-	return previous.value;
+
+    return previous.value;
 }
 
 float TimestampedList::interpolate(TimestampedFloat a, TimestampedFloat b, Timestamp timestamp){
-	//a->timestamp < timestamp <= b->timestamp
+    //a->timestamp < timestamp <= b->timestamp
     double dist_a = timestamp.to_seconds() - a.timestamp.to_seconds();
     double dist_b = b.timestamp.to_seconds() - timestamp.to_seconds();
-	double dist   = dist_a + dist_b;
-	
+    double dist   = dist_a + dist_b;
+
     float interpolation = a.value + (dist_a / dist) * (b.value - a.value);
-	return interpolation;
+    return interpolation;
 }
 
 
 ///tests
 void TimestampedList::run_tests(){
-	int size = 10;
-	TimestampedList list(size);
-	
-	for(int i=0; i<size; i++){
+    int size = 10;
+    TimestampedList list(size);
+
+    for(int i=0; i<size; i++){
         list.insert(Timestamp(i * 100.0,0), i*10.0);
-	}
-	
-	//test algorithm:
-	
-	//test exact match:
-	for(int i=0; i<size; i++){
+    }
+
+    //test algorithm:
+
+    //test exact match:
+    for(int i=0; i<size; i++){
         Timestamp ts(i*100.0,0);
         printf("> testing get_interpolated_value(%f) == %f (value read back = %f)\n",ts.to_seconds(), i*10.0, list.get_interpolated_value(ts));
         assert( list.get_interpolated_value(ts) == i*10.0);
-	}
-	printf("passed test 1\n");
-	
+    }
+    printf("passed test 1\n");
+
     assert(list.get_interpolated_value(Timestamp(0.0,0)) == 0.0);
     assert(list.get_interpolated_value(Timestamp(110.0,0)) == 11.0);
     assert(list.get_interpolated_value(Timestamp(150.0,0)) == 15.0);
     assert(list.get_interpolated_value(Timestamp(999990.0,0)) == 90.0);
-	
-	printf("passed test 2\n");
-	
+
+    printf("passed test 2\n");
+
     list.insert(Timestamp(1000.0 ,0), 200.0);
     list.insert(Timestamp(1300.0, 0), -100.0);
     assert(list.get_interpolated_value(Timestamp(1100, 0)) == 100.0);
     assert(list.get_interpolated_value(Timestamp(1200, 0)) == 0.0);
     assert(list.get_interpolated_value(Timestamp(1300, 0)) == -100.0);
     assert(list.get_interpolated_value(Timestamp(1250, 0)) == -50.0);
-	
-	printf("passed test 3\n");
-	exit(0);
+
+    printf("passed test 3\n");
+    exit(0);
 }
