From dbc5e10609c011103d2fdb15a150ca563c47edce Mon Sep 17 00:00:00 2001 From: Angel <roangel@student.ethz.ch> Date: Wed, 18 Oct 2017 15:47:43 +0200 Subject: [PATCH] debug battery number --- pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/src/MainWindow.cpp | 2 ++ pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/studentGUI.pro.user | 2 +- pps_ws/src/d_fall_pps/param/Crazyflie.db | 2 +- pps_ws/src/d_fall_pps/src/PPSClient.cpp | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/src/MainWindow.cpp b/pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/src/MainWindow.cpp index 26b07d56..57f10101 100644 --- a/pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/src/MainWindow.cpp +++ b/pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/src/MainWindow.cpp @@ -298,12 +298,14 @@ void MainWindow::updateBatteryVoltage(float battery_voltage) QString qstr = "Raw voltage: "; qstr.append(QString::number(battery_voltage, 'f', 2)); + ROS_INFO_STREAM("battery voltage " << battery_voltage); ui->raw_voltage->clear(); ui->raw_voltage->setText(qstr); } void MainWindow::CFBatteryCallback(const std_msgs::Float32& msg) { + ROS_INFO("callback CFBattery received in GUI"); updateBatteryVoltage(msg.data); } diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/studentGUI.pro.user b/pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/studentGUI.pro.user index 5fd62e86..8e1edbbf 100644 --- a/pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/studentGUI.pro.user +++ b/pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/studentGUI.pro.user @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE QtCreatorProject> -<!-- Written by QtCreator 3.5.1, 2017-10-09T15:14:52. --> +<!-- Written by QtCreator 3.5.1, 2017-10-18T15:20:06. --> <qtcreator> <data> <variable>EnvironmentId</variable> diff --git a/pps_ws/src/d_fall_pps/param/Crazyflie.db b/pps_ws/src/d_fall_pps/param/Crazyflie.db index 71d3eb1f..f18cf79b 100644 --- a/pps_ws/src/d_fall_pps/param/Crazyflie.db +++ b/pps_ws/src/d_fall_pps/param/Crazyflie.db @@ -1 +1 @@ -6,PPS_CF04,0/24/2M/E7E7E7E704,0,-1.18,-0.65,-0.2,0.93,1.04,2 +5,PPS_CF05,0/32/2M/E7E7E7E705,0,-1.10209,-0.137356,-0.2,0.453276,1.22247,2 diff --git a/pps_ws/src/d_fall_pps/src/PPSClient.cpp b/pps_ws/src/d_fall_pps/src/PPSClient.cpp index 8d0a5025..ae0771ed 100755 --- a/pps_ws/src/d_fall_pps/src/PPSClient.cpp +++ b/pps_ws/src/d_fall_pps/src/PPSClient.cpp @@ -761,7 +761,7 @@ void CFBatteryCallback(const std_msgs::Float32& msg) // need to do the filtering first float filtered_battery_voltage = movingAverageBatteryFilter(m_battery_voltage); //need to perform filtering here - ROS_INFO_STREAM("filtered data: " << filtered_battery_voltage); + // ROS_INFO_STREAM("filtered data: " << filtered_battery_voltage); if((flying_state != STATE_MOTORS_OFF && (filtered_battery_voltage < m_battery_threshold_while_flying)) || (flying_state == STATE_MOTORS_OFF && (filtered_battery_voltage < m_battery_threshold_while_motors_off))) { -- GitLab