diff --git a/src/model_car_batteries.cpp b/src/model_car_batteries.cpp index 81dd0817bc80195e07302109633ed5fef9de65cb..7d4f52cef21218d5d04d81c69a16092cf1fcf754 100644 --- a/src/model_car_batteries.cpp +++ b/src/model_car_batteries.cpp @@ -29,7 +29,6 @@ void CModelCarBatteries::process_data_frame(uint8_t id,uint32_t timestamp, TData else { it->second = data_union.voltage; - it->second.voltage = it->second.voltage/1000.0; //mV to V //m_bat_values[currentSensor] = data_union.us; } @@ -47,7 +46,7 @@ bool CModelCarBatteries::get_bat(SENSOR_ID id, float & value) } else { - value = it->second.voltage; + value = it->second.voltage/1000.0; //mV to V ok=true; } this->data_mutex.exit(); diff --git a/src/model_car_egomotion.cpp b/src/model_car_egomotion.cpp index c89425515862ecc7452b2c26c3d0232a548b6402..7b7386210a57c01548a23cc8e02b8ed72e57c28c 100644 --- a/src/model_car_egomotion.cpp +++ b/src/model_car_egomotion.cpp @@ -27,9 +27,9 @@ void CModelCarEgomotion::process_data_frame(uint8_t id,uint32_t timestamp, TData this->imu.gx = this->imu.gx*3.14159/180; // º/s to rad/s this->imu.gy = this->imu.gy*3.14159/180; // º/s to rad/s this->imu.gz = this->imu.gz*3.14159/180; // º/s to rad/s - this->imu.mx = this->imu.mx/1e-7; //miliGauss(mG) to Tesla(T) - this->imu.my = this->imu.my/1e-7; //miliGauss(mG) to Tesla(T) - this->imu.mz = this->imu.mz/1e-7; //miliGauss(mG) to Tesla(T) + this->imu.mx = this->imu.mx*1e-7; //miliGauss(mG) to Tesla(T) + this->imu.my = this->imu.my*1e-7; //miliGauss(mG) to Tesla(T) + this->imu.mz = this->imu.mz*1e-7; //miliGauss(mG) to Tesla(T) break; default: std::cout << "CModelCarEgomotion::process_data_frame: error, incorrect id: " << (unsigned int)id << std::endl;