Skip to content
Snippets Groups Projects
Commit 0aea016d authored by Angelo Prete's avatar Angelo Prete
Browse files

[Parafoil] Updated GPS config in SensorsConfig.h

parent 98467b85
Branches
No related tags found
No related merge requests found
Pipeline #8139 failed
......@@ -75,8 +75,10 @@ constexpr Boardcore::LPS22DF::ODR LPS22DF_ODR = Boardcore::LPS22DF::ODR_100;
constexpr uint32_t LPS22DF_PERIOD = 20; // [ms] 50Hz
// UBXGPS
constexpr uint8_t UBXGPS_SAMPLE_RATE = 10;
constexpr uint32_t UBXGPS_PERIOD = 1000 / UBXGPS_SAMPLE_RATE; // [ms]
constexpr uint8_t UBXGPS_SAMPLE_RATE = 5;
// The +5 is needed because GPS data must be read faster than it is produced (to
// not cause delays)
constexpr uint32_t UBXGPS_PERIOD = 1000 / (UBXGPS_SAMPLE_RATE + 5); // [ms]
// ADS
constexpr Boardcore::ADS131M08Defs::OversamplingRatio
......@@ -84,7 +86,6 @@ constexpr Boardcore::ADS131M08Defs::OversamplingRatio
Boardcore::ADS131M08Defs::OversamplingRatio::OSR_8192;
constexpr bool ADS131M08_GLOBAL_CHOP_MODE = true;
constexpr uint32_t ADS131M08_PERIOD = 10; // [ms] 100Hz
//
// UNUSED - How many bytes go into the fifo each second
constexpr unsigned int BMX160_FIFO_FILL_RATE =
......
......@@ -347,7 +347,7 @@ void Sensors::ubxGpsInit()
// Create sensor instance with configured parameters
ubxGps = new UBXGPSSpi(modules.get<Buses>()->spi1,
miosix::sensors::ubxgps::cs::getPin(), config, 5);
miosix::sensors::ubxgps::cs::getPin(), config, UBXGPS_SAMPLE_RATE);
// Emplace the sensor inside the map
SensorInfo info("UBXGPS", UBXGPS_PERIOD,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment