SlugsDataSensorView.h 5.45 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
/*=====================================================================

QGroundControl Open Source Ground Control Station

(c) 2009, 2010 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>

This file is part of the QGROUNDCONTROL project

    QGROUNDCONTROL is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    QGROUNDCONTROL is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.

======================================================================*/

/**
 * @file
 *   @brief Grpahical presentation of SLUGS generated data
 *
 *   @author Juan F. Robles  <jfroblesc@gmail.com>
 *
 */

#ifndef SLUGSDATASENSORVIEW_H
#define SLUGSDATASENSORVIEW_H

#include <QWidget>

#include "UASInterface.h"
tecnosapiens's avatar
tecnosapiens committed
38
#include "SlugsMAV.h"
39
#include "mavlink.h"
40

41

42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
namespace Ui {
    class SlugsDataSensorView;
}

class SlugsDataSensorView : public QWidget
{
    Q_OBJECT

public:
    explicit SlugsDataSensorView(QWidget *parent = 0);
    ~SlugsDataSensorView();

public slots:
    /**
         * @brief Adds the UAS for data display
         *
         * Adds the UAS and makes all the correct connections for data display on the Widgets. If
         * there is no current UAS active, it sets it as active.

         * @param uas The UAS being added
    */
    void addUAS(UASInterface* uas);

    /**
         * @brief Sets the UAS as active
         *
         * @param uas The UAS being set as active
    */
    void setActiveUAS(UASInterface* uas);

72

73
    void slugRawDataChanged (int uasId, const mavlink_raw_imu_t& rawData);
74

75
#ifdef MAVLINK_ENABLED_SLUGS
tecnosapiens's avatar
tecnosapiens committed
76 77 78 79 80
    /**
         * @brief Adds the UAS for data display
         *
         * Adds the UAS and makes all the correct connections for data display on the Widgets
    */
81
    void slugLocalPositionChanged(UASInterface* uas,
82 83 84 85
                                  double x,
                                  double y,
                                  double z,
                                  quint64 time);
tecnosapiens's avatar
tecnosapiens committed
86 87 88 89 90
    /**
         * @brief Adds the UAS for data display
         *
         * Adds the UAS and makes all the correct connections for data display on the Widgets
    */
91
    void slugSpeedLocalPositionChanged(UASInterface* uas,
92 93 94 95
                                       double vx,
                                       double vy,
                                       double vz,
                                       quint64 time);
tecnosapiens's avatar
tecnosapiens committed
96 97 98 99 100
    /**
         * @brief Adds the UAS for data display
         *
         * Adds the UAS and makes all the correct connections for data display on the Widgets
    */
101
    void slugAttitudeChanged(UASInterface* uas,
102 103 104 105
                             double slugroll,
                             double slugpitch,
                             double slugyaw,
                             quint64 time);
106 107 108 109 110 111 112 113 114 115 116

    /**
         * @brief Adds the UAS for data display
         *
         * Adds the UAS and makes all the correct connections for data display on the Widgets
    */
    void slugsGlobalPositionChanged(UASInterface* uas,
                                    double lat,
                                    double lon,
                                    double alt,
                                    quint64 time);
117 118 119 120 121 122 123 124


    /**
         * @brief Updates the CPU load widget - 170
    */
    void slugsCpuLoadChanged(int systemId,
                             const mavlink_cpu_load_t& cpuLoad);

tecnosapiens's avatar
tecnosapiens committed
125
    /**
126 127 128 129 130 131 132
         * @brief Updates the air data widget - 171
    */
    void slugsAirDataChanged(int systemId,
                             const mavlink_air_data_t& airData);

    /**
         * @brief Updates the sensor bias widget - 172
tecnosapiens's avatar
tecnosapiens committed
133
    */
134
    void slugsSensorBiasChanged(int systemId,
135 136
                                const mavlink_sensor_bias_t& sensorBias);

tecnosapiens's avatar
tecnosapiens committed
137
    /**
138
         * @brief Updates the diagnostic widget - 173
tecnosapiens's avatar
tecnosapiens committed
139
    */
140
    void slugsDiagnosticMessageChanged(int systemId,
141
                                       const mavlink_diagnostic_t& diagnostic);
142 143 144


    /**
145
         * @brief Updates the Navigation widget - 176
146 147
    */
    void slugsNavegationChanged(int systemId,
148
                                const mavlink_slugs_navigation_t& slugsNavigation);
149 150

    /**
151
         * @brief Updates the Data Log widget - 177
152 153
    */
   void  slugsDataLogChanged(int systemId,
154
                             const mavlink_data_log_t& dataLog);
155 156

   /**
157
        * @brief Updates the PWM Commands widget - 175
158 159
   */
   void slugsPWMChanged(int systemId,
160
                        const mavlink_pwm_commands_t& pwmCommands);
161 162

   /**
163
        * @brief Updates the filtered sensor measurements widget - 178
164 165
   */
   void slugsFilteredDataChanged(int systemId,
166
                                 const mavlink_filtered_data_t& filteredData);
167 168


169
   /**
170
        * @brief Updates the gps Date Time widget - 179
171
   */
172
    void slugsGPSDateTimeChanged(int systemId,
173
                                 const mavlink_gps_date_time_t& gpsDateTime);
174

175 176


177
#endif // MAVLINK_ENABLED_SLUGS
178 179 180 181 182 183 184 185

protected:
     UASInterface* activeUAS;

private:
    Ui::SlugsDataSensorView *ui;


186 187 188 189 190





191 192 193
};

#endif // SLUGSDATASENSORVIEW_H