Commit 8da2820d authored by lm's avatar lm

Fixed ground time button YEEHAY!

parent 40716011
......@@ -1259,8 +1259,10 @@ void UAS::enableExtra3Transmission(int rate)
* @param id Name of the parameter
* @param value Parameter value
*/
void UAS::setParameter(int component, QString id, float value)
{
void UAS::setParameter(const int component, const QString& id, const float value)
{
if (!id.isNull())
{
mavlink_message_t msg;
mavlink_param_set_t p;
p.param_value = value;
......@@ -1288,6 +1290,7 @@ void UAS::setParameter(int component, QString id, float value)
}
mavlink_msg_param_set_encode(mavlink->getSystemId(), mavlink->getComponentId(), &msg, &p);
sendMessage(msg);
}
}
/**
......
......@@ -239,7 +239,7 @@ public slots:
void requestParameters();
/** @brief Set a system parameter */
void setParameter(int component, QString id, float value);
void setParameter(const int component, const QString& id, const float value);
/** @brief Write parameters to permanent storage */
void writeParametersToStorage();
......
......@@ -214,7 +214,7 @@ public slots:
* @warning The length of the ID string is limited by the MAVLink format! Take care to not exceed it
* @param value Value of the parameter, IEEE 754 single precision floating point
*/
virtual void setParameter(int component, QString id, float value) = 0;
virtual void setParameter(const int component, const QString& id, const float value) = 0;
/**
* @brief Add a link to the list of current links
......@@ -327,8 +327,14 @@ signals:
* @param value the value that changed
* @param msec the timestamp of the message, in milliseconds
*/
// FIXME Exchange the lines below against the commented ones
void valueChanged(int uasId, QString name, double value, quint64 msec);
void valueChanged(UASInterface* uas, QString name, double value, quint64 msec);
// void valueChanged(const int uasId, const QString& name, const double value, const quint64 msec);
// //void valueChanged(UASInterface* uas, QString name, double value, quint64 msec);
void voltageChanged(int uasId, double voltage);
void waypointUpdated(int uasId, int id, double x, double y, double z, double yaw, bool autocontinue, bool active);
void waypointSelected(int uasId, int id);
......
......@@ -285,7 +285,7 @@ void HUD::updateAttitudeThrustSetPoint(UASInterface*, double rollDesired, double
void HUD::updateAttitude(UASInterface* uas, double roll, double pitch, double yaw, quint64 timestamp)
{
qDebug() << __FILE__ << __LINE__ << "ROLL" << yaw;
//qDebug() << __FILE__ << __LINE__ << "YAW" << yaw;
updateValue(uas, "roll", roll, timestamp);
updateValue(uas, "pitch", pitch, timestamp);
updateValue(uas, "yaw", yaw, timestamp);
......
......@@ -254,7 +254,8 @@ void LinechartPlot::appendData(QString dataname, quint64 ms, double value)
if(ms < minTime) minTime = ms;
if(ms > maxTime) maxTime = ms;
storageInterval = maxTime - minTime;
lastTime = time;
if(time > lastTime) lastTime = time;
//
if (value < minValue) minValue = value;
......@@ -276,6 +277,8 @@ void LinechartPlot::appendData(QString dataname, quint64 ms, double value)
void LinechartPlot::enforceGroundTime(bool enforce)
{
m_groundTime = enforce;
lastTime = QGC::groundTimeUsecs()/1000;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment