From be326525f446ff4e7ca6c7bef5d802d7fdb5ed9b Mon Sep 17 00:00:00 2001 From: Pavel Kulik Date: Mon, 24 Jul 2023 16:56:04 -0700 Subject: [PATCH] Fix sync output configuration order --- Source/Basestations/Basestation_v3.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Source/Basestations/Basestation_v3.cpp b/Source/Basestations/Basestation_v3.cpp index 214d7e9..42903aa 100644 --- a/Source/Basestations/Basestation_v3.cpp +++ b/Source/Basestations/Basestation_v3.cpp @@ -368,15 +368,6 @@ Array Basestation_v3::getSyncFrequencies() void Basestation_v3::setSyncAsOutput(int freqIndex) { - - LOGD("Setting sync as output..."); - - errorCode = Neuropixels::switchmatrix_set(slot, Neuropixels::SM_Output_SMA, Neuropixels::SM_Input_SyncClk, true); - if (errorCode != Neuropixels::SUCCESS) - { - LOGC("Failed to set sync on SMA output on slot: ", slot); - } - errorCode = Neuropixels::setParameter(Neuropixels::NP_PARAM_SYNCMASTER, slot); if (errorCode != Neuropixels::SUCCESS) @@ -402,6 +393,14 @@ void Basestation_v3::setSyncAsOutput(int freqIndex) return; } + LOGD("Setting sync as output..."); + + errorCode = Neuropixels::switchmatrix_set(slot, Neuropixels::SM_Output_SMA, Neuropixels::SM_Input_SyncClk, true); + if (errorCode != Neuropixels::SUCCESS) + { + LOGC("Failed to set sync on SMA output on slot: ", slot); + } +