Skip to content

Commit

Permalink
[ncp] add support for 1.3.1 in GetThreadVersion() (#1968)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunytt authored Aug 14, 2023
1 parent e15a95a commit 3ecc588
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/ncp/ncp_openthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@
namespace otbr {
namespace Ncp {

static const uint16_t kThreadVersion11 = 2; ///< Thread Version 1.1
static const uint16_t kThreadVersion12 = 3; ///< Thread Version 1.2
static const uint16_t kThreadVersion13 = 4; ///< Thread Version 1.3
static const uint16_t kThreadVersion11 = 2; ///< Thread Version 1.1
static const uint16_t kThreadVersion12 = 3; ///< Thread Version 1.2
static const uint16_t kThreadVersion13 = 4; ///< Thread Version 1.3
static const uint16_t kThreadVersion131 = 5; ///< Thread Version 1.3.1

ControllerOpenThread::ControllerOpenThread(const char *aInterfaceName,
const std::vector<const char *> &aRadioUrls,
Expand Down Expand Up @@ -384,6 +385,9 @@ const char *ControllerOpenThread::GetThreadVersion(void)
case kThreadVersion13:
version = "1.3.0";
break;
case kThreadVersion131:
version = "1.3.1";
break;
default:
otbrLogEmerg("Unexpected thread version %hu", otThreadGetVersion());
exit(-1);
Expand Down

0 comments on commit 3ecc588

Please sign in to comment.