diff --git a/src/uas/QGCUASFileManager.h b/src/uas/QGCUASFileManager.h index 5a3bc8432df5c7502a4f9f49280f7d5ee2830129..817cefb3a1296e5a021ea5dd992d6050acfcf6c1 100644 --- a/src/uas/QGCUASFileManager.h +++ b/src/uas/QGCUASFileManager.h @@ -39,6 +39,10 @@ public: bool _sendCmdTestAck(void) { return _sendOpcodeOnlyCmd(kCmdNone, kCOAck); }; bool _sendCmdTestNoAck(void) { return _sendOpcodeOnlyCmd(kCmdTestNoAck, kCOAck); }; bool _sendCmdReset(void) { return _sendOpcodeOnlyCmd(kCmdReset, kCOAck); }; + + /// @brief Timeout in msecs to wait for an Ack time come back. This is public so we can write unit tests which wait long enough + /// for the FileManager to timeout. + static const int ackTimerTimeoutMsecs = 1000; signals: void statusMessage(const QString& msg); @@ -140,9 +144,8 @@ protected: static quint32 crc32(Request* request, unsigned state = 0); static QString errorString(uint8_t errorCode); - OperationState _currentOperation; ///> Current operation of state machine - QTimer _ackTimer; ///> Used to signal a timeout waiting for an ack - static const int _ackTimerTimeoutMsecs = 1000; ///> Timeout in msecs for ack timer + OperationState _currentOperation; ///> Current operation of state machine + QTimer _ackTimer; ///> Used to signal a timeout waiting for an ack UASInterface* _mav; quint16 _encdata_seq;