[csl] fix TimerMicro::GetNow() call in sub_mac.cpp (#9639)

Add missing `.GetValue()` for getting values from `TimerMicro`

Add testing with OT_CSL_RECEIVER_LOCAL_TIME_SYNC enabled

Signed-off-by: Maciej Baczmanski <[email protected]>
This commit is contained in:
Maciej Baczmański
2023-11-27 18:26:31 -08:00
committed by GitHub
parent b07b176a1a
commit 90d16d95a2
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -142,6 +142,9 @@ jobs:
- name: Build
run: |
./script/test build
- name: Build with OT_CSL_RECEIVER_LOCAL_TIME_SYNC
run: |
OT_BUILDDIR="${PWD}/build_csl_receiver_local_time_sync" OT_OPTIONS="-DOT_CSL_RECEIVER_LOCAL_TIME_SYNC=ON" ./script/test build
- name: Get Thread-Wireshark
run: |
./script/test get_thread_wireshark
@@ -153,6 +156,9 @@ jobs:
do
./script/test cert_suite ./tests/scripts/thread-cert/v1_2_LowPower*.py
done
- name: Run with OT_CSL_RECEIVER_LOCAL_TIME_SYNC
run: |
OT_BUILDDIR="${PWD}/build_csl_receiver_local_time_sync" ./script/test cert_suite ./tests/scripts/thread-cert/v1_2_LowPower*.py
- name: Check Crash
if: ${{ failure() }}
run: |
+1 -1
View File
@@ -1268,7 +1268,7 @@ void SubMac::GetCslWindowEdges(uint32_t &aAhead, uint32_t &aAfter)
uint32_t curTime, elapsed, semiWindow;
#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_LOCAL_TIME_SYNC
curTime = TimerMicro::GetNow();
curTime = TimerMicro::GetNow().GetValue();
#else
curTime = static_cast<uint32_t>(otPlatRadioGetNow(&GetInstance()));
#endif