use gcc attributes to align and pack

This commit is contained in:
Daniel Agar
2016-04-27 20:44:15 -04:00
committed by Lorenz Meier
parent 76387b1693
commit eb29b33620
14 changed files with 47 additions and 25 deletions
+4 -4
View File
@@ -60,7 +60,7 @@ Integrator::~Integrator()
}
bool
Integrator::put(uint64_t timestamp, math::Vector<3> &val, math::Vector<3> &integral, uint64_t &integral_dt)
Integrator::put(uint64_t timestamp, math::Vector<3> &val, math::Vector<3> &integral, uint64_t *integral_dt)
{
if (_last_integration_time == 0) {
/* this is the first item in the integrator */
@@ -132,7 +132,7 @@ Integrator::put_with_interval(unsigned interval_us, math::Vector<3> &val, math::
}
math::Vector<3>
Integrator::get(bool reset, uint64_t &integral_dt)
Integrator::get(bool reset, uint64_t *integral_dt)
{
math::Vector<3> val = _integral;
@@ -158,12 +158,12 @@ Integrator::get_and_filtered(bool reset, uint64_t &integral_dt, math::Vector<3>
}
void
Integrator::_reset(uint64_t &integral_dt)
Integrator::_reset(uint64_t *integral_dt)
{
_integral(0) = 0.0f;
_integral(1) = 0.0f;
_integral(2) = 0.0f;
integral_dt = (_last_integration_time - _last_reset_time);
*integral_dt = (_last_integration_time - _last_reset_time);
_last_reset_time = _last_integration_time;
}