[thci] fix THCI error on Harness 1.1 (#7148)

This commit is contained in:
Simon Lin
2021-11-10 12:04:32 -08:00
committed by GitHub
parent 2fb1756d61
commit 01009a3eff
+3 -2
View File
@@ -1220,7 +1220,8 @@ class OpenThreadTHCI(object):
if self.AutoDUTEnable is False:
# set ROUTER_DOWNGRADE_THRESHOLD
self.__setRouterDowngradeThreshold(33)
elif eRoleId in (Thread_Device_Role.BR_1, Thread_Device_Role.BR_2):
elif TESTHARNESS_VERSION == TESTHARNESS_1_2 and eRoleId in (Thread_Device_Role.BR_1,
Thread_Device_Role.BR_2):
print('join as BBR')
mode = 'rdn'
if self.AutoDUTEnable is False:
@@ -1230,7 +1231,7 @@ class OpenThreadTHCI(object):
print('join as sleepy end device')
mode = '-'
self.__setPollPeriod(self.__sedPollPeriod)
elif eRoleId == Thread_Device_Role.SSED:
elif TESTHARNESS_VERSION == TESTHARNESS_1_2 and eRoleId == Thread_Device_Role.SSED:
print('join as SSED')
mode = '-'
self.setCSLperiod(self.cslPeriod)