From b9dd1e54c50f87d2e99bf58783746c51076d7eb5 Mon Sep 17 00:00:00 2001 From: kamilritz Date: Mon, 16 Dec 2019 08:27:51 +0100 Subject: [PATCH] Change file names --- test/SensorSimulator/CMakeLists.txt | 12 ++++++------ test/SensorSimulator/{Baro.cpp => baro.cpp} | 3 +++ test/SensorSimulator/{Baro.h => baro.h} | 6 +++++- test/SensorSimulator/{Gps.cpp => gps.cpp} | 5 +++++ test/SensorSimulator/{Gps.h => gps.h} | 6 +++++- test/SensorSimulator/{Imu.cpp => imu.cpp} | 5 +++++ test/SensorSimulator/{Imu.h => imu.h} | 6 +++++- test/SensorSimulator/{Mag.cpp => mag.cpp} | 5 +++++ test/SensorSimulator/{Mag.h => mag.h} | 6 +++++- test/SensorSimulator/{Sensor.cpp => sensor.cpp} | 7 ++++++- test/SensorSimulator/{Sensor.h => sensor.h} | 5 +++++ .../{SensorSimulator.cpp => sensor_simulator.cpp} | 0 .../{SensorSimulator.h => sensor_simulator.h} | 8 ++++---- 13 files changed, 59 insertions(+), 15 deletions(-) rename test/SensorSimulator/{Baro.cpp => baro.cpp} (86%) rename test/SensorSimulator/{Baro.h => baro.h} (95%) rename test/SensorSimulator/{Gps.cpp => gps.cpp} (74%) rename test/SensorSimulator/{Gps.h => gps.h} (95%) rename test/SensorSimulator/{Imu.cpp => imu.cpp} (90%) rename test/SensorSimulator/{Imu.h => imu.h} (95%) rename test/SensorSimulator/{Mag.cpp => mag.cpp} (76%) rename test/SensorSimulator/{Mag.h => mag.h} (95%) rename test/SensorSimulator/{Sensor.cpp => sensor.cpp} (82%) rename test/SensorSimulator/{Sensor.h => sensor.h} (97%) rename test/SensorSimulator/{SensorSimulator.cpp => sensor_simulator.cpp} (100%) rename test/SensorSimulator/{SensorSimulator.h => sensor_simulator.h} (97%) diff --git a/test/SensorSimulator/CMakeLists.txt b/test/SensorSimulator/CMakeLists.txt index 644c5dc3b20..4ed7fa48093 100644 --- a/test/SensorSimulator/CMakeLists.txt +++ b/test/SensorSimulator/CMakeLists.txt @@ -33,12 +33,12 @@ set(SRCS - SensorSimulator.cpp - Sensor.cpp - Imu.cpp - Mag.cpp - Baro.cpp - Gps.cpp + sensor_simulator.cpp + sensor.cpp + imu.cpp + mag.cpp + baro.cpp + gps.cpp ) add_library(SENSOR_SIMULATOR ${SRCS}) diff --git a/test/SensorSimulator/Baro.cpp b/test/SensorSimulator/baro.cpp similarity index 86% rename from test/SensorSimulator/Baro.cpp rename to test/SensorSimulator/baro.cpp index b490cb63f55..452262467a0 100644 --- a/test/SensorSimulator/Baro.cpp +++ b/test/SensorSimulator/baro.cpp @@ -1,5 +1,8 @@ #include "Baro.h" +namespace sensor_simulator::sensor +{ + Baro::Baro(Ekf* ekf):Sensor(ekf) { } diff --git a/test/SensorSimulator/Baro.h b/test/SensorSimulator/baro.h similarity index 95% rename from test/SensorSimulator/Baro.h rename to test/SensorSimulator/baro.h index becbcf2cbae..368c3970121 100644 --- a/test/SensorSimulator/Baro.h +++ b/test/SensorSimulator/baro.h @@ -37,7 +37,10 @@ */ #pragma once -#include "Sensor.h" +#include "sensor.h" + +namespace sensor_simulator::sensor +{ class Baro: public Sensor { @@ -54,3 +57,4 @@ private: }; +} // namespace sensor_simulator::sensor diff --git a/test/SensorSimulator/Gps.cpp b/test/SensorSimulator/gps.cpp similarity index 74% rename from test/SensorSimulator/Gps.cpp rename to test/SensorSimulator/gps.cpp index dcb007adc36..cdbb0ea7705 100644 --- a/test/SensorSimulator/Gps.cpp +++ b/test/SensorSimulator/gps.cpp @@ -1,5 +1,8 @@ #include "Gps.h" +namespace sensor_simulator::sensor +{ + Gps::Gps(Ekf* ekf):Sensor(ekf) { } @@ -18,3 +21,5 @@ void Gps::setData(gps_message gps) { _gps_data = gps; } + +} // namespace sensor_simulator::sensor diff --git a/test/SensorSimulator/Gps.h b/test/SensorSimulator/gps.h similarity index 95% rename from test/SensorSimulator/Gps.h rename to test/SensorSimulator/gps.h index 65623fdcbb4..13c1e61f570 100644 --- a/test/SensorSimulator/Gps.h +++ b/test/SensorSimulator/gps.h @@ -37,7 +37,10 @@ */ #pragma once -#include "Sensor.h" +#include "sensor.h" + +namespace sensor_simulator::sensor +{ class Gps: public Sensor { @@ -54,3 +57,4 @@ private: }; +} // namespace sensor_simulator::sensor diff --git a/test/SensorSimulator/Imu.cpp b/test/SensorSimulator/imu.cpp similarity index 90% rename from test/SensorSimulator/Imu.cpp rename to test/SensorSimulator/imu.cpp index 45ea9682989..f63499174cb 100644 --- a/test/SensorSimulator/Imu.cpp +++ b/test/SensorSimulator/imu.cpp @@ -1,5 +1,8 @@ #include "Imu.h" +namespace sensor_simulator::sensor +{ + Imu::Imu(Ekf* ekf):Sensor(ekf) { } @@ -37,3 +40,5 @@ void Imu::setGyroData(Vector3f gyro) { _gyro_data = gyro; } + +} // namespace sensor_simulator::sensor diff --git a/test/SensorSimulator/Imu.h b/test/SensorSimulator/imu.h similarity index 95% rename from test/SensorSimulator/Imu.h rename to test/SensorSimulator/imu.h index d6e2a9e08e5..bc397250b0b 100644 --- a/test/SensorSimulator/Imu.h +++ b/test/SensorSimulator/imu.h @@ -37,7 +37,10 @@ */ #pragma once -#include "Sensor.h" +#include "sensor.h" + +namespace sensor_simulator::sensor +{ class Imu: public Sensor { @@ -57,3 +60,4 @@ private: }; +} // namespace sensor_simulator::sensor diff --git a/test/SensorSimulator/Mag.cpp b/test/SensorSimulator/mag.cpp similarity index 76% rename from test/SensorSimulator/Mag.cpp rename to test/SensorSimulator/mag.cpp index 1ed0557796f..83e96e466db 100644 --- a/test/SensorSimulator/Mag.cpp +++ b/test/SensorSimulator/mag.cpp @@ -1,5 +1,8 @@ #include "Mag.h" +namespace sensor_simulator::sensor +{ + Mag::Mag(Ekf* ekf):Sensor(ekf) { } @@ -20,3 +23,5 @@ void Mag::setData(Vector3f mag) { _mag_data = mag; } + +} // namespace sensor_simulator::sensor diff --git a/test/SensorSimulator/Mag.h b/test/SensorSimulator/mag.h similarity index 95% rename from test/SensorSimulator/Mag.h rename to test/SensorSimulator/mag.h index 412cda8fe0c..137d5abb41f 100644 --- a/test/SensorSimulator/Mag.h +++ b/test/SensorSimulator/mag.h @@ -37,7 +37,10 @@ */ #pragma once -#include "Sensor.h" +#include "sensor.h" + +namespace sensor_simulator::sensor +{ class Mag: public Sensor { @@ -54,3 +57,4 @@ private: }; +} // namespace sensor_simulator::sensor diff --git a/test/SensorSimulator/Sensor.cpp b/test/SensorSimulator/sensor.cpp similarity index 82% rename from test/SensorSimulator/Sensor.cpp rename to test/SensorSimulator/sensor.cpp index adfa8fed3a8..74bbf42e5fe 100644 --- a/test/SensorSimulator/Sensor.cpp +++ b/test/SensorSimulator/sensor.cpp @@ -1,4 +1,7 @@ -#include "Sensor.h" +#include "sensor.h" + +namespace sensor_simulator +{ Sensor::Sensor(Ekf* ekf) { @@ -26,3 +29,5 @@ bool Sensor::is_time_to_send(uint32_t time) { return (time >= _time_last_data_sent) && ((time - _time_last_data_sent) >= _update_period); } + +} // namespace sensor_simulator diff --git a/test/SensorSimulator/Sensor.h b/test/SensorSimulator/sensor.h similarity index 97% rename from test/SensorSimulator/Sensor.h rename to test/SensorSimulator/sensor.h index af259201eb1..a5bdad77c89 100644 --- a/test/SensorSimulator/Sensor.h +++ b/test/SensorSimulator/sensor.h @@ -41,6 +41,9 @@ #include "EKF/ekf.h" #include +namespace sensor_simulator +{ + class Sensor { public: @@ -76,3 +79,5 @@ protected: virtual void send(uint32_t time) = 0; }; + +} // namespace sensor_simulator diff --git a/test/SensorSimulator/SensorSimulator.cpp b/test/SensorSimulator/sensor_simulator.cpp similarity index 100% rename from test/SensorSimulator/SensorSimulator.cpp rename to test/SensorSimulator/sensor_simulator.cpp diff --git a/test/SensorSimulator/SensorSimulator.h b/test/SensorSimulator/sensor_simulator.h similarity index 97% rename from test/SensorSimulator/SensorSimulator.h rename to test/SensorSimulator/sensor_simulator.h index 8e24b60720e..386543aeedb 100644 --- a/test/SensorSimulator/SensorSimulator.h +++ b/test/SensorSimulator/sensor_simulator.h @@ -42,10 +42,10 @@ #pragma once -#include "Imu.h" -#include "Mag.h" -#include "Baro.h" -#include "Gps.h" +#include "imu.h" +#include "mag.h" +#include "baro.h" +#include "gps.h" #include "EKF/ekf.h"