Changeset 245 in flair-src
- Timestamp:
- May 24, 2018, 11:45:54 AM (7 years ago)
- Location:
- trunk/lib
- Files:
-
- 4 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairMeta/src/SimuX4.cpp
r206 r245 24 24 #include <SimuUs.h> 25 25 #include <SimuCamera.h> 26 #include <SimuPressureSensor.h> 26 27 #include <BatteryMonitor.h> 27 28 #include <SimuGps.h> … … 67 68 if(useGps=="true") { 68 69 SetGps(new SimuGps("gps", (NmeaGps::NMEAFlags_t)(NmeaGps::GGA | NmeaGps::VTG), 0,0, 40)); 70 } 71 72 string usePressureSensor=FindArgument(options,"use_pressure_sensor=",false); 73 if(usePressureSensor=="true") { 74 SetPressureSensor(new SimuPressureSensor("pressuresensor", 0,0, 10)); 69 75 } 70 76 } … … 78 84 //((SimuCamera *)GetHorizontalCamera())->Start(); 79 85 if(GetGps()) ((SimuGps *)GetGps())->Start(); 86 if(GetPressureSensor()) ((SimuPressureSensor *)GetPressureSensor())->Start(); 80 87 } 81 88 -
trunk/lib/FlairMeta/src/SimuX8.cpp
r186 r245 24 24 #include <SimuUs.h> 25 25 #include <SimuCamera.h> 26 #include <SimuPressureSensor.h> 26 27 #include <BatteryMonitor.h> 27 28 #include <SimuGps.h> … … 68 69 SetGps(new SimuGps("gps", (NmeaGps::NMEAFlags_t)(NmeaGps::GGA | NmeaGps::VTG), 0,0, 40)); 69 70 } 71 72 string usePressureSensor=FindArgument(options,"use_pressure_sensor=",false); 73 if(usePressureSensor=="true") { 74 SetPressureSensor(new SimuPressureSensor("pressuresensor", 0,0, 10)); 75 } 70 76 } 71 77 … … 78 84 ((SimuCamera *)GetHorizontalCamera())->Start(); 79 85 if(GetGps()) ((SimuGps *)GetGps())->Start(); 86 if(GetPressureSensor()) ((SimuPressureSensor *)GetPressureSensor())->Start(); 80 87 } 81 88 -
trunk/lib/FlairSensorActuator/src/SimuCamera.cpp
r238 r245 63 63 void SimuCamera::Run(void) { 64 64 Time time; 65 // if (data_rate == NULL) {66 // Thread::Err("not applicable for simulation part.\n");67 // return;68 // }69 65 70 66 // SetPeriodUS((uint32_t)(1000000. / data_rate->Value())); -
trunk/lib/FlairSensorActuator/src/SimuGps.cpp
r224 r245 82 82 gga.diff_units='M'; 83 83 84 if (dataRate == NULL) {85 Thread::Err("not applicable for simulation part.\n");86 return;87 }88 89 84 SetPeriodUS((uint32_t)(1000000. / dataRate->Value())); 90 85 -
trunk/lib/FlairSensorActuator/src/SimuImu.cpp
r224 r245 62 62 GetDatas(&imuData); 63 63 64 if (dataRate == NULL) {65 Thread::Err("not applicable for simulation part.\n");66 return;67 }68 69 64 SetPeriodUS((uint32_t)(1000000. / dataRate->Value())); 70 65 -
trunk/lib/FlairSensorActuator/src/SimuLaser.cpp
r224 r245 56 56 float z[360]; 57 57 58 if (data_rate == NULL) {59 Thread::Err("not applicable for simulation part.\n");60 return;61 }62 63 58 SetPeriodUS((uint32_t)(1000000. / data_rate->Value())); 64 59 -
trunk/lib/FlairSensorActuator/src/SimuUs.cpp
r230 r245 55 55 void SimuUs::Run(void) { 56 56 float z; 57 58 if (data_rate == NULL) { 59 Thread::Err("not applicable for simulation part.\n"); 60 return; 61 } 62 57 63 58 SetPeriodUS((uint32_t)(1000000. / data_rate->Value())); 64 59 -
trunk/lib/FlairSimulator/src/SimuUs.h
r224 r245 67 67 */ 68 68 void UpdateFrom(const core::io_data *data){}; 69 70 /*!71 * \brief Run function72 *73 * Reimplemented from Thread.74 *75 */76 void Run(void);77 69 78 70 std::string ShMemName(uint32_t modelId,uint32_t deviceId); -
trunk/lib/FlairSimulator/src/SimuUsGL.cpp
r214 r245 55 55 // todo: utiliser le placement de l'us dans le drone et sa portée 56 56 Matrix *input = (Matrix *)data; 57 value = input->Value( 9, 0);57 value = input->Value(6, 0); 58 58 shmem->Write((char *)&value, sizeof(float)); 59 59 #ifdef GL
Note:
See TracChangeset
for help on using the changeset viewer.