Index: trunk/Sick/SickLDMRSSensor.cpp
===================================================================
--- trunk/Sick/SickLDMRSSensor.cpp	(revision 37)
+++ trunk/Sick/SickLDMRSSensor.cpp	(revision 42)
@@ -43,6 +43,5 @@
 static const int SICKLDMRS_OBJECTDATA_TYPE  = 0x2221;
 
-//////////////////////////////////////////////////////////////////////////
-/// Constructor.
+
 SickLDMRSSensor::SickLDMRSSensor(QObject *parent)
     : ipaddr_("192.168.0.1"),
@@ -83,6 +82,5 @@
 }
 
-//////////////////////////////////////////////////////////////////////////
-/// Destructor.
+
 SickLDMRSSensor::~SickLDMRSSensor()
 {
@@ -91,6 +89,5 @@
 }
 
-//////////////////////////////////////////////////////////////////////////
-/// Called by the ComponentManager to start the component
+
 void SickLDMRSSensor::startActivity()
 {
@@ -104,5 +101,5 @@
 
         try {
-            dbtFile_.open(kSickDbtFileName, WriteMode, TELEM_SICK, sizeof(SickLDMRS_dbt));
+            dbtFile_.open(kSickDbtFileName, WriteMode, TELEM_SICK_LDMRS, sizeof(SickLDMRS_dbt));
         } catch (DbiteException & e) {
             cerr << "error opening dbt file: "<< kSickDbtFileName << ", " << e.what() << endl;
@@ -136,6 +133,5 @@
 }
 
-//////////////////////////////////////////////////////////////////////////
-/// Called by the ComponentManager to stop the component
+
 void SickLDMRSSensor::stopActivity()
 {
@@ -161,7 +157,4 @@
 
 
-//////////////////////////////////////////////////////////////////////////
-/// look for the position of the magic word in the packet.
-/// Return it if found else return -1
 u_int32_t SickLDMRSSensor::findMagicWord(const char * message, const unsigned length)
 {
@@ -181,7 +174,5 @@
 }
 
-//////////////////////////////////////////////////////////////////////////
-/// Return the size of the message contained in the packet
-/// You have to provide the position of the magic word in the packet
+
 u_int32_t SickLDMRSSensor::getMessageSize(const char * message, const unsigned length, const long magicWordIndex)
 {
@@ -198,7 +189,5 @@
 }
 
-//////////////////////////////////////////////////////////////////////////
-/// @param size     the total size of the message including the 2 headers and the body
-/// @param length   the number of available bytes in the packet
+
 bool SickLDMRSSensor::isMessageComplete(const unsigned length, const long size)
 {
@@ -276,8 +265,5 @@
 }
 
-//////////////////////////////////////////////////////////////////////////
-/// this function is called when no complete message has been found
-/// we set the flag previousData to true for the next processing stage
-/// and we store the timestamp of the bytes acquisition
+
 void SickLDMRSSensor::storePendingBytes(road_time_t time)
 {
@@ -406,8 +392,5 @@
 }
 
-//////////////////////////////////////////////////////////////////////////
-/// write the data on the disk:
-/// - complete the dbt file with msg.hData
-/// - complete the binary data file with the alascaData.point
+
 void SickLDMRSSensor::writeData(MessageLDMRS &msg)
 {
@@ -419,6 +402,6 @@
     entry.hScan = msg.hScan;
     entry.dataPos = dataFile_.tellp(); // absolute position of pointer in UTC file
-    entry.time = msg.time;
-    entry.timerange = msg.timerange;
+//    entry.time = msg.time;
+//    entry.timerange = msg.timerange;
 
     // write DBT
@@ -442,5 +425,4 @@
 
 
-///
 void SickLDMRSSensor::configure(){
     // Start measuring
@@ -451,7 +433,4 @@
 
 
-//////////////////////////////////////////////////////////////////////////
-/// Event call by the SickSocket class when new data has been arrived
-/// on the network.
 void SickLDMRSSensor::customEvent(QEvent * e)
 {   
@@ -476,7 +455,8 @@
             // write data on the disk
             if (recording_)
-                writeData(msgList.front());
+                writeData(msgToProcess);
 
 #ifdef SICKLDMRS_SH_MEM
+            /// NOT TESTED !
             /// push data in shared memory
             // First the scan info
@@ -499,7 +479,4 @@
         }
 
-        // (malloced memory) ScanPoints[] or ScanObjects[] no longer needed
-        free(msgToProcess.body);
-
         // removes the processed item of the list
         msgList.pop_front();
