Index: denali.pro.user =================================================================== diff -u -r3f555c49ddd2c983f469709e3c001d0e76159248 -r73d6d02c19467735e92f7c451ca5d3b47a2a90e4 --- denali.pro.user (.../denali.pro.user) (revision 3f555c49ddd2c983f469709e3c001d0e76159248) +++ denali.pro.user (.../denali.pro.user) (revision 73d6d02c19467735e92f7c451ca5d3b47a2a90e4) @@ -1,6 +1,6 @@ - + EnvironmentId Index: en_US.udic =================================================================== diff -u -r3f555c49ddd2c983f469709e3c001d0e76159248 -r73d6d02c19467735e92f7c451ca5d3b47a2a90e4 --- en_US.udic (.../en_US.udic) (revision 3f555c49ddd2c983f469709e3c001d0e76159248) +++ en_US.udic (.../en_US.udic) (revision 73d6d02c19467735e92f7c451ca5d3b47a2a90e4) @@ -164,3 +164,4 @@ FSINTEGRITY FILESYSTEM Cyber +uchar Index: sources/canbus/MessageDispatcher.cpp =================================================================== diff -u -rebc82b5efe26c1081606fab06a1c99bb4f9c0098 -r73d6d02c19467735e92f7c451ca5d3b47a2a90e4 --- sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision ebc82b5efe26c1081606fab06a1c99bb4f9c0098) +++ sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision 73d6d02c19467735e92f7c451ca5d3b47a2a90e4) @@ -754,7 +754,7 @@ * \param vActionId - The ActionID of the message * \param vData - The data of the Message */ -void MessageDispatcher::actionTransmit(GuiActionType vActionId, const QVariantList &vData, Sequence vSequence) +void MessageDispatcher::actionTransmit(GuiActionType vActionId, const QVariantList &vData, Sequence vSequence, Can_Id vCanId) { txCount(); if (vSequence == 0) { // initialize @@ -765,7 +765,7 @@ } QByteArray mData; - Can_Id canid; + Can_Id canid = vCanId; if (! _interpreter.interpretMessage(vActionId, vData, mData, canid)) { LOG_DEBUG(QString("Incorrect Message, can't be interpreted, %1").arg(Format::toHexString(vActionId))); // TODO : LogInfo Improvement return; @@ -837,15 +837,15 @@ return true; } -bool MessageDispatcher::checkAcknowReceived(const Message &vMessage, const char *src) +bool MessageDispatcher::checkAcknowReceived(const Message &vMessage, const QString &vSrcText) { GuiActionType mActionId = vMessage.actionId; Sequence mSequence = vMessage.sequence; bool ok = false; if ( mActionId == GuiActionType::ID_Acknow ) { ok = true; #ifndef DISABLE_ACKNOW_CHECKIN_MESSAGE_LOG - LOG_EVENT(tr("%1,Ack Bak, Sq:%2").arg(src).arg(mSequence)); + LOG_EVENT(tr("%1,Ack Bak, Sq:%2").arg(vSrcText).arg(mSequence)); #endif #ifdef DEBUG_ACKBACK_HD_TO_UI qDebug() << tr(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HD AckBak : %1 %2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ").arg(mSequence).arg(vMessage.actionId); @@ -855,23 +855,25 @@ return ok; } -bool MessageDispatcher::checkAcknowTransmit(const Message &vMessage, const char *src) +bool MessageDispatcher::checkAcknowTransmit(const Message &vMessage, const QString &vSrcText) { bool ok = false; GuiActionType mActionId = vMessage.actionId; Sequence mSequence = vMessage.sequence; if (mSequence < 0) { ok = true; #ifndef DISABLE_ACKNOW_CHECKIN_MESSAGE_LOG - LOG_EVENT(tr("%1,Ack Req, Sq:%2, ID:%3").arg(src).arg(mSequence).arg(Format::toHexString(mActionId))); + LOG_EVENT(tr("%1,Ack Req, Sq:%2, ID:%3").arg(vSrcText).arg(mSequence).arg(Format::toHexString(mActionId))); #endif #ifdef DEBUG_ACKBACK_HD_TO_UI qDebug() << tr(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HD AckReq : %1 %2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ").arg(mSequence).arg(vMessage.actionId); #endif // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ UI AckBak is immediately handled at the same place. - actionTransmit(GuiActionType::ID_Acknow, {}, -mSequence); + QString dstText; + Can_Id dstID = MessageInterpreter::identifyDestination(vMessage.can_id, &dstText); + actionTransmit(GuiActionType::ID_Acknow, {}, -mSequence, dstID); #ifndef DISABLE_ACKNOW_CHECKIN_MESSAGE_LOG - LOG_EVENT(tr("UI,Ack Bak, Sq:%1").arg(-mSequence)); + LOG_EVENT(tr("UI,Ack Bak, Sq:%1, Dst:%2").arg(-mSequence).arg(dstText)); #endif #ifdef DEBUG_ACKBACK_HD_TO_UI qDebug() << tr(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ UI AckBak : %1 %2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ").arg(-mSequence).arg(vMessage.actionId); @@ -892,8 +894,8 @@ { bool ok = false; QVariantList mData; - Can_Source srcID = MessageInterpreter::identifySource(vMessage.can_id); - const char *srcText = (srcID == Can_Source::eCan_HD) ? "HD" : ((srcID == Can_Source::eCan_DG) ? "DG" : "XX"); + QString srcText; + MessageInterpreter::identifySource(vMessage.can_id, &srcText); if ( ! checkAcknowReceived(vMessage, srcText) ) { // check if the message was an acknowledge. checkAcknowTransmit(vMessage, srcText); // then if needs acknow send it immediately. } Index: sources/canbus/MessageDispatcher.h =================================================================== diff -u -rebc82b5efe26c1081606fab06a1c99bb4f9c0098 -r73d6d02c19467735e92f7c451ca5d3b47a2a90e4 --- sources/canbus/MessageDispatcher.h (.../MessageDispatcher.h) (revision ebc82b5efe26c1081606fab06a1c99bb4f9c0098) +++ sources/canbus/MessageDispatcher.h (.../MessageDispatcher.h) (revision 73d6d02c19467735e92f7c451ca5d3b47a2a90e4) @@ -174,7 +174,7 @@ void initThread(QThread &vThread); void quitThread(); - void actionTransmit (GuiActionType vActionId, const QVariantList &vData, Sequence vSequence = 0); + void actionTransmit (GuiActionType vActionId, const QVariantList &vData, Sequence vSequence = 0, Can_Id vCanId = Can::Can_Id::eChlid_UI_HD); void framesTransmit (Can_Id vCan_Id, const FrameList &vFrameList); bool needsAcknow (GuiActionType vActionId); @@ -185,8 +185,8 @@ Sequence txCount(); Sequence rxCount(); - bool checkAcknowReceived(const Message &vMessage, const char *src); - bool checkAcknowTransmit(const Message &vMessage, const char *src); + bool checkAcknowReceived(const Message &vMessage, const QString &vSrcText); + bool checkAcknowTransmit(const Message &vMessage, const QString &vSrcText); signals: /*! Index: sources/canbus/MessageInterpreter.cpp =================================================================== diff -u -r2bc6542cebc264eb343f791f75223a1ca151465e -r73d6d02c19467735e92f7c451ca5d3b47a2a90e4 --- sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 2bc6542cebc264eb343f791f75223a1ca151465e) +++ sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 73d6d02c19467735e92f7c451ca5d3b47a2a90e4) @@ -213,7 +213,8 @@ { bool ok = true; QString mSenderID = "UI,"; - vCanId = Can::Can_Id::eChlid_UI_HD; + if (vCanId == Can::Can_Id::eChlid_NONE ) + vCanId = Can::Can_Id::eChlid_UI_HD ; vPayload.clear(); int length = vData.length(); @@ -303,27 +304,58 @@ * \return the source of the message in enum * \sa can::Can_Source */ -Can_Source MessageInterpreter::identifySource(Can_Id vCanId) +Can_Source MessageInterpreter::identifySource(Can_Id vCanId, QString *vText) { switch (vCanId) { case eChlid_HD_DG : // 0x008, ///< HD => DG case eChlid_HD_UI : // 0x020, ///< HD => UI case eChlid_HD_Alarm: // 0x001, ///< HD alarm broadcast case eChlid_HD_Sync : // 0x040, ///< HD sync broadcast + if (vText) *vText = "HD"; return Can_Source::eCan_HD; case eChlid_DG_HD : // 0x010, ///< DG => HD case eChlid_DG_UI : // 0x070, ///< DG => UI case eChlid_DG_Alarm: // 0x002, ///< DG alarm broadcast case eChlid_DG_Sync : // 0x080, ///< DG sync broadcast + if (vText) *vText = "DG"; return Can_Source::eCan_DG; default: + if (vText) *vText = "XX"; return Can_Source::eCan_Unknown; } } /*! + * \brief MessageInterpreter::identifyDestination + * \details Identifies the destination of the message regarding the channel id for the acknowledges + * \return the destination of the message in enum + * \sa can::Can_Source + * \sa can::Can_Id + */ +Can_Id MessageInterpreter::identifyDestination(Can_Id vCanId, QString *vText) +{ + switch (vCanId) { + case eChlid_HD_UI : // 0x020, ///< HD => UI + case eChlid_HD_Alarm: // 0x001, ///< HD alarm broadcast + case eChlid_HD_Sync : // 0x040, ///< HD sync broadcast + if (vText) *vText = "HD"; + return Can_Id::eChlid_UI_HD; + + case eChlid_DG_UI : // 0x070, ///< DG => UI + case eChlid_DG_Alarm: // 0x002, ///< DG alarm broadcast + case eChlid_DG_Sync : // 0x080, ///< DG sync broadcast + if (vText) *vText = "DG"; + return Can_Id::eChlid_UI_DG; + + default: + if (vText) *vText = "XX"; + return Can_Id::eChlid_UI_Sync; + } +} + +/*! * \brief MessageInterpreter::interpretMessage * \details This method will call appropriate message interpreter * for received messages from HD or DG regarding the Can_Id. Index: sources/canbus/MessageInterpreter.h =================================================================== diff -u -rca2d407720dc1828ade54ddb48a41bbfe2d900fd -r73d6d02c19467735e92f7c451ca5d3b47a2a90e4 --- sources/canbus/MessageInterpreter.h (.../MessageInterpreter.h) (revision ca2d407720dc1828ade54ddb48a41bbfe2d900fd) +++ sources/canbus/MessageInterpreter.h (.../MessageInterpreter.h) (revision 73d6d02c19467735e92f7c451ca5d3b47a2a90e4) @@ -90,7 +90,8 @@ bool interpretMessage(const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; bool interpretMessage(const Gui::GuiActionType &vActionId, const QVariantList &vData, QByteArray &vPayload, Can_Id &vCanId) __attribute_warn_unused_result__; - static Can_Source identifySource(Can_Id vCanId); + static Can_Source identifySource (Can_Id vCanId, QString *vText = nullptr); + static Can_Id identifyDestination(Can_Id vCanId, QString *vText = nullptr); signals: ACTION_RECEIVE_SIGNALS Index: sources/gui/qml/components/MainMenu.qml =================================================================== diff -u -r5c21e83a3fdc897cb99ac62e1cec0213f411cd73 -r73d6d02c19467735e92f7c451ca5d3b47a2a90e4 --- sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision 5c21e83a3fdc897cb99ac62e1cec0213f411cd73) +++ sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision 73d6d02c19467735e92f7c451ca5d3b47a2a90e4) @@ -38,7 +38,6 @@ property bool hasLogo : false property int currentIndex : 0 property string currentTitle : titles[currentIndex] - readonly property var currentItem : _private.items[currentIndex] /*! * \brief Emits when a menu item pressed @@ -47,7 +46,12 @@ signal itemPressed(int vIndex) onItemPressed: { currentIndex = vIndex - _highlightRect.x = _private.items[vIndex].x + let itemAt = _repeater.itemAt(vIndex) + if (itemAt) + _highlightRect.x = itemAt.x + else { + _highlightRect.x = _rightTouchRect.x + } } onCurrentIndexChanged: itemPressed(currentIndex) @@ -60,7 +64,6 @@ readonly property var repeaterTitles: hasRightText ? titles.slice(0,titles.length - 1) : titles readonly property string rightText : titles.length ? titles[titles.length - 1] : "" readonly property int partitionWidth: _row.width / ( _private.repeaterTitles.length * 2 + 1) - property var items : [] } /*! type:int @@ -111,7 +114,6 @@ onPressed: { itemPressed(index) } - Component.onCompleted: _private.items[index] = _touchRect } } } @@ -137,7 +139,6 @@ } anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter - Component.onCompleted: _private.items[index] = _rightTouchRect } // normal text bottom highlighter @@ -148,7 +149,7 @@ height: 10 radius: 10 anchors.bottom: parent.bottom - anchors.bottomMargin: -5 + anchors.bottomMargin: -(height / 2) Behavior on x { PropertyAnimation { /*duration: 500; easing.type: Easing.OutBounce*/ } } } Index: sources/gui/qml/dialogs/AlarmListDialog.qml =================================================================== diff -u -r13d6a4fae2f910ab6e289ac9280258a94f734405 -r73d6d02c19467735e92f7c451ca5d3b47a2a90e4 --- sources/gui/qml/dialogs/AlarmListDialog.qml (.../AlarmListDialog.qml) (revision 13d6a4fae2f910ab6e289ac9280258a94f734405) +++ sources/gui/qml/dialogs/AlarmListDialog.qml (.../AlarmListDialog.qml) (revision 73d6d02c19467735e92f7c451ca5d3b47a2a90e4) @@ -147,10 +147,10 @@ lineColor : Colors.backgroundMain itemsText : vAlarmActiveList.alarmIDs itemsValue : vAlarmActiveList.alarmTexts - itemsTouchable : [ 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ] // just kept one touchable as an example + itemsTouchable : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ] itemsValueLeftMargin : 80 // if decreased maybe covered by title itemsUnitLeftMargin : 470 // if increased will be covered by chevron if touchable - onItemClicked: _root.itemClicked(vIndex) + onItemClicked : _root.itemClicked(vIndex) } } } Index: sources/gui/qml/pages/MainStack.qml =================================================================== diff -u -r3f555c49ddd2c983f469709e3c001d0e76159248 -r73d6d02c19467735e92f7c451ca5d3b47a2a90e4 --- sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 3f555c49ddd2c983f469709e3c001d0e76159248) +++ sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 73d6d02c19467735e92f7c451ca5d3b47a2a90e4) @@ -115,6 +115,11 @@ MainHome { id: _mainHome onStartTreatment : { page( _treatmentStack )} onCreateTreatment : { vPreTreatmentAdjustmentInitTreatment.doInitiate() } + onVisibleChanged: { + if (visible) { + _mainMenu.hidden = false // initially our landing screen is _initialModeScreen which should not have the Main menu. + } + } } Connections { target: vHDOperationMode @@ -165,13 +170,4 @@ // _mainHome.reasonText = vPreTreatmentAdjustmentInitTreatment.text() } } - - onVisibleChanged: { - if (visible) { - _mainMenu.hidden = true // initially our landing screen is _initialModeScreen which should not have the Main menu. - } - else { - stackView.initialItem = null - } - } } Index: sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml =================================================================== diff -u -r13d6a4fae2f910ab6e289ac9280258a94f734405 -r73d6d02c19467735e92f7c451ca5d3b47a2a90e4 --- sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml (.../PostTreatmentReview.qml) (revision 13d6a4fae2f910ab6e289ac9280258a94f734405) +++ sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml (.../PostTreatmentReview.qml) (revision 73d6d02c19467735e92f7c451ca5d3b47a2a90e4) @@ -77,10 +77,10 @@ itemsValueLeftMargin : 350 // if decreased may be covered by title itemsUnitLeftMargin : 470 // if increased will be covered by chevron if touchable itemsTouchable : [ - 0,0,0,0,1,0,0,0,0,0, - 1,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0, ] onItemClicked: _root.itemClicked(vIndex) } Index: sources/model/MAbstract.cpp =================================================================== diff -u -r97d593e2e7adb36f2f9f97f9bb9958dcef740bc1 -r73d6d02c19467735e92f7c451ca5d3b47a2a90e4 --- sources/model/MAbstract.cpp (.../MAbstract.cpp) (revision 97d593e2e7adb36f2f9f97f9bb9958dcef740bc1) +++ sources/model/MAbstract.cpp (.../MAbstract.cpp) (revision 73d6d02c19467735e92f7c451ca5d3b47a2a90e4) @@ -19,7 +19,7 @@ using namespace Model; -// #define ROUND_FLOATS +#define ROUND_FLOATS const QMap MAbstract::_typeText = MAbstract::_typeText_make(); const QMap MAbstract::_unitText = MAbstract::_unitText_make(); @@ -43,7 +43,7 @@ QVariantList mParameters = parameters(); QString mString = description(); for( const auto ¶meter : mParameters ) { - if (parameter.type() == uint(QMetaType::Float)) // Qt has a mixed definition of QVariant::Type and QMetaType seems like a not fixed issue. + if (static_cast(parameter.type()) == QMetaType::Float) // Qt has a mixed definition of QVariant::Type and QMetaType seems like a not fixed issue. #ifdef ROUND_FLOATS mString += _delimiter + QString("%1").arg(parameter.toFloat(),0,'f',_precision); #else Index: sources/model/MAbstract.h =================================================================== diff -u -r97d593e2e7adb36f2f9f97f9bb9958dcef740bc1 -r73d6d02c19467735e92f7c451ca5d3b47a2a90e4 --- sources/model/MAbstract.h (.../MAbstract.h) (revision 97d593e2e7adb36f2f9f97f9bb9958dcef740bc1) +++ sources/model/MAbstract.h (.../MAbstract.h) (revision 73d6d02c19467735e92f7c451ca5d3b47a2a90e4) @@ -57,7 +57,7 @@ private: const char _delimiter = ','; - quint8 _precision = 2; + quint8 _precision = 3; public: enum class Type_Enum { Index: sources/storage/Logger.cpp =================================================================== diff -u -r13d6a4fae2f910ab6e289ac9280258a94f734405 -r73d6d02c19467735e92f7c451ca5d3b47a2a90e4 --- sources/storage/Logger.cpp (.../Logger.cpp) (revision 13d6a4fae2f910ab6e289ac9280258a94f734405) +++ sources/storage/Logger.cpp (.../Logger.cpp) (revision 73d6d02c19467735e92f7c451ca5d3b47a2a90e4) @@ -308,6 +308,8 @@ mContent += _separator; } mContent += vContent; + // some messages like the version having the U08(uchar) parameters which converts to '\0' and causes problems in reading the log file. + mContent.replace('\0', "0"); QString logPathName = _logPathNames[vLogType]; if (logPathName.isEmpty()) Index: ui_build_history.log =================================================================== diff -u -r985d3f37af7c0fd0b37e9f06cd41090a232b47d4 -r73d6d02c19467735e92f7c451ca5d3b47a2a90e4 --- ui_build_history.log (.../ui_build_history.log) (revision 985d3f37af7c0fd0b37e9f06cd41090a232b47d4) +++ ui_build_history.log (.../ui_build_history.log) (revision 73d6d02c19467735e92f7c451ca5d3b47a2a90e4) @@ -2,8 +2,27 @@ Bamboo_Build_Date : 2021-08-03T210951.678-0700 Bug_Fixes : + - Fixed the issue in the log having null characters in the version message + - Fixing the issue with the bottom main menu not showing up after navigating back and forth from home screen. + - Removed the touchable property from the Treatment Review screen items. + +New_Features : + - + +Known_Bugs : - N/A [Initial push] +Changes : + - Adding the acknowledge directly sending to the DG device by UI. + +************************************************************************************************ + +Bamboo_Build_Number : v0.6.5-23 +Bamboo_Build_Date : 2021-08-03T210951.678-0700 + +Bug_Fixes : + - N/A [Initial push] + New_Features : - POST feature FW communication completed with two Bi-Directional new messages which allows HD Software to request anytime for the UI Software version (0x9E00, 0x9F00).