diff --git a/libraries/DataFlash/DataFlash_Backend.cpp b/libraries/DataFlash/DataFlash_Backend.cpp index c0760121106..3a7e21f864d 100644 --- a/libraries/DataFlash/DataFlash_Backend.cpp +++ b/libraries/DataFlash/DataFlash_Backend.cpp @@ -16,7 +16,7 @@ void DataFlash_Backend::periodic_fullrate(const uint32_t now) void DataFlash_Backend::periodic_tasks() { - uint32_t now = hal.scheduler->millis(); + uint32_t now = AP_HAL::millis(); if (now - _last_periodic_1Hz > 1000) { periodic_1Hz(now); _last_periodic_1Hz = now; diff --git a/libraries/DataFlash/DataFlash_File.cpp b/libraries/DataFlash/DataFlash_File.cpp index abab630603b..5dc1788ba4e 100644 --- a/libraries/DataFlash/DataFlash_File.cpp +++ b/libraries/DataFlash/DataFlash_File.cpp @@ -918,7 +918,7 @@ void DataFlash_File::ListAvailableLogs(AP_HAL::BetterStream *port) void DataFlash_File::flush(void) { uint16_t _tail; - uint32_t tnow = hal.scheduler->micros(); + uint32_t tnow = AP_HAL::micros(); hal.scheduler->suspend_timer_procs(); while (_write_fd != -1 && _initialised && !_open_error && BUF_AVAILABLE(_writebuf)) { @@ -945,7 +945,7 @@ void DataFlash_File::_io_timer(void) if (nbytes == 0) { return; } - uint32_t tnow = hal.scheduler->micros(); + uint32_t tnow = AP_HAL::micros(); if (nbytes < _writebuf_chunk && tnow - _last_write_time < 2000000UL) { // write in _writebuf_chunk-sized chunks, but always write at diff --git a/libraries/DataFlash/LogFile.cpp b/libraries/DataFlash/LogFile.cpp index 724e54103e5..1bcab9c0316 100644 --- a/libraries/DataFlash/LogFile.cpp +++ b/libraries/DataFlash/LogFile.cpp @@ -32,7 +32,7 @@ void DataFlash_Class::Init(const struct LogStructure *structure, uint8_t num_typ backend = new DataFlash_Empty(*this); #endif if (backend == NULL) { - hal.scheduler->panic("Unable to open dataflash"); + AP_HAL::panic("Unable to open dataflash"); } backend->Init(structure, num_types); } @@ -661,7 +661,7 @@ bool DataFlash_Class::Log_Write_Parameter(const char *name, float value) { struct log_Parameter pkt = { LOG_PACKET_HEADER_INIT(LOG_PARAMETER_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), name : {}, value : value }; @@ -707,7 +707,7 @@ void DataFlash_Class::Log_Write_GPS(const AP_GPS &gps, uint8_t i, int32_t relati const struct Location &loc = gps.location(i); struct log_GPS pkt = { LOG_PACKET_HEADER_INIT((uint8_t)(LOG_GPS_MSG+i)), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), status : (uint8_t)gps.status(i), gps_week_ms : gps.time_week_ms(i), gps_week : gps.time_week(i), @@ -731,7 +731,7 @@ void DataFlash_Class::Log_Write_GPS(const AP_GPS &gps, uint8_t i, int32_t relati gps.speed_accuracy(i, sacc); struct log_GPA pkt2 = { LOG_PACKET_HEADER_INIT((uint8_t)(LOG_GPA_MSG+i)), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), vdop : gps.get_vdop(i), hacc : (uint16_t)(hacc*100), vacc : (uint16_t)(vacc*100), @@ -746,7 +746,7 @@ void DataFlash_Class::Log_Write_RFND(const RangeFinder &rangefinder) { struct log_RFND pkt = { LOG_PACKET_HEADER_INIT((uint8_t)(LOG_RFND_MSG)), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), dist1 : rangefinder.distance_cm(0), dist2 : rangefinder.distance_cm(1) }; @@ -758,7 +758,7 @@ void DataFlash_Class::Log_Write_RCIN(void) { struct log_RCIN pkt = { LOG_PACKET_HEADER_INIT(LOG_RCIN_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), chan1 : hal.rcin->read(0), chan2 : hal.rcin->read(1), chan3 : hal.rcin->read(2), @@ -782,7 +782,7 @@ void DataFlash_Class::Log_Write_RCOUT(void) { struct log_RCOUT pkt = { LOG_PACKET_HEADER_INIT(LOG_RCOUT_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), chan1 : hal.rcout->read(0), chan2 : hal.rcout->read(1), chan3 : hal.rcout->read(2), @@ -805,7 +805,7 @@ void DataFlash_Class::Log_Write_RSSI(AP_RSSI &rssi) { struct log_RSSI pkt = { LOG_PACKET_HEADER_INIT(LOG_RSSI_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), RXRSSI : rssi.read_receiver_rssi() }; WriteBlock(&pkt, sizeof(pkt)); @@ -814,7 +814,7 @@ void DataFlash_Class::Log_Write_RSSI(AP_RSSI &rssi) // Write a BARO packet void DataFlash_Class::Log_Write_Baro(AP_Baro &baro) { - uint64_t time_us = hal.scheduler->micros64(); + uint64_t time_us = AP_HAL::micros64(); struct log_BARO pkt = { LOG_PACKET_HEADER_INIT(LOG_BARO_MSG), time_us : time_us, @@ -853,7 +853,7 @@ void DataFlash_Class::Log_Write_Baro(AP_Baro &baro) // Write an raw accel/gyro data packet void DataFlash_Class::Log_Write_IMU(const AP_InertialSensor &ins) { - uint64_t time_us = hal.scheduler->micros64(); + uint64_t time_us = AP_HAL::micros64(); const Vector3f &gyro = ins.get_gyro(0); const Vector3f &accel = ins.get_accel(0); struct log_IMU pkt = { @@ -926,7 +926,7 @@ void DataFlash_Class::Log_Write_IMUDT(const AP_InertialSensor &ins) ins.get_delta_angle(0, delta_angle); ins.get_delta_velocity(0, delta_velocity); - uint64_t time_us = hal.scheduler->micros64(); + uint64_t time_us = AP_HAL::micros64(); struct log_IMUDT pkt = { LOG_PACKET_HEADER_INIT(LOG_IMUDT_MSG), time_us : time_us, @@ -992,7 +992,7 @@ void DataFlash_Class::Log_Write_IMUDT(const AP_InertialSensor &ins) void DataFlash_Class::Log_Write_Vibration(const AP_InertialSensor &ins) { - uint64_t time_us = hal.scheduler->micros64(); + uint64_t time_us = AP_HAL::micros64(); Vector3f vibration = ins.get_vibration_levels(); struct log_Vibe pkt = { LOG_PACKET_HEADER_INIT(LOG_VIBE_MSG), @@ -1046,7 +1046,7 @@ bool DataFlash_Class::Log_Write_Message(const char *message) { struct log_Message pkt = { LOG_PACKET_HEADER_INIT(LOG_MESSAGE_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), msg : {} }; strncpy(pkt.msg, message, sizeof(pkt.msg)); @@ -1058,7 +1058,7 @@ void DataFlash_Class::Log_Write_Power(void) #if CONFIG_HAL_BOARD == HAL_BOARD_PX4 struct log_POWR pkt = { LOG_PACKET_HEADER_INIT(LOG_POWR_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), Vcc : (uint16_t)(hal.analogin->board_voltage() * 100), Vservo : (uint16_t)(hal.analogin->servorail_voltage() * 100), flags : hal.analogin->power_status_flags() @@ -1077,7 +1077,7 @@ void DataFlash_Class::Log_Write_AHRS2(AP_AHRS &ahrs) } struct log_AHRS pkt = { LOG_PACKET_HEADER_INIT(LOG_AHR2_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), roll : (int16_t)(degrees(euler.x)*100), pitch : (int16_t)(degrees(euler.y)*100), yaw : (uint16_t)(wrap_360_cd(degrees(euler.z)*100)), @@ -1099,7 +1099,7 @@ void DataFlash_Class::Log_Write_POS(AP_AHRS &ahrs) ahrs.get_relative_position_NED(pos); struct log_POS pkt = { LOG_PACKET_HEADER_INIT(LOG_POS_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), lat : loc.lat, lng : loc.lng, alt : loc.alt*1.0e-2f, @@ -1128,7 +1128,7 @@ void DataFlash_Class::Log_Write_EKF(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled) posDownDeriv = ahrs.get_NavEKF().getPosDownDerivative(); struct log_EKF1 pkt = { LOG_PACKET_HEADER_INIT(LOG_EKF1_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), roll : (int16_t)(100*degrees(euler.x)), // roll angle (centi-deg, displayed as deg due to format string) pitch : (int16_t)(100*degrees(euler.y)), // pitch angle (centi-deg, displayed as deg due to format string) yaw : (uint16_t)wrap_360_cd(100*degrees(euler.z)), // yaw angle (centi-deg, displayed as deg due to format string) @@ -1158,7 +1158,7 @@ void DataFlash_Class::Log_Write_EKF(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled) ahrs.get_NavEKF().getMagXYZ(magXYZ); struct log_EKF2 pkt2 = { LOG_PACKET_HEADER_INIT(LOG_EKF2_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), Ratio : (int8_t)(100*ratio), AZ1bias : (int8_t)(100*az1bias), AZ2bias : (int8_t)(100*az2bias), @@ -1181,7 +1181,7 @@ void DataFlash_Class::Log_Write_EKF(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled) ahrs.get_NavEKF().getInnovations(velInnov, posInnov, magInnov, tasInnov); struct log_EKF3 pkt3 = { LOG_PACKET_HEADER_INIT(LOG_EKF3_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), innovVN : (int16_t)(100*velInnov.x), innovVE : (int16_t)(100*velInnov.y), innovVD : (int16_t)(100*velInnov.z), @@ -1212,7 +1212,7 @@ void DataFlash_Class::Log_Write_EKF(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled) ahrs.get_NavEKF().getFilterGpsStatus(gpsStatus); struct log_EKF4 pkt4 = { LOG_PACKET_HEADER_INIT(LOG_EKF4_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), sqrtvarV : (int16_t)(100*velVar), sqrtvarP : (int16_t)(100*posVar), sqrtvarH : (int16_t)(100*hgtVar), @@ -1243,7 +1243,7 @@ void DataFlash_Class::Log_Write_EKF(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled) ahrs.get_NavEKF().getFlowDebug(normInnov, gndOffset, flowInnovX, flowInnovY, auxFlowInnov, HAGL, rngInnov, range, gndOffsetErr); struct log_EKF5 pkt5 = { LOG_PACKET_HEADER_INIT(LOG_EKF5_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), normInnov : (uint8_t)(min(100*normInnov,255)), FIX : (int16_t)(1000*flowInnovX), FIY : (int16_t)(1000*flowInnovY), @@ -1281,7 +1281,7 @@ void DataFlash_Class::Log_Write_EKF2(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled) posDownDeriv = ahrs.get_NavEKF2().getPosDownDerivative(0); struct log_EKF1 pkt = { LOG_PACKET_HEADER_INIT(LOG_NKF1_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), roll : (int16_t)(100*degrees(euler.x)), // roll angle (centi-deg, displayed as deg due to format string) pitch : (int16_t)(100*degrees(euler.y)), // pitch angle (centi-deg, displayed as deg due to format string) yaw : (uint16_t)wrap_360_cd(100*degrees(euler.z)), // yaw angle (centi-deg, displayed as deg due to format string) @@ -1312,7 +1312,7 @@ void DataFlash_Class::Log_Write_EKF2(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled) ahrs.get_NavEKF2().getGyroScaleErrorPercentage(0,gyroScaleFactor); struct log_NKF2 pkt2 = { LOG_PACKET_HEADER_INIT(LOG_NKF2_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), AZbias : (int8_t)(100*azbias), scaleX : (int16_t)(100*gyroScaleFactor.x), scaleY : (int16_t)(100*gyroScaleFactor.y), @@ -1338,7 +1338,7 @@ void DataFlash_Class::Log_Write_EKF2(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled) ahrs.get_NavEKF2().getInnovations(0,velInnov, posInnov, magInnov, tasInnov, yawInnov); struct log_NKF3 pkt3 = { LOG_PACKET_HEADER_INIT(LOG_NKF3_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), innovVN : (int16_t)(100*velInnov.x), innovVE : (int16_t)(100*velInnov.y), innovVD : (int16_t)(100*velInnov.z), @@ -1374,7 +1374,7 @@ void DataFlash_Class::Log_Write_EKF2(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled) uint8_t primaryIndex = ahrs.get_NavEKF2().getPrimaryCoreIndex(); struct log_NKF4 pkt4 = { LOG_PACKET_HEADER_INIT(LOG_NKF4_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), sqrtvarV : (int16_t)(100*velVar), sqrtvarP : (int16_t)(100*posVar), sqrtvarH : (int16_t)(100*hgtVar), @@ -1404,7 +1404,7 @@ void DataFlash_Class::Log_Write_EKF2(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled) ahrs.get_NavEKF2().getFlowDebug(-1,normInnov, gndOffset, flowInnovX, flowInnovY, auxFlowInnov, HAGL, rngInnov, range, gndOffsetErr); struct log_EKF5 pkt5 = { LOG_PACKET_HEADER_INIT(LOG_NKF5_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), normInnov : (uint8_t)(min(100*normInnov,255)), FIX : (int16_t)(1000*flowInnovX), FIY : (int16_t)(1000*flowInnovY), @@ -1428,7 +1428,7 @@ void DataFlash_Class::Log_Write_EKF2(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled) posDownDeriv = ahrs.get_NavEKF2().getPosDownDerivative(1); struct log_EKF1 pkt6 = { LOG_PACKET_HEADER_INIT(LOG_NKF6_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), roll : (int16_t)(100*degrees(euler.x)), // roll angle (centi-deg, displayed as deg due to format string) pitch : (int16_t)(100*degrees(euler.y)), // pitch angle (centi-deg, displayed as deg due to format string) yaw : (uint16_t)wrap_360_cd(100*degrees(euler.z)), // yaw angle (centi-deg, displayed as deg due to format string) @@ -1454,7 +1454,7 @@ void DataFlash_Class::Log_Write_EKF2(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled) magIndex = ahrs.get_NavEKF2().getActiveMag(1); struct log_NKF2 pkt7 = { LOG_PACKET_HEADER_INIT(LOG_NKF7_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), AZbias : (int8_t)(100*azbias), scaleX : (int16_t)(100*gyroScaleFactor.x), scaleY : (int16_t)(100*gyroScaleFactor.y), @@ -1475,7 +1475,7 @@ void DataFlash_Class::Log_Write_EKF2(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled) ahrs.get_NavEKF2().getInnovations(1,velInnov, posInnov, magInnov, tasInnov, yawInnov); struct log_NKF3 pkt8 = { LOG_PACKET_HEADER_INIT(LOG_NKF8_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), innovVN : (int16_t)(100*velInnov.x), innovVE : (int16_t)(100*velInnov.y), innovVD : (int16_t)(100*velInnov.z), @@ -1500,7 +1500,7 @@ void DataFlash_Class::Log_Write_EKF2(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled) ahrs.get_NavEKF2().getTiltError(1,tiltError); struct log_NKF4 pkt9 = { LOG_PACKET_HEADER_INIT(LOG_NKF9_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), sqrtvarV : (int16_t)(100*velVar), sqrtvarP : (int16_t)(100*posVar), sqrtvarH : (int16_t)(100*hgtVar), @@ -1525,7 +1525,7 @@ bool DataFlash_Class::Log_Write_MavCmd(uint16_t cmd_total, const mavlink_mission { struct log_Cmd pkt = { LOG_PACKET_HEADER_INIT(LOG_CMD_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), command_total : (uint16_t)cmd_total, sequence : (uint16_t)mav_cmd.seq, command : (uint16_t)mav_cmd.command, @@ -1544,7 +1544,7 @@ void DataFlash_Class::Log_Write_Radio(const mavlink_radio_t &packet) { struct log_Radio pkt = { LOG_PACKET_HEADER_INIT(LOG_RADIO_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), rssi : packet.rssi, remrssi : packet.remrssi, txbuf : packet.txbuf, @@ -1570,7 +1570,7 @@ void DataFlash_Class::Log_Write_Camera(const AP_AHRS &ahrs, const AP_GPS &gps, c struct log_Camera pkt = { LOG_PACKET_HEADER_INIT(LOG_CAMERA_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), gps_time : gps.time_week_ms(), gps_week : gps.time_week(), latitude : current_loc.lat, @@ -1589,7 +1589,7 @@ void DataFlash_Class::Log_Write_Attitude(AP_AHRS &ahrs, const Vector3f &targets) { struct log_Attitude pkt = { LOG_PACKET_HEADER_INIT(LOG_ATTITUDE_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), control_roll : (int16_t)targets.x, roll : (int16_t)ahrs.roll_sensor, control_pitch : (int16_t)targets.y, @@ -1608,7 +1608,7 @@ void DataFlash_Class::Log_Write_Current(const AP_BattMonitor &battery, int16_t t float voltage2 = battery.voltage2(); struct log_Current pkt = { LOG_PACKET_HEADER_INIT(LOG_CURRENT_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), throttle : throttle, battery_voltage : (int16_t) (battery.voltage() * 100.0f), current_amps : (int16_t) (battery.current_amps() * 100.0f), @@ -1627,7 +1627,7 @@ void DataFlash_Class::Log_Write_Compass(const Compass &compass) const Vector3f &mag_motor_offsets = compass.get_motor_offsets(0); struct log_Compass pkt = { LOG_PACKET_HEADER_INIT(LOG_COMPASS_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), mag_x : (int16_t)mag_field.x, mag_y : (int16_t)mag_field.y, mag_z : (int16_t)mag_field.z, @@ -1647,7 +1647,7 @@ void DataFlash_Class::Log_Write_Compass(const Compass &compass) const Vector3f &mag_motor_offsets2 = compass.get_motor_offsets(1); struct log_Compass pkt2 = { LOG_PACKET_HEADER_INIT(LOG_COMPASS2_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), mag_x : (int16_t)mag_field2.x, mag_y : (int16_t)mag_field2.y, mag_z : (int16_t)mag_field2.z, @@ -1668,7 +1668,7 @@ void DataFlash_Class::Log_Write_Compass(const Compass &compass) const Vector3f &mag_motor_offsets3 = compass.get_motor_offsets(2); struct log_Compass pkt3 = { LOG_PACKET_HEADER_INIT(LOG_COMPASS3_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), mag_x : (int16_t)mag_field3.x, mag_y : (int16_t)mag_field3.y, mag_z : (int16_t)mag_field3.z, @@ -1689,7 +1689,7 @@ bool DataFlash_Class::Log_Write_Mode(uint8_t mode) { struct log_Mode pkt = { LOG_PACKET_HEADER_INIT(LOG_MODE_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), mode : mode, mode_num : mode }; @@ -1715,7 +1715,7 @@ void DataFlash_Class::Log_Write_ESC(void) if (esc_status.esc_count > 8) { esc_status.esc_count = 8; } - uint64_t time_us = hal.scheduler->micros64(); + uint64_t time_us = AP_HAL::micros64(); for (uint8_t i = 0; i < esc_status.esc_count; i++) { // skip logging ESCs with a esc_address of zero, and this // are probably not populated. The Pixhawk itself should @@ -1746,7 +1746,7 @@ void DataFlash_Class::Log_Write_Airspeed(AP_Airspeed &airspeed) } struct log_AIRSPEED pkt = { LOG_PACKET_HEADER_INIT(LOG_ARSP_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), airspeed : airspeed.get_raw_airspeed(), diffpressure : airspeed.get_differential_pressure(), temperature : (int16_t)(temperature * 100.0f), @@ -1761,7 +1761,7 @@ void DataFlash_Class::Log_Write_PID(uint8_t msg_type, const PID_Info &info) { struct log_PID pkt = { LOG_PACKET_HEADER_INIT(msg_type), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), desired : info.desired, P : info.P, I : info.I, @@ -1774,7 +1774,7 @@ void DataFlash_Class::Log_Write_PID(uint8_t msg_type, const PID_Info &info) void DataFlash_Class::Log_Write_Origin(uint8_t origin_type, const Location &loc) { - uint64_t time_us = hal.scheduler->micros64(); + uint64_t time_us = AP_HAL::micros64(); struct log_ORGN pkt = { LOG_PACKET_HEADER_INIT(LOG_ORGN_MSG), time_us : time_us, @@ -1790,7 +1790,7 @@ void DataFlash_Class::Log_Write_RPM(const AP_RPM &rpm_sensor) { struct log_RPM pkt = { LOG_PACKET_HEADER_INIT(LOG_RPM_MSG), - time_us : hal.scheduler->micros64(), + time_us : AP_HAL::micros64(), rpm1 : rpm_sensor.get_rpm(0), rpm2 : rpm_sensor.get_rpm(1) };