Changeset 71 in pacpussensors
- Timestamp:
- Nov 19, 2014, 10:24:51 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Sick/CMakeLists.txt
r61 r71 16 16 message(ERROR "Qt4 needed") 17 17 endif() 18 18 find_package(OpenGL REQUIRED) 19 19 # ======================================== 20 20 # Compiler definitions … … 122 122 ${QT_LIBRARIES} 123 123 ${PACPUS_DEPENDENCIES_LIB} 124 ${OPENGL_LIBRARIES} 124 125 ${LIBS} 125 126 ) -
trunk/Sick/SickLDMRSData.h
r61 r71 33 33 34 34 namespace pacpus{ 35 static const uint32_t MAX_SICKSCAN_POINT = 1100; 36 static const uint32_t MAX_SCAN_POINT_PER_LAYER = 1100; 35 37 36 38 /*! … … 108 110 //!< 4 MSB : Echo 109 111 uchar flags; 110 uint16_t angle; //!< Angle in number of ticks. You can easily compute the real angle :112 int16_t angle; //!< Angle in number of ticks. You can easily compute the real angle : 111 113 //!< \f$ angle (degree) = \frac{angle (ticks)}{ScanHeader.ticksPerRot}\f$ @see ScanHeader 112 114 … … 141 143 } SickLDMRS_dbt; 142 144 143 144 145 145 #ifdef SICKLDMRS_SH_MEM 146 146 /// Structure to write in shared memory, followed by the points. -
trunk/Sick/SickLDMRSSensor.cpp
r61 r71 126 126 LOG_TRACE("(Recording) Not recording..."); 127 127 128 129 128 #ifdef SICKLDMRS_SH_MEM 130 129 shmem_ = new ShMem(kSickMemoryName.c_str(), sizeof(ScanSickData)); … … 323 322 // we have a complete message available that we can add to the list 324 323 MessageLDMRS msg; 325 326 // we copy the bytes in the body message327 // char* messageData = (char*)malloc(msgSize);328 // if(messageData == NULL){329 // LOG_FATAL("(Packet reconstitution) Malloc FAILED. Packet lost.");330 // return;331 // }332 324 memcpy(msg.body, pendingBytes.data.c_str() + index, msgSize); 333 325 … … 375 367 scanPoints[i].layerEcho = *((uchar*)(msg.body + index)); 376 368 scanPoints[i].flags = *((uchar*)(msg.body + index + 1)); 377 scanPoints[i].angle = *(( uint16_t*)(msg.body + index + 2));369 scanPoints[i].angle = *((int16_t*)(msg.body + index + 2)); 378 370 scanPoints[i].distance = *((uint16_t*)(msg.body + index + 4)); 379 371 scanPoints[i].echoPulseWidth = *((uint16_t*)(msg.body + index + 6)); 380 } 381 382 372 index+=10; 373 } 374 memcpy(msg.body, scanPoints, sizeof(ScanPoint) * msg.hScan.numPoints); 383 375 384 376 delete[] scanPoints; … … 392 384 // TODO 393 385 } 394 395 396 386 return msg.hData.dataType; 397 387 } -
trunk/Sick/SickLDMRSSensor.h
r61 r71 22 22 #include "AbstractSickSensor.h" 23 23 #include "SickLDMRSData.h" 24 24 #include "AlascaViewer3D.h" 25 25 #include <fstream> 26 26 #include <string> … … 199 199 SickSocket * S_socket; 200 200 201 signals: 202 void refreshDisplay(); 203 201 204 private: 202 205 /// Name is used to recognize between several sensors and store data into .dbt and utc files. … … 255 258 std::ofstream dataFile_; //!< UTC file. 256 259 257 258 260 #ifdef SICKLDMRS_SH_MEM 259 261 ShMem * shmem_; -
trunk/Sick/SickLMSSensor.cpp
r61 r71 562 562 */ 563 563 564 return 0; 564 565 } 565 566 -
trunk/driver/win32SerialPort.cpp
r59 r71 477 477 478 478 if ( evtMask & EV_RXCHAR ) { 479 //printf("%s EV_RXCHAR\n",portName); 479 480 if ((numberBytesToRead = nbBytesToRead()) > 0) { 480 481 receivedBuffer_.resize(numberBytesToRead); … … 485 486 486 487 487 if ( evtMask & EV_RXFLAG ) 488 //printf("%s EV_RXFLAG\n",portName); 488 if ( evtMask & EV_RXFLAG ) { 489 printf("%s EV_RXFLAG\n",portName); 490 } 489 491 490 492 if ( evtMask & EV_TXEMPTY )
Note:
See TracChangeset
for help on using the changeset viewer.