Skip to content

Commit

Permalink
Add DV19 - MtbBusNotSent.
Browse files Browse the repository at this point in the history
  • Loading branch information
horacekj committed May 25, 2024
1 parent b0b1a54 commit 68ce8d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,7 @@ QJsonObject MtbModule::dvRepr(uint8_t dvi, const std::vector<uint8_t> &data) con
case Mtb::DVCommon::MtbBusReceived:
case Mtb::DVCommon::MtbBusBadCrc:
case Mtb::DVCommon::MtbBusSent:
case Mtb::DVCommon::MtbBusNotSent:
if (data.size() == 4)
return {{Mtb::DVCommonToStr(dvi), static_cast<qint64>(pack<uint32_t>(data))}};
break;
Expand Down
2 changes: 2 additions & 0 deletions src/mtbusb/mtbusb-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ enum DVCommon { // not class-enum by design
MtbBusReceived = 16,
MtbBusBadCrc = 17,
MtbBusSent = 18,
MtbBusNotSent = 19,
};

const QMap<uint8_t, QString> dvsCommon {
Expand All @@ -112,6 +113,7 @@ const QMap<uint8_t, QString> dvsCommon {
{DVCommon::MtbBusReceived, "mtbbus_received"},
{DVCommon::MtbBusBadCrc, "mtbbus_bad_crc"},
{DVCommon::MtbBusSent, "mtbbus_sent"},
{DVCommon::MtbBusNotSent, "mtbbus_not_sent"},
};

QString DVCommonToStr(uint8_t dv); // also accepts DV dv
Expand Down

0 comments on commit 68ce8d0

Please sign in to comment.