From 40bdba5f2c08614617660131771916dbcfc41020 Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Tue, 4 Feb 2025 20:45:38 +0100 Subject: [PATCH 1/8] CI: Update ipt For now we disable all the new linters which fail. BugproneLoopInitializationAssignment is already passing. --- .github/workflows/build-pr.yml | 2 +- tools/run-ipt.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 482807a1a8..3ccad5d698 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -46,7 +46,7 @@ jobs: uses: actions/checkout@v4 # no need to checkout submodules or the full history - name: Download ipt binary from server - run: curl -o ipt.exe "https://byte-physics.de/public-downloads/aistorage/transfer/ipt/0.6.0/ipt.exe" + run: curl -o ipt.exe "https://byte-physics.de/public-downloads/aistorage/transfer/ipt/0.7.11/ipt.exe" - name: IPT version run: ./ipt.exe --version - name: Format and lint code diff --git a/tools/run-ipt.sh b/tools/run-ipt.sh index 5eaf55bc64..6e74b44a29 100755 --- a/tools/run-ipt.sh +++ b/tools/run-ipt.sh @@ -27,4 +27,11 @@ echo "[lint]" > config.toml while read -r line; do echo "files = \"$line\"" >> config.toml done < <(git ls-files ':(attr:ipt)') + +echo "exclude = BugproneMissingSwitchDefaultCase" >> config.toml +echo "exclude = BugproneContradictingOverrideAndFreeFlag" >> config.toml +echo "exclude = CodeStyleDefaultPragmas" >> config.toml +echo "exclude = CodeStyleEndIfComment" >> config.toml +echo "exclude = ReadabilityMissingParenthesis" >> config.toml + (cd $top_level && $ipt --arg-file config.toml lint -i) From 1fd0d0c29ed62e82c860e37f08d68557ccea6870 Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Tue, 4 Feb 2025 20:48:32 +0100 Subject: [PATCH 2/8] treewide: Fix BugproneContradictingOverrideAndFreeFlag for linter In both cases we actually wanted to have a free wave were we don't need /O. --- Packages/MIES/MIES_Utilities_WaveHandling.ipf | 2 +- Packages/tests/UTF_DataGenerators.ipf | 2 +- tools/run-ipt.sh | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Packages/MIES/MIES_Utilities_WaveHandling.ipf b/Packages/MIES/MIES_Utilities_WaveHandling.ipf index e220801862..ac4e65423e 100644 --- a/Packages/MIES/MIES_Utilities_WaveHandling.ipf +++ b/Packages/MIES/MIES_Utilities_WaveHandling.ipf @@ -1059,7 +1059,7 @@ Function/WAVE SplitWavesToDimension(WAVE/WAVE input, [variable sdim]) if(DimSize(wv, COLS) > 1) /// @todo workaround IP issue 4979 (singleWaves is not a free wave) - SplitWave/NOTE/O/FREE/OREF=singleWaves/SDIM=(sdim) wv + SplitWave/NOTE/FREE/OREF=singleWaves/SDIM=(sdim) wv else Make/WAVE/FREE singleWaves = {wv} endif diff --git a/Packages/tests/UTF_DataGenerators.ipf b/Packages/tests/UTF_DataGenerators.ipf index 0d976fb097..16d1cf1de9 100644 --- a/Packages/tests/UTF_DataGenerators.ipf +++ b/Packages/tests/UTF_DataGenerators.ipf @@ -828,7 +828,7 @@ static Function/WAVE GetDifferentGraphs() string win, recMacro - Make/FREE/T/N=5/O wv + Make/FREE/T/N=5 wv NewDataFolder/O/S root:temp_test Make/O data diff --git a/tools/run-ipt.sh b/tools/run-ipt.sh index 6e74b44a29..be70beb564 100755 --- a/tools/run-ipt.sh +++ b/tools/run-ipt.sh @@ -29,7 +29,6 @@ while read -r line; do done < <(git ls-files ':(attr:ipt)') echo "exclude = BugproneMissingSwitchDefaultCase" >> config.toml -echo "exclude = BugproneContradictingOverrideAndFreeFlag" >> config.toml echo "exclude = CodeStyleDefaultPragmas" >> config.toml echo "exclude = CodeStyleEndIfComment" >> config.toml echo "exclude = ReadabilityMissingParenthesis" >> config.toml From c83db21d02d0f81c802f9755f91b3e5f4610af45 Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Tue, 4 Feb 2025 20:53:46 +0100 Subject: [PATCH 3/8] treewide: Fix CodeStyleDefaultPragmas for linter --- Packages/MIES/MIES_EnhancedWMRoutines.ipf | 3 ++- Packages/doc/ipf/example-stimulus-set-api.ipf | 3 +++ Packages/tests/UserAnalysisFunctions.ipf | 1 + tools/run-ipt.sh | 1 - 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Packages/MIES/MIES_EnhancedWMRoutines.ipf b/Packages/MIES/MIES_EnhancedWMRoutines.ipf index 1985d9bfdc..b93c0e2234 100644 --- a/Packages/MIES/MIES_EnhancedWMRoutines.ipf +++ b/Packages/MIES/MIES_EnhancedWMRoutines.ipf @@ -1,5 +1,6 @@ +#pragma rtFunctionErrors=1 #pragma TextEncoding="UTF-8" -#pragma rtGlobals=1 // Use modern global access method and strict wave access. +#pragma rtGlobals=3 // Use modern global access method and strict wave access. #pragma ModuleName=MIES_ENWM /// @file MIES_EnhancedWMRoutines.ipf diff --git a/Packages/doc/ipf/example-stimulus-set-api.ipf b/Packages/doc/ipf/example-stimulus-set-api.ipf index bd3c7f544a..0b84ab1177 100644 --- a/Packages/doc/ipf/example-stimulus-set-api.ipf +++ b/Packages/doc/ipf/example-stimulus-set-api.ipf @@ -1,3 +1,6 @@ +#pragma TextEncoding="UTF-8" +#pragma rtGlobals=3 +#pragma rtFunctionErrors=1 Function StimsetAPIExample() diff --git a/Packages/tests/UserAnalysisFunctions.ipf b/Packages/tests/UserAnalysisFunctions.ipf index 230d6574e1..49842e0fa7 100644 --- a/Packages/tests/UserAnalysisFunctions.ipf +++ b/Packages/tests/UserAnalysisFunctions.ipf @@ -1,3 +1,4 @@ +#pragma TextEncoding="UTF-8" #pragma rtGlobals=3 // Use modern global access method and strict wave access. #pragma rtFunctionErrors=1 #pragma version=10000 diff --git a/tools/run-ipt.sh b/tools/run-ipt.sh index be70beb564..9199141faa 100755 --- a/tools/run-ipt.sh +++ b/tools/run-ipt.sh @@ -29,7 +29,6 @@ while read -r line; do done < <(git ls-files ':(attr:ipt)') echo "exclude = BugproneMissingSwitchDefaultCase" >> config.toml -echo "exclude = CodeStyleDefaultPragmas" >> config.toml echo "exclude = CodeStyleEndIfComment" >> config.toml echo "exclude = ReadabilityMissingParenthesis" >> config.toml From deb117c5af11c76d52ff6fd148eca50207fae8f6 Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Tue, 4 Feb 2025 20:59:07 +0100 Subject: [PATCH 4/8] treewide: Fix CodeStyleEndIfComment for linter --- .../MIES_MassExperimentProcessing.ipf | 6 +- Packages/MIES/DR_MIES_TangoInteract.ipf | 2 +- Packages/MIES/MIES_AcceleratedModifyGraph.ipf | 2 +- .../MIES/MIES_AcquisitionStateHandling.ipf | 4 +- Packages/MIES/MIES_AmplifierInteraction.ipf | 6 +- Packages/MIES/MIES_AnalysisBrowser.ipf | 2 +- Packages/MIES/MIES_AnalysisBrowser_Macro.ipf | 2 +- .../MIES_AnalysisBrowser_SweepBrowser.ipf | 4 +- ...ES_AnalysisBrowser_SweepBrowser_Export.ipf | 2 +- ...lysisBrowser_SweepBrowser_Export_Macro.ipf | 2 +- .../MIES/MIES_AnalysisFunctionHelpers.ipf | 4 +- .../MIES/MIES_AnalysisFunctionManagement.ipf | 2 +- .../MIES/MIES_AnalysisFunctionPrototypes.ipf | 2 +- Packages/MIES/MIES_AnalysisFunctions.ipf | 4 +- .../MIES/MIES_AnalysisFunctions_Dashboard.ipf | 2 +- .../MIES_AnalysisFunctions_MultiPatchSeq.ipf | 2 +- ...isFunctions_MultiPatchSeq_SpikeControl.ipf | 6 +- .../MIES/MIES_AnalysisFunctions_PatchSeq.ipf | 6 +- Packages/MIES/MIES_ArtefactRemoval.ipf | 2 +- Packages/MIES/MIES_Async.ipf | 12 ++-- Packages/MIES/MIES_AsynchronousData.ipf | 2 +- Packages/MIES/MIES_Blowout.ipf | 2 +- Packages/MIES/MIES_BrowserSettingsPanel.ipf | 2 +- Packages/MIES/MIES_Browser_Plotter.ipf | 2 +- Packages/MIES/MIES_Cache.ipf | 12 ++-- Packages/MIES/MIES_CheckInstallation.ipf | 18 +++--- Packages/MIES/MIES_Configuration.ipf | 2 +- Packages/MIES/MIES_Constants.ipf | 4 +- Packages/MIES/MIES_ConversionConstants.ipf | 2 +- Packages/MIES/MIES_DAC-Hardware.ipf | 36 ++++++------ Packages/MIES/MIES_DAEphys.ipf | 16 +++--- Packages/MIES/MIES_DAEphys_GuiState.ipf | 2 +- Packages/MIES/MIES_DAEphys_Macro.ipf | 2 +- Packages/MIES/MIES_DANDI.ipf | 2 +- Packages/MIES/MIES_DataAcquisition.ipf | 2 +- Packages/MIES/MIES_DataAcquisition_Multi.ipf | 2 +- Packages/MIES/MIES_DataAcquisition_Single.ipf | 2 +- Packages/MIES/MIES_DataBrowser.ipf | 2 +- Packages/MIES/MIES_DataBrowser_Macro.ipf | 2 +- .../MIES/MIES_DataConfiguratonRecreation.ipf | 2 +- Packages/MIES/MIES_DataConfigurator.ipf | 2 +- Packages/MIES/MIES_DebugPanel.ipf | 2 +- Packages/MIES/MIES_DebugPanel_Macro.ipf | 2 +- Packages/MIES/MIES_Debugging.ipf | 6 +- Packages/MIES/MIES_Downsample.ipf | 2 +- Packages/MIES/MIES_Epochs.ipf | 2 +- .../MIES/MIES_ExperimentDocumentation.ipf | 4 +- .../MIES/MIES_ForeignFunctionInterface.ipf | 2 +- .../MIES_GlobalStringAndVariableAccess.ipf | 2 +- Packages/MIES/MIES_GuiPopupMenuExt.ipf | 2 +- Packages/MIES/MIES_GuiUtilities.ipf | 2 +- Packages/MIES/MIES_HDF5Ops.ipf | 2 +- Packages/MIES/MIES_IVSCC.ipf | 2 +- Packages/MIES/MIES_IVSCC_Macro.ipf | 2 +- Packages/MIES/MIES_IgorHooks.ipf | 6 +- Packages/MIES/MIES_Indexing.ipf | 2 +- Packages/MIES/MIES_InputDialog.ipf | 2 +- Packages/MIES/MIES_InputDialog_Macro.ipf | 2 +- Packages/MIES/MIES_JSONWaveNotes.ipf | 2 +- Packages/MIES/MIES_Labnotebook.ipf | 2 +- Packages/MIES/MIES_LogbookViewer.ipf | 2 +- Packages/MIES/MIES_Logging.ipf | 2 +- Packages/MIES/MIES_Menu.ipf | 4 +- .../MIES/MIES_MiesUtilities_Algorithm.ipf | 2 +- .../MIES/MIES_MiesUtilities_BackupWaves.ipf | 2 +- Packages/MIES/MIES_MiesUtilities_Channels.ipf | 2 +- Packages/MIES/MIES_MiesUtilities_Checks.ipf | 2 +- Packages/MIES/MIES_MiesUtilities_Config.ipf | 2 +- .../MIES/MIES_MiesUtilities_Conversion.ipf | 4 +- .../MIES_MiesUtilities_DataManagement.ipf | 2 +- Packages/MIES/MIES_MiesUtilities_Device.ipf | 2 +- Packages/MIES/MIES_MiesUtilities_GUI.ipf | 2 +- Packages/MIES/MIES_MiesUtilities_Getter.ipf | 2 +- Packages/MIES/MIES_MiesUtilities_Logbook.ipf | 4 +- Packages/MIES/MIES_MiesUtilities_Logging.ipf | 2 +- .../MIES/MIES_MiesUtilities_Recreation.ipf | 2 +- Packages/MIES/MIES_MiesUtilities_Settings.ipf | 2 +- Packages/MIES/MIES_MiesUtilities_Sweep.ipf | 2 +- Packages/MIES/MIES_MiesUtilities_System.ipf | 2 +- Packages/MIES/MIES_MiesUtilities_Uploads.ipf | 10 ++-- Packages/MIES/MIES_MiesUtilities_ZeroMQ.ipf | 2 +- .../MIES/MIES_NeuroDataWithoutBorders.ipf | 2 +- ..._OptimzedOverlapDistributedAcquisition.ipf | 2 +- Packages/MIES/MIES_Oscilloscope.ipf | 4 +- Packages/MIES/MIES_OverlaySweeps.ipf | 2 +- Packages/MIES/MIES_PackageSettings.ipf | 2 +- Packages/MIES/MIES_Pictures.ipf | 2 +- Packages/MIES/MIES_PressureControl.ipf | 2 +- Packages/MIES/MIES_ProgrammaticGUIControl.ipf | 2 +- Packages/MIES/MIES_Publish.ipf | 2 +- Packages/MIES/MIES_PulseAveraging.ipf | 56 +++++++++---------- Packages/MIES/MIES_RepeatedAcquisition.ipf | 12 ++-- Packages/MIES/MIES_SamplingInterval.ipf | 4 +- Packages/MIES/MIES_StimsetAPI.ipf | 2 +- Packages/MIES/MIES_Structures.ipf | 2 +- Packages/MIES/MIES_SweepFormula.ipf | 28 +++++----- Packages/MIES/MIES_SweepFormula_Helpers.ipf | 10 ++-- Packages/MIES/MIES_SweepFormula_PSX.ipf | 12 ++-- Packages/MIES/MIES_SweepFormula_PSX_Macro.ipf | 2 +- Packages/MIES/MIES_SweepSaving.ipf | 2 +- Packages/MIES/MIES_TangoInteract.ipf | 2 +- Packages/MIES/MIES_TestPulse.ipf | 4 +- Packages/MIES/MIES_TestPulse_Multi.ipf | 2 +- Packages/MIES/MIES_TestPulse_Single.ipf | 2 +- Packages/MIES/MIES_ThreadedFIFOHandling.ipf | 4 +- Packages/MIES/MIES_ThreadsafeDataSharing.ipf | 2 +- Packages/MIES/MIES_ThreadsafeUtilities.ipf | 2 +- Packages/MIES/MIES_TraceUserData.ipf | 2 +- Packages/MIES/MIES_Utilities_Algorithm.ipf | 2 +- Packages/MIES/MIES_Utilities_Checks.ipf | 2 +- Packages/MIES/MIES_Utilities_Conversions.ipf | 2 +- Packages/MIES/MIES_Utilities_DataFolder.ipf | 2 +- Packages/MIES/MIES_Utilities_Debugger.ipf | 2 +- Packages/MIES/MIES_Utilities_File.ipf | 8 +-- Packages/MIES/MIES_Utilities_GUI.ipf | 4 +- Packages/MIES/MIES_Utilities_Generators.ipf | 2 +- Packages/MIES/MIES_Utilities_JSON.ipf | 2 +- Packages/MIES/MIES_Utilities_List.ipf | 2 +- Packages/MIES/MIES_Utilities_Numeric.ipf | 2 +- Packages/MIES/MIES_Utilities_ProgramFlow.ipf | 4 +- Packages/MIES/MIES_Utilities_SFHCheckers.ipf | 2 +- Packages/MIES/MIES_Utilities_Strings.ipf | 2 +- Packages/MIES/MIES_Utilities_System.ipf | 4 +- Packages/MIES/MIES_Utilities_Time.ipf | 2 +- Packages/MIES/MIES_Utilities_WaveHandling.ipf | 2 +- Packages/MIES/MIES_WaveBuilder.ipf | 2 +- Packages/MIES/MIES_WaveBuilderPanel.ipf | 2 +- Packages/MIES/MIES_WaveBuilder_Macro.ipf | 2 +- Packages/MIES/MIES_WaveDataFolderGetters.ipf | 2 +- Packages/MIES_Include.ipf | 4 +- .../doc/ipf/MIES_Regenerate-Screenshots.ipf | 2 +- .../tests/Basic/UTF_AsynFrameworkTest.ipf | 4 +- .../tests/Basic/UTF_Utils_ProgramFlow.ipf | 2 +- .../tests/Basic/UTF_Utils_WaveHandling.ipf | 2 +- Packages/tests/Basic/UTF_XOPsCompilation.ipf | 2 +- Packages/tests/Basic/UTF_ZeroMQPublishing.ipf | 2 +- .../UTF_MultiPatchSeqFastRheoEstimate.ipf | 2 +- .../UTF_PatchSeqRheobase.ipf | 4 +- .../UTF_PatchSeqSquarePulse.ipf | 2 +- .../HardwareBasic/UTF_BasicHardwareTests.ipf | 4 +- .../UTF_VeryBasicHardwareTests.ipf | 12 ++-- Packages/tests/PAPlot/UTF_PA_Tests.ipf | 2 +- Packages/tests/UTF_Constants.ipf | 2 +- Packages/tests/UTF_DataGenerators.ipf | 24 ++++---- .../tests/UTF_HardwareHelperFunctions.ipf | 18 +++--- Packages/tests/UTF_HelperFunctions.ipf | 4 +- Packages/tests/UserAnalysisFunctions.ipf | 8 +-- tools/run-ipt.sh | 1 - 148 files changed, 310 insertions(+), 311 deletions(-) diff --git a/Packages/Conversion/MIES_MassExperimentProcessing.ipf b/Packages/Conversion/MIES_MassExperimentProcessing.ipf index 0f55ebe4e1..134e70f655 100644 --- a/Packages/Conversion/MIES_MassExperimentProcessing.ipf +++ b/Packages/Conversion/MIES_MassExperimentProcessing.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MEP -#endif +#endif // AUTOMATED_TESTING /// @file MIES_MassExperimentProcessing.ipf /// @brief __MEP__ Process multiple MIES pxps to convert data into NWBv2 @@ -38,7 +38,7 @@ static StrConstant OUTPUT_FOLDER = "C:tim-data:output:" static StrConstant INPUT_FOLDER = "" static StrConstant OUTPUT_FOLDER = "" -#endif +#endif // MEP_DEBUGGING Menu "Macros" "Mass convert PXPs to NWBv2", /Q, StartMultiExperimentProcess() @@ -342,4 +342,4 @@ Function TestMe() ProcessCurrentExperiment(prefs) End -#endif +#endif // MEP_DEBUGGING diff --git a/Packages/MIES/DR_MIES_TangoInteract.ipf b/Packages/MIES/DR_MIES_TangoInteract.ipf index 83befd85c2..b2a9283ba4 100644 --- a/Packages/MIES/DR_MIES_TangoInteract.ipf +++ b/Packages/MIES/DR_MIES_TangoInteract.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_DR_TI -#endif +#endif // AUTOMATED_TESTING /// @file DR_MIES_TangoInteract.ipf /// diff --git a/Packages/MIES/MIES_AcceleratedModifyGraph.ipf b/Packages/MIES/MIES_AcceleratedModifyGraph.ipf index 33e1d604ee..a60440cc8e 100644 --- a/Packages/MIES/MIES_AcceleratedModifyGraph.ipf +++ b/Packages/MIES/MIES_AcceleratedModifyGraph.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_ACC -#endif +#endif // AUTOMATED_TESTING static Constant ACC_MAX = 1024 diff --git a/Packages/MIES/MIES_AcquisitionStateHandling.ipf b/Packages/MIES/MIES_AcquisitionStateHandling.ipf index e4aa075981..27dc5b5bce 100644 --- a/Packages/MIES/MIES_AcquisitionStateHandling.ipf +++ b/Packages/MIES/MIES_AcquisitionStateHandling.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_ACQSTATE -#endif +#endif // AUTOMATED_TESTING /// @file MIES_AcquisitionStateHandling.ipf /// @brief __AS__ Acquisition state handling @@ -75,7 +75,7 @@ Function AS_HandlePossibleTransition(string device, variable newAcqState, [varia #ifdef AUTOMATED_TESTING AS_RecordStateTransition(oldAcqState, newAcqState) -#endif +#endif // AUTOMATED_TESTING if(!AS_CheckStateTransition(oldAcqState, newAcqState)) sprintf msg, "The state transition %s -> %s is not expected.", AS_StateToString(oldAcqState), AS_StateToString(newAcqState) diff --git a/Packages/MIES/MIES_AmplifierInteraction.ipf b/Packages/MIES/MIES_AmplifierInteraction.ipf index 9c5d078be5..29d731ea03 100644 --- a/Packages/MIES/MIES_AmplifierInteraction.ipf +++ b/Packages/MIES/MIES_AmplifierInteraction.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_AI -#endif +#endif // AUTOMATED_TESTING /// @file MIES_AmplifierInteraction.ipf /// @brief __AI__ Interface with the Axon/MCC amplifiers @@ -1579,7 +1579,7 @@ Function AI_QueryGainsFromMCC(string device) MCC_SetHoldingEnable(0) clampModeSwitchAllowed = 1 endif -#endif +#endif // AUTOMATED_TESTING if(clampModeSwitchAllowed) old_clampMode = clampMode @@ -1723,4 +1723,4 @@ Function [STRUCT AxonTelegraph_DataStruct tds] AI_GetTelegraphStruct(variable ax DEBUGPRINT("Unimplemented") End -#endif +#endif // AMPLIFIER_XOPS_PRESENT diff --git a/Packages/MIES/MIES_AnalysisBrowser.ipf b/Packages/MIES/MIES_AnalysisBrowser.ipf index 04eea3d4d4..f678ae1767 100644 --- a/Packages/MIES/MIES_AnalysisBrowser.ipf +++ b/Packages/MIES/MIES_AnalysisBrowser.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_AB -#endif +#endif // AUTOMATED_TESTING /// @file MIES_AnalysisBrowser.ipf /// @brief __AB__ Analysis browser diff --git a/Packages/MIES/MIES_AnalysisBrowser_Macro.ipf b/Packages/MIES/MIES_AnalysisBrowser_Macro.ipf index 5408b27bab..0f2b8de3ec 100644 --- a/Packages/MIES/MIES_AnalysisBrowser_Macro.ipf +++ b/Packages/MIES/MIES_AnalysisBrowser_Macro.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_ABMACRO -#endif +#endif // AUTOMATED_TESTING /// @file MIES_AnalysisBrowser.ipf /// @brief __ABM__ Analysis browser Macro diff --git a/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser.ipf b/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser.ipf index accbc796e1..477934c1d1 100644 --- a/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser.ipf +++ b/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_SB -#endif +#endif // AUTOMATED_TESTING /// @file MIES_AnalysisBrowser_SweepBrowser.ipf /// @brief __SB__ Visualization of sweep data in the analysis browser @@ -45,7 +45,7 @@ static Function SB_GetSweepIndexFromMap(WAVE/T sweepMap, variable sweepNo) ASSERT(V_row == -1, "Found results for multiple experiments") endif V_row = dummy -#endif +#endif // AUTOMATED_TESTING return V_row == -1 ? NaN : V_row End diff --git a/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser_Export.ipf b/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser_Export.ipf index 4bef3e37b2..f390602008 100644 --- a/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser_Export.ipf +++ b/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser_Export.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_SBE -#endif +#endif // AUTOMATED_TESTING static StrConstant SBE_EXPORT_PANEL = "ExportSettingsPanel" diff --git a/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser_Export_Macro.ipf b/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser_Export_Macro.ipf index bebd093709..c3e1950e85 100644 --- a/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser_Export_Macro.ipf +++ b/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser_Export_Macro.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_SBEM -#endif +#endif // AUTOMATED_TESTING Window ExportSettingsPanel() : Panel PauseUpdate; Silent 1 // building window... diff --git a/Packages/MIES/MIES_AnalysisFunctionHelpers.ipf b/Packages/MIES/MIES_AnalysisFunctionHelpers.ipf index 9f6ccbfb7c..1239ea21aa 100644 --- a/Packages/MIES/MIES_AnalysisFunctionHelpers.ipf +++ b/Packages/MIES/MIES_AnalysisFunctionHelpers.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_AFH -#endif +#endif // AUTOMATED_TESTING /// @file MIES_AnalysisFunctionHelpers.ipf /// @brief __AFH__ Helper functions for analysis function writers @@ -1021,7 +1021,7 @@ Function AFH_AddAnalysisParameterToParams(string ¶ms, string name, [variable if(WhichListItem(name, AFH_GetListOfAnalysisParamNames(params)) != -1) printf "Parameter \"%s\" is already present and will be overwritten!\r", name endif -#endif +#endif // !AUTOMATED_TESTING params = ReplaceStringByKey(name, params, type + "=" + value, ":", ",", 0) End diff --git a/Packages/MIES/MIES_AnalysisFunctionManagement.ipf b/Packages/MIES/MIES_AnalysisFunctionManagement.ipf index 6cf8780abe..72c8ab6ead 100644 --- a/Packages/MIES/MIES_AnalysisFunctionManagement.ipf +++ b/Packages/MIES/MIES_AnalysisFunctionManagement.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_AFM -#endif +#endif // AUTOMATED_TESTING /// @file MIES_AnalysisFunctionManagement.ipf /// @brief __AFM__ Analysis functions routines diff --git a/Packages/MIES/MIES_AnalysisFunctionPrototypes.ipf b/Packages/MIES/MIES_AnalysisFunctionPrototypes.ipf index 6fc5c1b103..1f0949414e 100644 --- a/Packages/MIES/MIES_AnalysisFunctionPrototypes.ipf +++ b/Packages/MIES/MIES_AnalysisFunctionPrototypes.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_AFP -#endif +#endif // AUTOMATED_TESTING /// @file MIES_AnalysisFunctionPrototypes.ipf /// @brief __AFP__ Analysis functions prototypes to be called during data acquisition diff --git a/Packages/MIES/MIES_AnalysisFunctions.ipf b/Packages/MIES/MIES_AnalysisFunctions.ipf index 8baf2c7f0d..422308ac77 100644 --- a/Packages/MIES/MIES_AnalysisFunctions.ipf +++ b/Packages/MIES/MIES_AnalysisFunctions.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_AF -#endif +#endif // AUTOMATED_TESTING /// @file MIES_AnalysisFunctions.ipf /// @brief __AF__ Analysis functions to be called during data acquisition @@ -1193,7 +1193,7 @@ Function ReachTargetVoltage(string device, STRUCT AnalysisFunction_V3 &s) if(WaveExists(overrideResults)) resistanceFitted[] = overrideResults[p][%Resistance] * MEGA_TO_ONE endif -#endif +#endif // AUTOMATED_TESTING for(i = 0; i < NUM_HEADSTAGES; i += 1) diff --git a/Packages/MIES/MIES_AnalysisFunctions_Dashboard.ipf b/Packages/MIES/MIES_AnalysisFunctions_Dashboard.ipf index d54a1c47ce..99e5ce05b9 100644 --- a/Packages/MIES/MIES_AnalysisFunctions_Dashboard.ipf +++ b/Packages/MIES/MIES_AnalysisFunctions_Dashboard.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_AD -#endif +#endif // AUTOMATED_TESTING /// @file MIES_AnalysisFunctions_Dashboard.ipf /// @brief __AD__ Dashboard for pass/fail style analysis functions diff --git a/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq.ipf b/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq.ipf index e439b41b97..c3f810d4d7 100644 --- a/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq.ipf +++ b/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MSQ -#endif +#endif // AUTOMATED_TESTING /// @file MIES_AnalysisFunctions_MultiPatchSeq.ipf /// @brief __MSQ__ Analysis functions for multi patch sequence diff --git a/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq_SpikeControl.ipf b/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq_SpikeControl.ipf index 457adb3cc4..9861618993 100644 --- a/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq_SpikeControl.ipf +++ b/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq_SpikeControl.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_SC -#endif +#endif // AUTOMATED_TESTING /// @file MIES_AnalysisFunctions_MultiPatchSeq_SpikeControl.ipf /// @brief __SC__ Spike Control analysis function for multi patch sequence @@ -118,7 +118,7 @@ static Function/WAVE SC_GetHeadstageQCForSetCount(string device, variable sweepN DebugPrint(msg) endfor endif -#endif +#endif // DEBUGGING_ENABLED return headstageQCTotalPerSweepCount End @@ -455,7 +455,7 @@ static Function/WAVE SC_SpikeCountsQC(string device, WAVE/T spikeNumbersLBN, var DebugPrint(RemoveEnding(str, ", \r")) endif -#endif +#endif // DEBUGGING_ENABLED Make/FREE/N=(NUM_HEADSTAGES) minimum, maximum minimum[] = WaveMin(spikeNumbers[p]) diff --git a/Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf b/Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf index b851962897..b90d427eea 100644 --- a/Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf +++ b/Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_PSQ -#endif +#endif // AUTOMATED_TESTING /// @file MIES_AnalysisFunctions_PatchSeq.ipf /// @brief __PSQ__ Analysis functions for patch sequence @@ -891,7 +891,7 @@ static Function PSQ_EvaluateBaselineProperties(string device, STRUCT AnalysisFun #ifdef AUTOMATED_TESTING repurposedTime = 0.5 -#endif +#endif // AUTOMATED_TESTING return ANALYSIS_FUNC_RET_REPURP_TIME elseif(!leakCurPassedAll) return ANALYSIS_FUNC_RET_EARLY_STOP @@ -1905,7 +1905,7 @@ static Function PSQ_CheckADSamplingFrequencyAndStoreInLabnotebook(string device, #else // dimension delta [ms] actual = 1.0 / (s.sampleIntervalAD * MILLI_TO_ONE) -#endif +#endif // EVIL_KITTEN_EATING_MODE // samplingFrequency [kHz] expected = samplingFrequency * KILO_TO_ONE diff --git a/Packages/MIES/MIES_ArtefactRemoval.ipf b/Packages/MIES/MIES_ArtefactRemoval.ipf index 674b893d91..740b685a17 100644 --- a/Packages/MIES/MIES_ArtefactRemoval.ipf +++ b/Packages/MIES/MIES_ArtefactRemoval.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_AR -#endif +#endif // AUTOMATED_TESTING /// @file MIES_ArtefactRemoval.ipf /// @brief __AR__ Functions related to artefact removal diff --git a/Packages/MIES/MIES_Async.ipf b/Packages/MIES/MIES_Async.ipf index 424655b9a3..b329b02cd5 100644 --- a/Packages/MIES/MIES_Async.ipf +++ b/Packages/MIES/MIES_Async.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_ASYNC -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Async.ipf /// @brief __ASYNC__ This file holds the asynchronous execution framework @@ -70,7 +70,7 @@ Function ASYNC_Start(variable numThreads, [variable disableTask]) for(i = 0; i < numThreads; i += 1) ThreadStart tgID, i, ASYNC_Thread() endfor -#endif +#endif // !THREADING_DISABLED return 1 End @@ -190,7 +190,7 @@ Function ASYNC_ThreadReadOut() endif #else DFREF dfr = ThreadGroupGetDFR(tgID, 0) -#endif +#endif // THREADING_DISABLED if(!DataFolderExistsDFR(dfr)) @@ -480,7 +480,7 @@ Function ASYNC_Stop([variable timeout, variable fromAssert]) break endif while(waitResult != 0) -#endif +#endif // THREADING_DISABLED NVAR noTask = $GetTaskDisableStatus() if(!noTask) @@ -636,7 +636,7 @@ Function ASYNC_Execute(DFREF dfr) SetNumberInWaveNote(serialExecutionBuffer, NOTE_INDEX, ++index) #else TS_ThreadGroupPutDFR(tgID, dfr) -#endif +#endif // THREADING_DISABLED End @@ -665,7 +665,7 @@ static Function ASYNC_IsASYNCRunning() #else AssertOnAndClearRTError() waitResult = ThreadGroupWait(tgID, 0); err = GetRTError(1) -#endif +#endif // THREADING_DISABLED return err == 0 && waitResult != 0 End diff --git a/Packages/MIES/MIES_AsynchronousData.ipf b/Packages/MIES/MIES_AsynchronousData.ipf index 6b7428560d..dee8f842f8 100644 --- a/Packages/MIES/MIES_AsynchronousData.ipf +++ b/Packages/MIES/MIES_AsynchronousData.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_ASD -#endif +#endif // AUTOMATED_TESTING /// @file MIES_AsynchronousData.ipf /// @brief __ASD__ Support functions for the asynchronous channels diff --git a/Packages/MIES/MIES_Blowout.ipf b/Packages/MIES/MIES_Blowout.ipf index 8c502d21c1..85ae90ea33 100644 --- a/Packages/MIES/MIES_Blowout.ipf +++ b/Packages/MIES/MIES_Blowout.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_BWO -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Blowout.ipf /// @brief __BWO__ Automates amplifier configuration and acquisition of the sweep used to measure drift in the zero calibration of the amplifer. diff --git a/Packages/MIES/MIES_BrowserSettingsPanel.ipf b/Packages/MIES/MIES_BrowserSettingsPanel.ipf index 12c9b1c2d0..e97e426183 100644 --- a/Packages/MIES/MIES_BrowserSettingsPanel.ipf +++ b/Packages/MIES/MIES_BrowserSettingsPanel.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_BSP -#endif +#endif // AUTOMATED_TESTING /// @file MIES_BrowserSettingsPanel.ipf /// @brief __BSP__ Panel for __DB__ and __AB__ (SweepBrowser) that combines different settings in a tabcontrol. diff --git a/Packages/MIES/MIES_Browser_Plotter.ipf b/Packages/MIES/MIES_Browser_Plotter.ipf index e7fd2210b0..7552c8de75 100644 --- a/Packages/MIES/MIES_Browser_Plotter.ipf +++ b/Packages/MIES/MIES_Browser_Plotter.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_BROWSER_PLOTTER -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Browser_Plotter.ipf /// @brief Functions for plotting DataBrowser/Sweepbrowser Graphs diff --git a/Packages/MIES/MIES_Cache.ipf b/Packages/MIES/MIES_Cache.ipf index a8b72d5295..065825f6e1 100644 --- a/Packages/MIES/MIES_Cache.ipf +++ b/Packages/MIES/MIES_Cache.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_CA -#endif +#endif // AUTOMATED_TESTING // #define CACHE_DEBUGGING @@ -533,7 +533,7 @@ threadsafe Function CA_StoreEntryIntoCache(string key, WAVE val, [variable optio #ifdef WAVECACHE_DISABLED return NaN -#endif +#endif // WAVECACHE_DISABLED if(ParamIsDefault(options)) storeDuplicate = 1 @@ -608,7 +608,7 @@ threadsafe Function/WAVE CA_TryFetchingEntryFromCache(string key, [variable opti #ifdef WAVECACHE_DISABLED return $"" -#endif +#endif // WAVECACHE_DISABLED if(ParamIsDefault(options)) returnDuplicate = 1 @@ -623,7 +623,7 @@ threadsafe Function/WAVE CA_TryFetchingEntryFromCache(string key, [variable opti if(!IsFinite(index)) #ifdef CACHE_DEBUGGING DEBUGPRINT_TS("Could not find a cache entry for key=", str = key) -#endif +#endif // CACHE_DEBUGGING return $"" endif @@ -635,7 +635,7 @@ threadsafe Function/WAVE CA_TryFetchingEntryFromCache(string key, [variable opti if(!WaveExists(cache)) #ifdef CACHE_DEBUGGING DEBUGPRINT_TS("Could not find a valid wave for key=", str = key) -#endif +#endif // CACHE_DEBUGGING // invalidate cache entry due to non existent wave, // this can happen for unpacked experiments which don't store free waves keys[index] = "" @@ -647,7 +647,7 @@ threadsafe Function/WAVE CA_TryFetchingEntryFromCache(string key, [variable opti #ifdef CACHE_DEBUGGING DEBUGPRINT_TS("Found cache entry for key=", str = key) -#endif +#endif // CACHE_DEBUGGING if(returnDuplicate) if(IsWaveRefWave(cache)) diff --git a/Packages/MIES/MIES_CheckInstallation.ipf b/Packages/MIES/MIES_CheckInstallation.ipf index 049416cedd..935fab0f12 100644 --- a/Packages/MIES/MIES_CheckInstallation.ipf +++ b/Packages/MIES/MIES_CheckInstallation.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_CHI -#endif +#endif // AUTOMATED_TESTING /// @file MIES_CheckInstallation.ipf /// @@ -198,7 +198,7 @@ Function CHI_CheckInstallation() printf "Yes\r" #else printf "No\r" -#endif +#endif // DEBUGGING_ENABLED printf "EVIL_KITTEN_EATING_MODE: " #ifdef EVIL_KITTEN_EATING_MODE @@ -206,14 +206,14 @@ Function CHI_CheckInstallation() printf "Yes (Very Bad)\r" #else printf "No\r" -#endif +#endif // EVIL_KITTEN_EATING_MODE printf "BACKGROUND_TASK_DEBUGGING: " #ifdef BACKGROUND_TASK_DEBUGGING printf "Yes\r" #else printf "No\r" -#endif +#endif // BACKGROUND_TASK_DEBUGGING printf "THREADING_DISABLED: " #ifdef THREADING_DISABLED @@ -221,7 +221,7 @@ Function CHI_CheckInstallation() printf "Yes (Very Bad)\r" #else printf "No\r" -#endif +#endif // THREADING_DISABLED printf "\rChecking base installation:\r" @@ -239,7 +239,7 @@ Function CHI_CheckInstallation() CHI_CheckXOP(listOfXOPs, "itcxop2-64.xop", "ITC XOP", state) CHI_CheckXOP(listOfXOPs, "AxonTelegraph64.xop", "Axon Telegraph XOP", state) CHI_CheckXOP(listOfXOPs, "MultiClamp700xCommander64.xop", "Multi Clamp Commander XOP", state) -#endif +#endif // WINDOWS // one operation/function of each non-hardware XOP needs to be called in CheckCompilation_IGNORE() CHI_CheckXOP(listOfXOPs, "JSON-64.xop", "JSON XOP", state) @@ -249,12 +249,12 @@ Function CHI_CheckInstallation() #ifdef WINDOWS CHI_CheckXOP(listOfXOPs, "MiesUtils-64.xop", "MiesUtils XOP", state) CHI_CheckXOP(listOfXOPs, "mies-nwb2-compound-XOP-64.xop", "NWBv2 compound XOP", state) -#endif +#endif // WINDOWS CHI_CheckJSONXOPVersion(state) #ifdef WINDOWS CHI_CheckITCXOPVersion(state) -#endif +#endif // WINDOWS CHI_CheckTUFXOPVersion(state) printf "Results: %d checks, %d number of errors\r", state.numTries, state.numErrors @@ -267,7 +267,7 @@ Function CHI_CheckInstallation() CHI_CheckXOP(listOfXOPs, "NIDAQmx64.xop", "NI-DAQ MX XOP", stateExtended, expectedHash = CHI_NIDAQ_XOP_64_HASH) printf "Results: %d checks, %d number of errors\r", stateExtended.numTries, stateExtended.numErrors -#endif +#endif // WINDOWS ControlWindowToFront() return state.numErrors diff --git a/Packages/MIES/MIES_Configuration.ipf b/Packages/MIES/MIES_Configuration.ipf index 20c96117e6..38a3bd8e85 100644 --- a/Packages/MIES/MIES_Configuration.ipf +++ b/Packages/MIES/MIES_Configuration.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_CONF -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Configuration.ipf /// diff --git a/Packages/MIES/MIES_Constants.ipf b/Packages/MIES/MIES_Constants.ipf index a3c0492f14..3e58be12ef 100644 --- a/Packages/MIES/MIES_Constants.ipf +++ b/Packages/MIES/MIES_Constants.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_CONST -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Constants.ipf /// @brief Global constants @@ -812,7 +812,7 @@ Constant HARDWARE_MAX_DEVICES = 10 Constant HARDWARE_NI_DAC_MIN_SAMPINT = 0.2 #else Constant HARDWARE_NI_DAC_MIN_SAMPINT = 0.002 ///< NI 6343 and other devices, so it is 4E-3 ms for 2 channels, 6E-3 ms for 3 a.s.o. -#endif +#endif // EVIL_KITTEN_EATING_MODE Constant HARDWARE_ITC_MIN_SAMPINT = 0.005 ///< ITC DACs Constant HARDWARE_NI_6001_MIN_SAMPINT = 0.2 ///< NI 6001 USB Constant HARDWARE_SU_MIN_SAMPINT_DAC = 0.1 /// Sutter output -> 10 kHz diff --git a/Packages/MIES/MIES_ConversionConstants.ipf b/Packages/MIES/MIES_ConversionConstants.ipf index 5655954248..b8f15ec667 100644 --- a/Packages/MIES/MIES_ConversionConstants.ipf +++ b/Packages/MIES/MIES_ConversionConstants.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_CONV -#endif +#endif // AUTOMATED_TESTING /// @name Conversion constants for decimal multiples /// diff --git a/Packages/MIES/MIES_DAC-Hardware.ipf b/Packages/MIES/MIES_DAC-Hardware.ipf index a8b0e87408..468addf672 100644 --- a/Packages/MIES/MIES_DAC-Hardware.ipf +++ b/Packages/MIES/MIES_DAC-Hardware.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_HW -#endif +#endif // AUTOMATED_TESTING /// @file MIES_DAC-Hardware.ipf /// @brief __HW__ Low level hardware configuration and querying functions @@ -480,7 +480,7 @@ Function/WAVE HW_GetDeviceInfoUnregistered(variable hardwareType, string device, #ifdef EVIL_KITTEN_EATING_MODE return $"" -#endif +#endif // EVIL_KITTEN_EATING_MODE switch(hardwareType) case HARDWARE_ITC_DAC: @@ -529,19 +529,19 @@ Function HW_WriteDeviceInfo(variable hardwareType, string device, WAVE deviceInf if(hardwareType == HARDWARE_ITC_DAC) return NaN endif -#endif +#endif // !ITC_XOP_PRESENT #ifndef NIDAQMX_XOP_PRESENT if(hardwareType == HARDWARE_NI_DAC) return NaN endif -#endif +#endif // !NIDAQMX_XOP_PRESENT #ifndef SUTTER_XOP_PRESENT if(hardwareType == HARDWARE_SUTTER_DAC) return NaN endif -#endif +#endif // !SUTTER_XOP_PRESENT deviceID = ROVar(GetDAQDeviceID(device)) @@ -662,7 +662,7 @@ static Function HW_IsValidHardwareType(variable hardwareType) return hardwareType == HARDWARE_NI_DAC || hardwareType == HARDWARE_ITC_DAC || hardwareType == HARDWARE_SUTTER_DAC #else return 1 -#endif +#endif // !EVIL_KITTEN_EATING_MODE End /// @brief Check if the given device ID is valid @@ -674,7 +674,7 @@ static Function HW_IsValidDeviceID(variable deviceID) return deviceID >= 0 && deviceID < HARDWARE_MAX_DEVICES #else return 1 -#endif +#endif // !EVIL_KITTEN_EATING_MODE End /// @brief Register an opened device in our device map @@ -955,7 +955,7 @@ Function/S HW_ITC_ListDevices() #elif defined(TESTS_WITH_ITC1600_HARDWARE) return HW_ITC_BuildDeviceString("ITC1600", "0") #endif -#endif +#endif // !EVIL_KITTEN_EATING_MODE numTypes = ItemsInList(DEVICE_TYPES_ITC) numberPerType = ItemsInList(DEVICE_NUMBERS) @@ -971,7 +971,7 @@ Function/S HW_ITC_ListDevices() device = HW_ITC_BuildDeviceString(type, "0") list = AddListItem(device, list, ";", Inf) continue -#endif +#endif // EVIL_KITTEN_EATING_MODE tries = 0 do @@ -1069,7 +1069,7 @@ threadsafe Function HW_ITC_HandleReturnValues(variable flags, variable ITCError, #else ClearRTError() return 0 -#endif +#endif // !EVIL_KITTEN_EATING_MODE End /// @brief Return the error message for the given ITC XOP2 error code @@ -1184,7 +1184,7 @@ Function HW_ITC_OpenDevice(variable deviceType, variable deviceNumber, [variable endif endif endfor -#endif +#endif // AUTOMATED_TESTING do ITCOpenDevice2/DTN=(deviceType)/Z=1 deviceNumber @@ -1223,7 +1223,7 @@ Function HW_ITC_CloseDevice(variable deviceID, [variable flags]) #ifdef AUTOMATED_TESTING return NaN -#endif +#endif // AUTOMATED_TESTING if(HW_ITC_SelectDevice(deviceID, flags = HARDWARE_PREVENT_ERROR_MESSAGE)) do @@ -1989,7 +1989,7 @@ Function HW_ITC_SetLoggingTemplate(string template, [variable flags]) DEBUGPRINT("Unimplemented") End -#endif +#endif // ITC_XOP_PRESENT Function/WAVE HW_WAVE_GETTER_PROTOTYPE(string str) @@ -2339,7 +2339,7 @@ Function HW_NI_PrepareAcq(variable deviceID, variable mode, [WAVE/Z data, FUNCRE DAQmx_WaveFormGen/DEV=realDeviceOrPressure/STRT=1 wavegenStr; AbortOnRTE #else DAQmx_WaveFormGen/DEV=realDeviceOrPressure/STRT=1/CLK={clkStr, 0} wavegenStr; AbortOnRTE -#endif +#endif // EVIL_KITTEN_EATING_MODE NVAR taskIDDAC = $GetNI_DACTaskID(device) taskIDDAC = 1 @@ -2698,7 +2698,7 @@ Function/S HW_NI_ListDevices([variable flags]) #elif defined(TESTS_WITH_SUTTER_HARDWARE) return "" #endif -#endif +#endif // !EVIL_KITTEN_EATING_MODE return fDAQmx_DeviceNames() End @@ -3155,7 +3155,7 @@ Function/S HW_SU_ListDevices([variable flags]) #elif defined(TESTS_WITH_NI_HARDWARE) return "" #endif -#endif +#endif // !EVIL_KITTEN_EATING_MODE WAVE/T deviceInfo = GetSUDeviceInfo() @@ -3216,8 +3216,8 @@ Function HW_SU_GetDeviceInfo(WAVE/T deviceInfo) #ifdef AUTOMATED_TESTING #ifndef TESTS_WITH_SUTTER_HARDWARE return NaN -#endif -#endif +#endif // !TESTS_WITH_SUTTER_HARDWARE +#endif // AUTOMATED_TESTING if(!IsEmpty(deviceInfo[%NUMBEROFDACS])) return NaN diff --git a/Packages/MIES/MIES_DAEphys.ipf b/Packages/MIES/MIES_DAEphys.ipf index eae12fc154..d0fdc88e86 100644 --- a/Packages/MIES/MIES_DAEphys.ipf +++ b/Packages/MIES/MIES_DAEphys.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_DAP -#endif +#endif // AUTOMATED_TESTING /// @file MIES_DAEphys.ipf /// @brief __DAP__ Main data acquisition panel routines @@ -86,7 +86,7 @@ Function/S DAP_GetNIDeviceList() endif endif endfor -#endif +#endif // EVIL_KITTEN_EATING_MODE endfor if(!IsEmpty(devList)) @@ -2075,7 +2075,7 @@ Function DAP_CheckSettings(string device, variable mode) ControlWindowToFront() return 1 endif -#endif +#endif // !EVIL_KITTEN_EATING_MODE if(!HasPanelLatestVersion(device, DA_EPHYS_PANEL_VERSION)) printf "(%s) The DA_Ephys panel is too old to be usable. Please close it and open a new one.\r", device ControlWindowToFront() @@ -2482,7 +2482,7 @@ static Function DAP_CheckPressureSettings(string device) endif endif endif -#endif // EVIL_KITTEN_EATING_MODE +#endif // !EVIL_KITTEN_EATING_MODE return 0 End @@ -2693,7 +2693,7 @@ static Function DAP_CheckHeadStage(string device, variable headStage, variable m ControlWindowToFront() return 1 endif -#endif +#endif // !EVIL_KITTEN_EATING_MODE #ifndef EVIL_KITTEN_EATING_MODE if(GetHardwareType(device) == HARDWARE_NI_DAC) @@ -2705,7 +2705,7 @@ static Function DAP_CheckHeadStage(string device, variable headStage, variable m return 1 endif endif -#endif +#endif // !EVIL_KITTEN_EATING_MODE return 0 End @@ -4375,7 +4375,7 @@ Function DAP_LockDevice(string win) print "EVIL_KITTEN_EATING_MODE is ON: Forcing deviceID to zero" ControlWindowToFront() deviceID = 0 -#endif +#endif // !EVIL_KITTEN_EATING_MODE endif DisableControls(win, "button_SettingsPlus_LockDevice;popup_MoreSettings_Devices;button_hardware_rescan") @@ -4466,7 +4466,7 @@ static Function DAP_AdaptPanelForDeviceSpecifics(string device, [variable forceE forceEnable = 1 #else forceEnable = 0 -#endif +#endif // EVIL_KITTEN_EATING_MODE else forceEnable = !!forceEnable endif diff --git a/Packages/MIES/MIES_DAEphys_GuiState.ipf b/Packages/MIES/MIES_DAEphys_GuiState.ipf index 140fefcbad..fe98753704 100644 --- a/Packages/MIES/MIES_DAEphys_GuiState.ipf +++ b/Packages/MIES/MIES_DAEphys_GuiState.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_DAG -#endif +#endif // AUTOMATED_TESTING /// @file MIES_DAEphys_GuiState.ipf /// @brief __DAG__ Routines dealing with the DA_Ephys GUI state waves diff --git a/Packages/MIES/MIES_DAEphys_Macro.ipf b/Packages/MIES/MIES_DAEphys_Macro.ipf index 2bfa9dc6a5..b0a88ac93e 100644 --- a/Packages/MIES/MIES_DAEphys_Macro.ipf +++ b/Packages/MIES/MIES_DAEphys_Macro.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_DAPM -#endif +#endif // AUTOMATED_TESTING /// @file MIES_DAEphys_Macro.ipf /// @brief __DA__ DA_Ephys panel macro diff --git a/Packages/MIES/MIES_DANDI.ipf b/Packages/MIES/MIES_DANDI.ipf index 2388749016..cd38a4d340 100644 --- a/Packages/MIES/MIES_DANDI.ipf +++ b/Packages/MIES/MIES_DANDI.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_DANDI -#endif +#endif // AUTOMATED_TESTING static Function/S DND_GetDestinationIgorPath() diff --git a/Packages/MIES/MIES_DataAcquisition.ipf b/Packages/MIES/MIES_DataAcquisition.ipf index 9f8f262cc7..97cb110c20 100644 --- a/Packages/MIES/MIES_DataAcquisition.ipf +++ b/Packages/MIES/MIES_DataAcquisition.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_DAQ -#endif +#endif // AUTOMATED_TESTING /// @file MIES_DataAcquisition.ipf /// @brief __DQ__ Routines for Data acquisition diff --git a/Packages/MIES/MIES_DataAcquisition_Multi.ipf b/Packages/MIES/MIES_DataAcquisition_Multi.ipf index 2ef248aa79..fab2fbe0c1 100644 --- a/Packages/MIES/MIES_DataAcquisition_Multi.ipf +++ b/Packages/MIES/MIES_DataAcquisition_Multi.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_DAQ_MD -#endif +#endif // AUTOMATED_TESTING /// @file MIES_DataAcquisition_Multi.ipf /// @brief __DQM__ Routines for Multi Device Data acquisition diff --git a/Packages/MIES/MIES_DataAcquisition_Single.ipf b/Packages/MIES/MIES_DataAcquisition_Single.ipf index adbfaccc20..c6c11faada 100644 --- a/Packages/MIES/MIES_DataAcquisition_Single.ipf +++ b/Packages/MIES/MIES_DataAcquisition_Single.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_DAQ_SD -#endif +#endif // AUTOMATED_TESTING /// @file MIES_DataAcquisition_Single.ipf /// @brief __DQS__ Routines for Single Device Data acquisition diff --git a/Packages/MIES/MIES_DataBrowser.ipf b/Packages/MIES/MIES_DataBrowser.ipf index 235a18f821..e01f534b6c 100644 --- a/Packages/MIES/MIES_DataBrowser.ipf +++ b/Packages/MIES/MIES_DataBrowser.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_DB -#endif +#endif // AUTOMATED_TESTING /// @file MIES_DataBrowser.ipf /// @brief __DB__ Panel for browsing acquired data during acquisition diff --git a/Packages/MIES/MIES_DataBrowser_Macro.ipf b/Packages/MIES/MIES_DataBrowser_Macro.ipf index 35c30f2979..1ffa8336b2 100644 --- a/Packages/MIES/MIES_DataBrowser_Macro.ipf +++ b/Packages/MIES/MIES_DataBrowser_Macro.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_DBM -#endif +#endif // AUTOMATED_TESTING /// @file MIES_DataBrowser_Macro.ipf /// @brief __DBM__ Macro for DataBrowser diff --git a/Packages/MIES/MIES_DataConfiguratonRecreation.ipf b/Packages/MIES/MIES_DataConfiguratonRecreation.ipf index b646d0384c..f4abb7f8c5 100644 --- a/Packages/MIES/MIES_DataConfiguratonRecreation.ipf +++ b/Packages/MIES/MIES_DataConfiguratonRecreation.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_DCR -#endif +#endif // AUTOMATED_TESTING /// @file MIES_DataConfiguratonRecreation.ipf /// @brief __DCR__ Functions for recreating the DataConfigurationResult structure from the labnotebook diff --git a/Packages/MIES/MIES_DataConfigurator.ipf b/Packages/MIES/MIES_DataConfigurator.ipf index 7fad0d4975..8b68396f58 100644 --- a/Packages/MIES/MIES_DataConfigurator.ipf +++ b/Packages/MIES/MIES_DataConfigurator.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_DC -#endif +#endif // AUTOMATED_TESTING /// @file MIES_DataConfigurator.ipf /// @brief __DC__ Handle preparations before data acquisition or diff --git a/Packages/MIES/MIES_DebugPanel.ipf b/Packages/MIES/MIES_DebugPanel.ipf index 0e58c19c09..3ecf258f2f 100644 --- a/Packages/MIES/MIES_DebugPanel.ipf +++ b/Packages/MIES/MIES_DebugPanel.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_DP -#endif +#endif // AUTOMATED_TESTING /// @file MIES_DebugPanel.ipf /// diff --git a/Packages/MIES/MIES_DebugPanel_Macro.ipf b/Packages/MIES/MIES_DebugPanel_Macro.ipf index fb3abc6bcb..a6d0ae49bf 100644 --- a/Packages/MIES/MIES_DebugPanel_Macro.ipf +++ b/Packages/MIES/MIES_DebugPanel_Macro.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_DPM -#endif +#endif // AUTOMATED_TESTING Window DebugPanel() : Panel PauseUpdate; Silent 1 // building window... diff --git a/Packages/MIES/MIES_Debugging.ipf b/Packages/MIES/MIES_Debugging.ipf index f07c74ba42..109ea8b776 100644 --- a/Packages/MIES/MIES_Debugging.ipf +++ b/Packages/MIES/MIES_Debugging.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_DEBUG -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Debugging.ipf /// @@ -562,7 +562,7 @@ Function BUG(string msg, [WAVE/T keys, WAVE/T values]) bugCount += 1 print "BUG: Should never be called during automated testing." -#endif +#endif // AUTOMATED_TESTING End /// @brief Threadsafe variant of BUG() @@ -585,7 +585,7 @@ threadsafe Function BUG_TS(string msg, [WAVE/T keys, WAVE/T values]) TUFXOP_ReleaseLock/N=(TSDS_BUGCOUNT) print "BUG_TS: Should never be called during automated testing." -#endif +#endif // AUTOMATED_TESTING End /// @brief Debug helper which creates a textwave which will hold diff --git a/Packages/MIES/MIES_Downsample.ipf b/Packages/MIES/MIES_Downsample.ipf index 4d13703cce..3dbb212bb2 100644 --- a/Packages/MIES/MIES_Downsample.ipf +++ b/Packages/MIES/MIES_Downsample.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_DOWN -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Downsample.ipf /// @brief Panel for downsampling acquired data diff --git a/Packages/MIES/MIES_Epochs.ipf b/Packages/MIES/MIES_Epochs.ipf index 72c87ed1e8..288dfaf845 100644 --- a/Packages/MIES/MIES_Epochs.ipf +++ b/Packages/MIES/MIES_Epochs.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_EP -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Epochs.ipf /// @brief __EP__ Handle code relating to epoch information diff --git a/Packages/MIES/MIES_ExperimentDocumentation.ipf b/Packages/MIES/MIES_ExperimentDocumentation.ipf index daced497b6..3d16b6690d 100644 --- a/Packages/MIES/MIES_ExperimentDocumentation.ipf +++ b/Packages/MIES/MIES_ExperimentDocumentation.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_ED -#endif +#endif // AUTOMATED_TESTING /// @file MIES_ExperimentDocumentation.ipf /// @brief __ED__ Writing numerical/textual information to the labnotebook @@ -776,7 +776,7 @@ static Function ED_createAsyncWaveNoteTags(string device, variable sweepCount) print time() + " !!!!!!!!!!!!! " + title + " has exceeded max/min settings" + " !!!!!!!!!!!!!" ControlWindowToFront() beep -#endif // AUTOMATED_TESTING +#endif // !AUTOMATED_TESTING redoLastSweep = 1 endif diff --git a/Packages/MIES/MIES_ForeignFunctionInterface.ipf b/Packages/MIES/MIES_ForeignFunctionInterface.ipf index fb2974e277..f5feeb5312 100644 --- a/Packages/MIES/MIES_ForeignFunctionInterface.ipf +++ b/Packages/MIES/MIES_ForeignFunctionInterface.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_FFI -#endif +#endif // AUTOMATED_TESTING /// @file MIES_ForeignFunctionInterface.ipf /// @brief __FFI__ ACQ4/ZeroMQ accessible functions diff --git a/Packages/MIES/MIES_GlobalStringAndVariableAccess.ipf b/Packages/MIES/MIES_GlobalStringAndVariableAccess.ipf index 3a07496fff..6eed085137 100644 --- a/Packages/MIES/MIES_GlobalStringAndVariableAccess.ipf +++ b/Packages/MIES/MIES_GlobalStringAndVariableAccess.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_GLOBALS -#endif +#endif // AUTOMATED_TESTING /// @file MIES_GlobalStringAndVariableAccess.ipf /// diff --git a/Packages/MIES/MIES_GuiPopupMenuExt.ipf b/Packages/MIES/MIES_GuiPopupMenuExt.ipf index 061626fac7..0ab013f85c 100644 --- a/Packages/MIES/MIES_GuiPopupMenuExt.ipf +++ b/Packages/MIES/MIES_GuiPopupMenuExt.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_GUIPOPUPEXT -#endif +#endif // AUTOMATED_TESTING /// @file MIES_GuiPopupMenuExt.ipf /// @brief Helper functions related to GUI controls diff --git a/Packages/MIES/MIES_GuiUtilities.ipf b/Packages/MIES/MIES_GuiUtilities.ipf index d1c3f0556a..33c3700da7 100644 --- a/Packages/MIES/MIES_GuiUtilities.ipf +++ b/Packages/MIES/MIES_GuiUtilities.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_GUI -#endif +#endif // AUTOMATED_TESTING /// @file MIES_GuiUtilities.ipf /// @brief Helper functions related to GUI controls diff --git a/Packages/MIES/MIES_HDF5Ops.ipf b/Packages/MIES/MIES_HDF5Ops.ipf index 4c45b668a4..5482b616fc 100644 --- a/Packages/MIES/MIES_HDF5Ops.ipf +++ b/Packages/MIES/MIES_HDF5Ops.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_HD -#endif +#endif // AUTOMATED_TESTING /// @file MIES_HDF5Ops.ipf /// diff --git a/Packages/MIES/MIES_IVSCC.ipf b/Packages/MIES/MIES_IVSCC.ipf index b46b4f7121..407d0bea62 100644 --- a/Packages/MIES/MIES_IVSCC.ipf +++ b/Packages/MIES/MIES_IVSCC.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_IVSCC -#endif +#endif // AUTOMATED_TESTING /// @file MIES_IVSCC.ipf /// @brief __IVS__ Routines for IVSCC/PatchSeq automation diff --git a/Packages/MIES/MIES_IVSCC_Macro.ipf b/Packages/MIES/MIES_IVSCC_Macro.ipf index 9c1e3186fb..c6873e460c 100644 --- a/Packages/MIES/MIES_IVSCC_Macro.ipf +++ b/Packages/MIES/MIES_IVSCC_Macro.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_IVSCCM -#endif +#endif // AUTOMATED_TESTING Window IVSCCControlPanel() : Panel PauseUpdate; Silent 1 // building window... diff --git a/Packages/MIES/MIES_IgorHooks.ipf b/Packages/MIES/MIES_IgorHooks.ipf index d6f208bc75..e14213621d 100644 --- a/Packages/MIES/MIES_IgorHooks.ipf +++ b/Packages/MIES/MIES_IgorHooks.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_IH -#endif +#endif // AUTOMATED_TESTING /// @file MIES_IgorHooks.ipf /// @brief __IH__ Various hooks which influence the behaviour at certain global events @@ -176,7 +176,7 @@ static Function IH_Cleanup() #ifdef AUTOMATED_TESTING HW_ITC_CloseAllDevices() -#endif +#endif // AUTOMATED_TESTING ResetDebuggerState(debuggerState) @@ -342,7 +342,7 @@ static Function AfterCompiledHook() endif End -#endif +#endif // MIES_PXP_NWB_CONVERSION_SKIP_SAVING Function IH_ResetScaling(STRUCT WMWinHookStruct &s) diff --git a/Packages/MIES/MIES_Indexing.ipf b/Packages/MIES/MIES_Indexing.ipf index 4dcbbfb56f..43446d2da8 100644 --- a/Packages/MIES/MIES_Indexing.ipf +++ b/Packages/MIES/MIES_Indexing.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_IDX -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Indexing.ipf /// @brief __IDX__ Indexing related functionality diff --git a/Packages/MIES/MIES_InputDialog.ipf b/Packages/MIES/MIES_InputDialog.ipf index 0a01ae35f3..b2f6bd6f04 100644 --- a/Packages/MIES/MIES_InputDialog.ipf +++ b/Packages/MIES/MIES_InputDialog.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_ID -#endif +#endif // AUTOMATED_TESTING /// @file MIES_InputDialog.ipf /// @brief __ID__ Input dialog handling for numeric entries diff --git a/Packages/MIES/MIES_InputDialog_Macro.ipf b/Packages/MIES/MIES_InputDialog_Macro.ipf index 19abc72968..34539b48e6 100644 --- a/Packages/MIES/MIES_InputDialog_Macro.ipf +++ b/Packages/MIES/MIES_InputDialog_Macro.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_IDM -#endif +#endif // AUTOMATED_TESTING Window IDM_Headstage_Panel() : Panel PauseUpdate; Silent 1 // building window... diff --git a/Packages/MIES/MIES_JSONWaveNotes.ipf b/Packages/MIES/MIES_JSONWaveNotes.ipf index d07adaf021..0094a56baa 100644 --- a/Packages/MIES/MIES_JSONWaveNotes.ipf +++ b/Packages/MIES/MIES_JSONWaveNotes.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_JSONWAVENOTE -#endif +#endif // AUTOMATED_TESTING static Constant JWN_DEFAULT_RELEASE = 1 diff --git a/Packages/MIES/MIES_Labnotebook.ipf b/Packages/MIES/MIES_Labnotebook.ipf index c5195e0589..1a5afdc31e 100644 --- a/Packages/MIES/MIES_Labnotebook.ipf +++ b/Packages/MIES/MIES_Labnotebook.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_Labnotebook -#endif +#endif // AUTOMATED_TESTING /// @brief Set column dimension labels from the first row of the key wave Function LBN_SetDimensionLabels(WAVE/T keys, WAVE values, [variable start]) diff --git a/Packages/MIES/MIES_LogbookViewer.ipf b/Packages/MIES/MIES_LogbookViewer.ipf index 888083e160..2e2370f0ac 100644 --- a/Packages/MIES/MIES_LogbookViewer.ipf +++ b/Packages/MIES/MIES_LogbookViewer.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_LBV -#endif +#endif // AUTOMATED_TESTING /// @file MIES_LogbookViewer.ipf /// @brief __LBV__ Panel for browsing the labnotebook and TPStorage waves diff --git a/Packages/MIES/MIES_Logging.ipf b/Packages/MIES/MIES_Logging.ipf index c85419f3d0..1179c5e579 100644 --- a/Packages/MIES/MIES_Logging.ipf +++ b/Packages/MIES/MIES_Logging.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_LOG -#endif +#endif // AUTOMATED_TESTING /// @file MIES_PackageSettings.ipf /// @brief __LOG__ Routines for dealing with JSON log files diff --git a/Packages/MIES/MIES_Menu.ipf b/Packages/MIES/MIES_Menu.ipf index ff363923f5..1978208e69 100644 --- a/Packages/MIES/MIES_Menu.ipf +++ b/Packages/MIES/MIES_Menu.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MENU -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Menu.ipf /// @brief __MEN__ Definition of the menu items @@ -202,7 +202,7 @@ Function MEN_CreateIssueOnGithub() ref = CaptureHistoryStart() HW_NI_PrintPropertiesOfDevices() str = CaptureHistory(ref, 1) -#endif +#endif // WINDOWS body += str diff --git a/Packages/MIES/MIES_MiesUtilities_Algorithm.ipf b/Packages/MIES/MIES_MiesUtilities_Algorithm.ipf index c3bcb30018..e744151330 100644 --- a/Packages/MIES/MIES_MiesUtilities_Algorithm.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Algorithm.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MIESUTILS_ALGORITHM -#endif +#endif // AUTOMATED_TESTING /// @file MIES_MiesUtilities_Algorithm.ipf /// @brief This file holds MIES utility functions implementing various algorithms diff --git a/Packages/MIES/MIES_MiesUtilities_BackupWaves.ipf b/Packages/MIES/MIES_MiesUtilities_BackupWaves.ipf index 25211ec456..a582df6b83 100644 --- a/Packages/MIES/MIES_MiesUtilities_BackupWaves.ipf +++ b/Packages/MIES/MIES_MiesUtilities_BackupWaves.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MIESUTILS_BACKUPWAVES -#endif +#endif // AUTOMATED_TESTING /// @file MIES_MiesUtilities_BackupWaves.ipf /// @brief This file holds MIES utility functions for wave backup diff --git a/Packages/MIES/MIES_MiesUtilities_Channels.ipf b/Packages/MIES/MIES_MiesUtilities_Channels.ipf index b11b487141..f848d50c74 100644 --- a/Packages/MIES/MIES_MiesUtilities_Channels.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Channels.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MIESUTILS_CHANNELS -#endif +#endif // AUTOMATED_TESTING /// @file MIES_MiesUtilities_Channels.ipf /// @brief This file holds MIES utility functions for Channels diff --git a/Packages/MIES/MIES_MiesUtilities_Checks.ipf b/Packages/MIES/MIES_MiesUtilities_Checks.ipf index 9c700e7d91..82faa70edc 100644 --- a/Packages/MIES/MIES_MiesUtilities_Checks.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Checks.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MIESUTILS_CHECKS -#endif +#endif // AUTOMATED_TESTING /// @file MIES_MiesUtilities_Checks.ipf /// @brief This file holds MIES utility functions for checks diff --git a/Packages/MIES/MIES_MiesUtilities_Config.ipf b/Packages/MIES/MIES_MiesUtilities_Config.ipf index 6ba3f1ef33..d775353901 100644 --- a/Packages/MIES/MIES_MiesUtilities_Config.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Config.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MIESUTILS_CONFIG -#endif +#endif // AUTOMATED_TESTING /// @file MIES_MiesUtilities_Config.ipf /// @brief This file holds MIES utility functions for the config wave diff --git a/Packages/MIES/MIES_MiesUtilities_Conversion.ipf b/Packages/MIES/MIES_MiesUtilities_Conversion.ipf index 92e3c2e513..53e3866aac 100644 --- a/Packages/MIES/MIES_MiesUtilities_Conversion.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Conversion.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MIESUTILS_CONVERSION -#endif +#endif // AUTOMATED_TESTING /// @file MIES_MiesUtilities_Conversion.ipf /// @brief This file holds MIES utility functions for conversions @@ -260,6 +260,6 @@ Function MapAnaFuncToConstant(string anaFunc) return TEST_ANALYSIS_FUNCTION #else return INVALID_ANALYSIS_FUNCTION -#endif +#endif // AUTOMATED_TESTING endswitch End diff --git a/Packages/MIES/MIES_MiesUtilities_DataManagement.ipf b/Packages/MIES/MIES_MiesUtilities_DataManagement.ipf index fee97b6e61..174314199e 100644 --- a/Packages/MIES/MIES_MiesUtilities_DataManagement.ipf +++ b/Packages/MIES/MIES_MiesUtilities_DataManagement.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MIESUTILS_DATAMANAGEMENT -#endif +#endif // AUTOMATED_TESTING /// @file MIES_MiesUtilities_DataManagement.ipf /// @brief This file holds MIES utility functions for data handling. diff --git a/Packages/MIES/MIES_MiesUtilities_Device.ipf b/Packages/MIES/MIES_MiesUtilities_Device.ipf index 4a337697c8..3f2866cafb 100644 --- a/Packages/MIES/MIES_MiesUtilities_Device.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Device.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MIESUTILS_DEVICE -#endif +#endif // AUTOMATED_TESTING /// @file MIES_MiesUtilities_Device.ipf /// @brief This file holds MIES utility functions for Device handling diff --git a/Packages/MIES/MIES_MiesUtilities_GUI.ipf b/Packages/MIES/MIES_MiesUtilities_GUI.ipf index a9a9bc7b0e..6818d672c3 100644 --- a/Packages/MIES/MIES_MiesUtilities_GUI.ipf +++ b/Packages/MIES/MIES_MiesUtilities_GUI.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MIESUTILS_GUI -#endif +#endif // AUTOMATED_TESTING #include diff --git a/Packages/MIES/MIES_MiesUtilities_Getter.ipf b/Packages/MIES/MIES_MiesUtilities_Getter.ipf index fa198a5db8..8095649da7 100644 --- a/Packages/MIES/MIES_MiesUtilities_Getter.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Getter.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MIESUTILS_GETTER -#endif +#endif // AUTOMATED_TESTING /// @file MIES_MiesUtilities_Getter.ipf /// @brief This file holds MIES utility functions that get names/objects diff --git a/Packages/MIES/MIES_MiesUtilities_Logbook.ipf b/Packages/MIES/MIES_MiesUtilities_Logbook.ipf index 4b33ad2c24..21409668bb 100644 --- a/Packages/MIES/MIES_MiesUtilities_Logbook.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Logbook.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MIESUTILS_LOGBOOK -#endif +#endif // AUTOMATED_TESTING /// @file MIES_MiesUtilities_Logbook.ipf /// @brief This file holds MIES utility functions for working with the various Logbooks. @@ -1266,7 +1266,7 @@ threadsafe static Function EnforceIndependentSetting(WAVE settings) #ifdef AUTOMATED_TESTING Duplicate/FREE/RMD=[0, NUM_HEADSTAGES - 1] settings, settingsHS ASSERT_TS(!HasOneValidEntry(settingsHS) || IsConstant(settings, settings[0]), "The labnotebook query asked for independent headstage setting, but the entry has headstage dependent settings.") -#endif +#endif // AUTOMATED_TESTING End /// @brief Find the first and last point index of a consecutive range of diff --git a/Packages/MIES/MIES_MiesUtilities_Logging.ipf b/Packages/MIES/MIES_MiesUtilities_Logging.ipf index 010d7fbe5d..c780edd2da 100644 --- a/Packages/MIES/MIES_MiesUtilities_Logging.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Logging.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MIESUTILS_LOGGING -#endif +#endif // AUTOMATED_TESTING /// @file MIES_MiesUtilities_Logging.ipf /// @brief This file holds MIES utility functions for logging diff --git a/Packages/MIES/MIES_MiesUtilities_Recreation.ipf b/Packages/MIES/MIES_MiesUtilities_Recreation.ipf index 006e094e7f..7332ee1723 100644 --- a/Packages/MIES/MIES_MiesUtilities_Recreation.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Recreation.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MIESUTILS_RECREATION -#endif +#endif // AUTOMATED_TESTING /// @file MIES_MiesUtilities_Recreation.ipf /// @brief This file holds MIES utility functions for sweep and config wave recreation diff --git a/Packages/MIES/MIES_MiesUtilities_Settings.ipf b/Packages/MIES/MIES_MiesUtilities_Settings.ipf index 2c28d08465..3f93c0c74a 100644 --- a/Packages/MIES/MIES_MiesUtilities_Settings.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Settings.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MIESUTILS_SETTINGS -#endif +#endif // AUTOMATED_TESTING /// @file MIES_MiesUtilities_settings.ipf /// @brief This file holds MIES utility functions for settings management diff --git a/Packages/MIES/MIES_MiesUtilities_Sweep.ipf b/Packages/MIES/MIES_MiesUtilities_Sweep.ipf index efdb78120e..e24fadb590 100644 --- a/Packages/MIES/MIES_MiesUtilities_Sweep.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Sweep.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MIESUTILS_SWEEP -#endif +#endif // AUTOMATED_TESTING /// @file MIES_MiesUtilities_Sweep.ipf /// @brief This file holds MIES utility functions for working with sweeps diff --git a/Packages/MIES/MIES_MiesUtilities_System.ipf b/Packages/MIES/MIES_MiesUtilities_System.ipf index 4df92b2900..2140f52dd0 100644 --- a/Packages/MIES/MIES_MiesUtilities_System.ipf +++ b/Packages/MIES/MIES_MiesUtilities_System.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MIESUTILS_SYSTEM -#endif +#endif // AUTOMATED_TESTING // @brief Common setup routine for all MIES background tasks for DAQ, TP and pressure control Function SetupBackgroundTasks() diff --git a/Packages/MIES/MIES_MiesUtilities_Uploads.ipf b/Packages/MIES/MIES_MiesUtilities_Uploads.ipf index 66da69339d..610632b96e 100644 --- a/Packages/MIES/MIES_MiesUtilities_Uploads.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Uploads.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MIESUTILS_UPLOADS -#endif +#endif // AUTOMATED_TESTING /// @file MIES_MiesUtilities_Uploads.ipf /// @brief This file holds MIES utility functions for data upload @@ -19,7 +19,7 @@ Function UploadCrashDumpsDaily() #ifdef AUTOMATED_TESTING return NaN -#endif +#endif // AUTOMATED_TESTING AssertOnAndClearRTError() try @@ -50,7 +50,7 @@ Function UploadLogFilesDaily() #ifdef AUTOMATED_TESTING return NaN -#endif +#endif // AUTOMATED_TESTING AssertOnAndClearRTError() try @@ -97,7 +97,7 @@ Function UploadPingPeriodically() #ifdef AUTOMATED_TESTING return NaN -#endif +#endif // AUTOMATED_TESTING if(!GetUserPingEnabled()) return NaN @@ -210,7 +210,7 @@ Function UploadCrashDumps() #ifndef DEBUGGING_ENABLED MoveFolder/P=$basePath "Diagnostics" as UniqueFileOrFolder(basePath, "Diagnostics_old") -#endif // DEBUGGING_ENABLED +#endif // !DEBUGGING_ENABLED DEBUGPRINT_ELAPSED(referenceTime) diff --git a/Packages/MIES/MIES_MiesUtilities_ZeroMQ.ipf b/Packages/MIES/MIES_MiesUtilities_ZeroMQ.ipf index 1fca8f8505..1dd78dc9d9 100644 --- a/Packages/MIES/MIES_MiesUtilities_ZeroMQ.ipf +++ b/Packages/MIES/MIES_MiesUtilities_ZeroMQ.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_MIESUTILS_ZEROMQ -#endif +#endif // AUTOMATED_TESTING /// @file MIES_MiesUtilities_ZeroMQ.ipf /// @brief This file holds MIES utility functions for ZeroMQ diff --git a/Packages/MIES/MIES_NeuroDataWithoutBorders.ipf b/Packages/MIES/MIES_NeuroDataWithoutBorders.ipf index 9b951c462c..c750be2591 100644 --- a/Packages/MIES/MIES_NeuroDataWithoutBorders.ipf +++ b/Packages/MIES/MIES_NeuroDataWithoutBorders.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_NWB -#endif +#endif // AUTOMATED_TESTING /// @file MIES_NeuroDataWithoutBorders.ipf /// @brief __NWB__ Functions related to MIES data export into the NeuroDataWithoutBorders format diff --git a/Packages/MIES/MIES_OptimzedOverlapDistributedAcquisition.ipf b/Packages/MIES/MIES_OptimzedOverlapDistributedAcquisition.ipf index 2c7a7705ad..4d87050708 100644 --- a/Packages/MIES/MIES_OptimzedOverlapDistributedAcquisition.ipf +++ b/Packages/MIES/MIES_OptimzedOverlapDistributedAcquisition.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_OOD -#endif +#endif // AUTOMATED_TESTING /// @file MIES_OptimzedOverlapDistributedAcquisition.ipf /// @brief __OOD__ This file holds functions related to oodDAQ. diff --git a/Packages/MIES/MIES_Oscilloscope.ipf b/Packages/MIES/MIES_Oscilloscope.ipf index ff4feb6db9..3c511287c2 100644 --- a/Packages/MIES/MIES_Oscilloscope.ipf +++ b/Packages/MIES/MIES_Oscilloscope.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_SCOPE -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Oscilloscope.ipf /// @brief __SCOPE__ Scope window handling for data acquisition and testpulse results @@ -820,7 +820,7 @@ static Function SCOPE_ITC_UpdateOscilloscope(string device, variable dataAcqOrTP Cursor/W=DAQDataWaveTPMD/H=2/P A, $NameOfWave(DAQDataWave), first Cursor/W=DAQDataWaveTPMD/H=2/P B, $NameOfWave(DAQDataWave), last endif -#endif +#endif // DEBUGGING_ENABLED Multithread OscilloscopeData[][startOfADColumns, endOfADColumns - 1] = DAQDataWave[first + p][q] / allGain[q] for(i = startOfADColumns; i < endOfADColumns; i += 1) diff --git a/Packages/MIES/MIES_OverlaySweeps.ipf b/Packages/MIES/MIES_OverlaySweeps.ipf index 80394627ec..ada7ac392e 100644 --- a/Packages/MIES/MIES_OverlaySweeps.ipf +++ b/Packages/MIES/MIES_OverlaySweeps.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_OVS -#endif +#endif // AUTOMATED_TESTING Menu "TracePopup" "Ignore Headstage in Overlay Sweeps", /Q, OVS_IgnoreHeadstageInOverlay() diff --git a/Packages/MIES/MIES_PackageSettings.ipf b/Packages/MIES/MIES_PackageSettings.ipf index 4a97ebfe62..cc5f89988d 100644 --- a/Packages/MIES/MIES_PackageSettings.ipf +++ b/Packages/MIES/MIES_PackageSettings.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_PS -#endif +#endif // AUTOMATED_TESTING /// @file MIES_PackageSettings.ipf /// @brief __PS__ Routines for dealing with JSON settings diff --git a/Packages/MIES/MIES_Pictures.ipf b/Packages/MIES/MIES_Pictures.ipf index 71cd30c2ee..6956a3b13d 100644 --- a/Packages/MIES/MIES_Pictures.ipf +++ b/Packages/MIES/MIES_Pictures.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_PIC -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Pictures.ipf /// diff --git a/Packages/MIES/MIES_PressureControl.ipf b/Packages/MIES/MIES_PressureControl.ipf index a90f5c1ca8..7edc1e6721 100644 --- a/Packages/MIES/MIES_PressureControl.ipf +++ b/Packages/MIES/MIES_PressureControl.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_P -#endif +#endif // AUTOMATED_TESTING /// @file MIES_PressureControl.ipf /// @brief __P__ Supports use of analog pressure regulators controlled via a diff --git a/Packages/MIES/MIES_ProgrammaticGUIControl.ipf b/Packages/MIES/MIES_ProgrammaticGUIControl.ipf index 10ce210fce..b4dc9281a7 100644 --- a/Packages/MIES/MIES_ProgrammaticGUIControl.ipf +++ b/Packages/MIES/MIES_ProgrammaticGUIControl.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_PGC -#endif +#endif // AUTOMATED_TESTING /// @file MIES_ProgrammaticGUIControl.ipf /// @brief __PGC__ Control GUI controls from code diff --git a/Packages/MIES/MIES_Publish.ipf b/Packages/MIES/MIES_Publish.ipf index 8443df668e..e0248d457f 100644 --- a/Packages/MIES/MIES_Publish.ipf +++ b/Packages/MIES/MIES_Publish.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_PUB -#endif +#endif // AUTOMATED_TESTING /// @brief Get a template for publishing messages /// diff --git a/Packages/MIES/MIES_PulseAveraging.ipf b/Packages/MIES/MIES_PulseAveraging.ipf index 2ba7e969fd..5d7dacd3cd 100644 --- a/Packages/MIES/MIES_PulseAveraging.ipf +++ b/Packages/MIES/MIES_PulseAveraging.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_PA -#endif +#endif // AUTOMATED_TESTING /// @file MIES_PulseAveraging.ipf /// @@ -383,7 +383,7 @@ Function/WAVE PA_GetPulseInfos(WAVE/T traceData, variable idx, variable region, #ifdef AUTOMATED_TESTING PA_DiffPulseInfos(numericalValues, sweepNo, pulseInfosEpochs, pulseInfosCalc) -#endif +#endif // AUTOMATED_TESTING if(WaveExists(pulseInfosEpochs)) return pulseInfosEpochs @@ -1279,7 +1279,7 @@ Function PA_Update(string win, variable mode, [WAVE/Z additionalData]) variable execTime_StartLocal, execTime_PreProcess, execTime_ShowPulses, execTime_ShowImage, execTime_Update variable execTime_Start = stopmstimer(-2) string execTime_outStr -#endif +#endif // !PA_HIDE_EXECUTION_TIME if(ParamIsDefault(additionalData)) WAVE/Z additionalData = $"" @@ -1300,11 +1300,11 @@ Function PA_Update(string win, variable mode, [WAVE/Z additionalData]) #ifndef PA_HIDE_EXECUTION_TIME execTime_StartLocal = stopmstimer(-2) -#endif +#endif // !PA_HIDE_EXECUTION_TIME [pasi, needsPlotting] = PA_PreProcessPulses(win, current, cs, mode, additionalData) #ifndef PA_HIDE_EXECUTION_TIME execTime_PreProcess = stopmstimer(-2) - execTime_StartLocal -#endif +#endif // !PA_HIDE_EXECUTION_TIME if(!needsPlotting) return NaN endif @@ -1313,19 +1313,19 @@ Function PA_Update(string win, variable mode, [WAVE/Z additionalData]) #ifndef PA_HIDE_EXECUTION_TIME execTime_StartLocal = stopmstimer(-2) -#endif +#endif // !PA_HIDE_EXECUTION_TIME usedTraceGraphs = PA_ShowPulses(graph, current, cs, pasi, mode) #ifndef PA_HIDE_EXECUTION_TIME execTime_ShowPulses = stopmstimer(-2) - execTime_StartLocal -#endif +#endif // !PA_HIDE_EXECUTION_TIME #ifndef PA_HIDE_EXECUTION_TIME execTime_StartLocal = stopmstimer(-2) -#endif +#endif // !PA_HIDE_EXECUTION_TIME usedImageGraphs = PA_ShowImage(graph, current, cs, pasi, mode, additionalData) #ifndef PA_HIDE_EXECUTION_TIME execTime_ShowImage = stopmstimer(-2) - execTime_StartLocal -#endif +#endif // !PA_HIDE_EXECUTION_TIME KillWindows(RemoveFromList(usedTraceGraphs + usedImageGraphs, preExistingGraphs)) @@ -1339,7 +1339,7 @@ Function PA_Update(string win, variable mode, [WAVE/Z additionalData]) DEBUGPRINT(execTime_outStr) sprintf execTime_outStr, "PA exec time: PA_Update %.3f s.\r", execTime_Update * MICRO_TO_ONE DEBUGPRINT(execTime_outStr) -#endif +#endif // !PA_HIDE_EXECUTION_TIME End /// @brief Returns the two column setWave with pulse/pulsenote @@ -1966,7 +1966,7 @@ static Function [STRUCT PulseAverageSetIndices pasi, variable needsPlotting] PA_ variable execTime_startLocal, execTime_GenerateAllPulseWaves, execTime_ApplyPulseSortingOrder, execTime_ResetWavesIfRequired variable execTime_MarkFailedPulses, execTime_ZeroPulses, execTime_AutomaticTimeAlignment, execTime_CalculateAllAverages string execTime_outStr -#endif +#endif // !PA_HIDE_EXECUTION_TIME preExistingGraphs = PA_GetGraphs(win, PA_DISPLAYMODE_ALL) graph = GetMainWindow(win) @@ -1986,11 +1986,11 @@ static Function [STRUCT PulseAverageSetIndices pasi, variable needsPlotting] PA_ #ifndef PA_HIDE_EXECUTION_TIME execTime_StartLocal = stopmstimer(-2) -#endif +#endif // !PA_HIDE_EXECUTION_TIME [pasi] = PA_GenerateAllPulseWaves(win, pa, mode, additionalData) #ifndef PA_HIDE_EXECUTION_TIME execTime_GenerateAllPulseWaves = stopmstimer(-2) - execTime_StartLocal -#endif +#endif // !PA_HIDE_EXECUTION_TIME endif if(!WaveExists(pasi.setIndices)) @@ -2001,65 +2001,65 @@ static Function [STRUCT PulseAverageSetIndices pasi, variable needsPlotting] PA_ if(!(mode == POST_PLOT_CONSTANT_SWEEPS && cs.images)) #ifndef PA_HIDE_EXECUTION_TIME execTime_StartLocal = stopmstimer(-2) -#endif +#endif // !PA_HIDE_EXECUTION_TIME // if CONSTANT_SWEEPS and not changed or no image shown, no need to call WAVE indexHelper = pasi.indexHelper Multithread indexHelper[][] = PA_ApplyPulseSortingOrder(pasi.setIndices[p][q], pasi.channels[p], pasi.regions[q], pasi.properties, pa) #ifndef PA_HIDE_EXECUTION_TIME execTime_ApplyPulseSortingOrder = stopmstimer(-2) - execTime_StartLocal -#endif +#endif // !PA_HIDE_EXECUTION_TIME endif if(!(mode == POST_PLOT_CONSTANT_SWEEPS && cs.dontResetWaves) || (!cs.singlePulse && pa.searchFailedPulses)) #ifndef PA_HIDE_EXECUTION_TIME execTime_StartLocal = stopmstimer(-2) -#endif +#endif // !PA_HIDE_EXECUTION_TIME pasi.indexHelper[][] = PA_ResetWavesIfRequired(pasi.setWaves2Unsorted[p][q], pa, mode) #ifndef PA_HIDE_EXECUTION_TIME execTime_ResetWavesIfRequired = stopmstimer(-2) - execTime_StartLocal -#endif +#endif // !PA_HIDE_EXECUTION_TIME endif if(!(mode == POST_PLOT_CONSTANT_SWEEPS && cs.failedPulses) || (!cs.singlePulse && pa.searchFailedPulses)) #ifndef PA_HIDE_EXECUTION_TIME execTime_StartLocal = stopmstimer(-2) -#endif +#endif // !PA_HIDE_EXECUTION_TIME PA_MarkFailedPulses(pa, pasi) #ifndef PA_HIDE_EXECUTION_TIME execTime_MarkFailedPulses = stopmstimer(-2) - execTime_StartLocal -#endif +#endif // !PA_HIDE_EXECUTION_TIME endif // cs.dontResetWaves contains that zeroPulse setting did not change if(!(mode == POST_PLOT_CONSTANT_SWEEPS && cs.dontResetWaves && cs.singlePulse) && pa.zeroPulses) #ifndef PA_HIDE_EXECUTION_TIME execTime_StartLocal = stopmstimer(-2) -#endif +#endif // !PA_HIDE_EXECUTION_TIME pasi.indexHelper[][] = PA_ZeroPulses(pasi.setWaves2Unsorted[p][q]) #ifndef PA_HIDE_EXECUTION_TIME execTime_ZeroPulses = stopmstimer(-2) - execTime_StartLocal -#endif +#endif // !PA_HIDE_EXECUTION_TIME endif // cs.dontResetWaves contains that autoTimeAlignment setting did not change if(!(mode == POST_PLOT_CONSTANT_SWEEPS && cs.dontResetWaves && cs.singlePulse) && pa.autoTimeAlignment) #ifndef PA_HIDE_EXECUTION_TIME execTime_StartLocal = stopmstimer(-2) -#endif +#endif // !PA_HIDE_EXECUTION_TIME PA_AutomaticTimeAlignment(pasi) #ifndef PA_HIDE_EXECUTION_TIME execTime_AutomaticTimeAlignment = stopmstimer(-2) - execTime_StartLocal -#endif +#endif // !PA_HIDE_EXECUTION_TIME endif if(!(mode == POST_PLOT_CONSTANT_SWEEPS && cs.dontResetWaves && cs.failedPulses && cs.singlePulse)) #ifndef PA_HIDE_EXECUTION_TIME execTime_StartLocal = stopmstimer(-2) -#endif +#endif // !PA_HIDE_EXECUTION_TIME PA_CalculateAllAverages(pa, pasi, mode) #ifndef PA_HIDE_EXECUTION_TIME execTime_CalculateAllAverages = stopmstimer(-2) - execTime_StartLocal -#endif +#endif // !PA_HIDE_EXECUTION_TIME endif #ifndef PA_HIDE_EXECUTION_TIME @@ -2077,7 +2077,7 @@ static Function [STRUCT PulseAverageSetIndices pasi, variable needsPlotting] PA_ DEBUGPRINT(execTime_outStr) sprintf execTime_outStr, "PA exec time: PA_CalculateAllAverages %.3f s.\r", execTime_CalculateAllAverages * MICRO_TO_ONE DEBUGPRINT(execTime_outStr) -#endif +#endif // !PA_HIDE_EXECUTION_TIME return [pasi, 1] End @@ -2915,7 +2915,7 @@ static Function PA_LayoutGraphs(string win, STRUCT PulseAverageSettings &pa, STR #ifdef PA_HIDE_AXIS ModifyGraph/W=$graph nticks=0, noLabel=2, axthick=0 -#endif +#endif // PA_HIDE_AXIS if(displayMode == PA_DISPLAYMODE_TRACES) ModifyGraph/W=$graph margin(left)=30, margin(top)=20, margin(right)=14, margin(bottom)=14 @@ -2995,7 +2995,7 @@ static Function PA_LayoutGraphs(string win, STRUCT PulseAverageSettings &pa, STR #ifdef PA_HIDE_AXIS ModifyGraph/W=$graph nticks=0, noLabel=2, axthick=0, margin=5 -#endif +#endif // PA_HIDE_AXIS ModifyGraph/W=$graph/Z freePos(bottom)=0 endfor endfor diff --git a/Packages/MIES/MIES_RepeatedAcquisition.ipf b/Packages/MIES/MIES_RepeatedAcquisition.ipf index d51e93df33..c2e4ec11f8 100644 --- a/Packages/MIES/MIES_RepeatedAcquisition.ipf +++ b/Packages/MIES/MIES_RepeatedAcquisition.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_RA -#endif +#endif // AUTOMATED_TESTING /// comment in to enable repeated acquisition performance measurement code // #define PERFING_RA @@ -171,7 +171,7 @@ static Function RA_Start(string device) #ifdef PERFING_RA RA_PerfInitialize(device) -#endif +#endif // PERFING_RA numTotalSweeps = RA_GetTotalNumberOfSweeps(device) @@ -204,7 +204,7 @@ Function RA_Counter(string device) #ifdef PERFING_RA RA_PerfAddMark(device, count) -#endif +#endif // PERFING_RA sprintf str, "count=%d, activeSetCount=%d\r", count, activeSetCount DEBUGPRINT(str) @@ -239,7 +239,7 @@ static Function RA_FinishAcquisition(string device) #ifdef PERFING_RA RA_PerfFinish(device) -#endif +#endif // PERFING_RA DAP_OneTimeCallAfterDAQ(device, DQ_STOP_REASON_FINISHED) End @@ -264,7 +264,7 @@ static Function RA_StartMD(string device) #ifdef PERFING_RA RA_PerfInitialize(device) -#endif +#endif // PERFING_RA RA_StepSweepsRemaining(device) @@ -298,7 +298,7 @@ Function RA_CounterMD(string device) #ifdef PERFING_RA RA_PerfAddMark(device, count) -#endif +#endif // PERFING_RA sprintf str, "count=%d, activeSetCount=%d\r", count, activeSetCount DEBUGPRINT(str) diff --git a/Packages/MIES/MIES_SamplingInterval.ipf b/Packages/MIES/MIES_SamplingInterval.ipf index fcc59b1d68..7bd5275bd1 100644 --- a/Packages/MIES/MIES_SamplingInterval.ipf +++ b/Packages/MIES/MIES_SamplingInterval.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_SI -#endif +#endif // AUTOMATED_TESTING /// @file MIES_SamplingInterval.ipf /// @@ -478,7 +478,7 @@ static Function SI_TestSampInt(string device) DEBUGPRINT("Unimplemented") End -#endif +#endif // ITC_XOP_PRESENT /// @brief Calculate the minimum sampling interval /// diff --git a/Packages/MIES/MIES_StimsetAPI.ipf b/Packages/MIES/MIES_StimsetAPI.ipf index 4ecbbb129f..5d6ba2a838 100644 --- a/Packages/MIES/MIES_StimsetAPI.ipf +++ b/Packages/MIES/MIES_StimsetAPI.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_STAPI -#endif +#endif // AUTOMATED_TESTING /// @file MIES_StimsetAPI.ipf /// @brief __ST__ Stimulus set API diff --git a/Packages/MIES/MIES_Structures.ipf b/Packages/MIES/MIES_Structures.ipf index e3919d424f..94b54e215f 100644 --- a/Packages/MIES/MIES_Structures.ipf +++ b/Packages/MIES/MIES_Structures.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_STRUCTURES -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Structures.ipf /// diff --git a/Packages/MIES/MIES_SweepFormula.ipf b/Packages/MIES/MIES_SweepFormula.ipf index 46b069e5c6..34989cfc5d 100644 --- a/Packages/MIES/MIES_SweepFormula.ipf +++ b/Packages/MIES/MIES_SweepFormula.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_SF -#endif +#endif // AUTOMATED_TESTING // to enable debug mode with more persistent data // #define SWEEPFORMULA_DEBUG @@ -351,7 +351,7 @@ static Function SF_FormulaParser(string formula, [variable &createdArray, variab if(DP_DebuggingEnabledForCaller()) printf "%sformula %s\r", indentation, formula endif -#endif +#endif // DEBUGGING_ENABLED WAVE/T wFormula = UTF8StringToTextWave(formula) if(!DimSize(wFormula, ROWS)) @@ -366,7 +366,7 @@ static Function SF_FormulaParser(string formula, [variable &createdArray, variab if(DP_DebuggingEnabledForCaller()) printf "%stoken %s, state %s, lastCalculation %s, ", indentation, token, PadString(SF_StringifyState(state), 25, 0x20), PadString(SF_StringifyState(lastCalculation), 25, 0x20) endif -#endif +#endif // DEBUGGING_ENABLED [action, lastState, collectedSign] = SF_ParserGetActionFromState(jsonId, state, lastCalculation, IsEmpty(buffer)) @@ -374,7 +374,7 @@ static Function SF_FormulaParser(string formula, [variable &createdArray, variab if(DP_DebuggingEnabledForCaller()) printf "action %s, lastState %s\r", PadString(SF_StringifyAction(action), 25, 0x20), PadString(SF_StringifyState(lastState), 25, 0x20) endif -#endif +#endif // DEBUGGING_ENABLED if(action != SF_ACTION_SKIP && lastAction == SF_ACTION_ARRAY) // If the last action was the handling of "]" from an array @@ -840,7 +840,7 @@ static Function/WAVE SF_FormulaExecutor(string graph, variable jsonID, [string j printf "%s\r", JSON_Dump(jsonID, indent = 2) printf "##########################\r" endif -#endif +#endif // DEBUGGING_ENABLED // object and array evaluation JSONtype = JSON_GetType(jsonID, jsonPath) @@ -1020,7 +1020,7 @@ static Function/WAVE SF_FormulaExecutor(string graph, variable jsonID, [string j ASSERT(GetRowIndex(ops, str = opName) >= 0, "List of operations with long name is out of date as the following is missing: " + opName) break endswitch -#endif +#endif // AUTOMATED_TESTING /// @name SweepFormulaOperations ///@{ @@ -3252,7 +3252,7 @@ static Function/WAVE SF_OperationTPImpl(string graph, WAVE/WAVE mode, WAVE/Z sel if(DP_DebuggingEnabledForCaller()) debugMode = 1 endif -#endif +#endif // DEBUGGING_ENABLED WAVE/Z selectData = SFH_FilterSelect(selectDataPreFilter, XOP_CHANNEL_TYPE_ADC) if(!WaveExists(selectData)) @@ -3349,7 +3349,7 @@ static Function/WAVE SF_OperationTPImpl(string graph, WAVE/WAVE mode, WAVE/Z sel Make/FREE/D/N=(numTPs) beginTrails, endTrails beginTrails = NaN endTrails = NaN -#endif +#endif // AUTOMATED_TESTING for(j = 0; j < numTPs; j += 1) epBaselineTrail = EP_GetShortName(epochMatches[j][EPOCH_COL_TAGS]) + "_B1" @@ -3370,7 +3370,7 @@ static Function/WAVE SF_OperationTPImpl(string graph, WAVE/WAVE mode, WAVE/Z sel #ifdef AUTOMATED_TESTING beginTrails[j] = beginTrail endTrails[j] = endTrail -#endif +#endif // AUTOMATED_TESTING if(!CmpStr(retWhat, SF_OP_TPFIT_RET_FITQUALITY)) Duplicate/FREE sweepData, residuals @@ -3453,7 +3453,7 @@ static Function/WAVE SF_OperationTPImpl(string graph, WAVE/WAVE mode, WAVE/Z sel #ifdef AUTOMATED_TESTING JWN_SetWaveInWaveNote(fitResults, "/begintrails", beginTrails) JWN_SetWaveInWaveNote(fitResults, "/endtrails", endTrails) -#endif +#endif // AUTOMATED_TESTING if(!debugMode) WAVE/D out = fitResults @@ -4740,7 +4740,7 @@ static Function/WAVE SF_OperationPowerSpectrum(variable jsonId, string jsonPath, endif #else output[] = SF_PowerSpectrumRatio(inputRatio[p], ratioFreq, SF_POWERSPECTRUM_RATIO_DELTAHZ) -#endif +#endif // DEBUGGING_ENABLED endif return SFH_GetOutputForExecutor(output, graph, SF_OP_POWERSPECTRUM, clear = input) @@ -4785,7 +4785,7 @@ static Function/WAVE SF_PowerSpectrumRatio(WAVE/Z input, variable ratioFreq, var endif #else FuncFit/Q SF_LineNoiseFit, kwCWave=wCoef, input(minFreq, maxFreq)/C=wConstraints; err = GetRTError(1) -#endif +#endif // DEBUGGING_ENABLED MakeWaveFree($"W_sigma") Redimension/N=1 input @@ -4797,7 +4797,7 @@ static Function/WAVE SF_PowerSpectrumRatio(WAVE/Z input, variable ratioFreq, var endif #else SetScale/P x, wCoef[3], 1, WaveUnits(input, ROWS), input -#endif +#endif // DEBUGGING_ENABLED SetScale/P d, 0, 1, "power ratio", input @@ -4817,7 +4817,7 @@ static Function/WAVE SF_PowerSpectrumRatio(WAVE/Z input, variable ratioFreq, var if(DP_DebuggingEnabledForCaller()) printf "PS ratio, peak position, baseline, peak amplitude : %f %f %f %f\r", input[0], wCoef[3], base, wCoef[2] endif -#endif +#endif // DEBUGGING_ENABLED return input End diff --git a/Packages/MIES/MIES_SweepFormula_Helpers.ipf b/Packages/MIES/MIES_SweepFormula_Helpers.ipf index 5296cc1406..a017628fd3 100644 --- a/Packages/MIES/MIES_SweepFormula_Helpers.ipf +++ b/Packages/MIES/MIES_SweepFormula_Helpers.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_SFH_HELPERS -#endif +#endif // AUTOMATED_TESTING /// @file MIES_SweepFormula_Helpers.ipf /// @@ -324,9 +324,9 @@ Function SFH_ASSERT(variable condition, string message, [variable jsonId]) #if exists("INFO") INFO("SFH_ASSERT: %s", s0 = error) #endif -#endif +#endif // AUTOMATED_TESTING Debugger -#endif +#endif // AUTOMATED_TESTING_DEBUGGING Abort endif End @@ -687,7 +687,7 @@ Function SFH_CleanUpInput(WAVE input) return NaN endif KillOrMoveToTrash(wv = input) -#endif +#endif // !SWEEPFORMULA_DEBUG End Function SFH_AddOpToOpStack(WAVE w, string oldStack, string opShort) @@ -754,7 +754,7 @@ Function/WAVE SFH_GetOutputForExecutor(WAVE output, string win, string opShort, #ifdef SWEEPFORMULA_DEBUG SFH_ConvertAllReturnDataToPermanent(output, win, opShort) -#endif +#endif // SWEEPFORMULA_DEBUG return wRefPath End diff --git a/Packages/MIES/MIES_SweepFormula_PSX.ipf b/Packages/MIES/MIES_SweepFormula_PSX.ipf index 061415e4c8..a1605cf978 100644 --- a/Packages/MIES/MIES_SweepFormula_PSX.ipf +++ b/Packages/MIES/MIES_SweepFormula_PSX.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_PSX -#endif +#endif // AUTOMATED_TESTING /// @file MIES_SweepFormula_PSX.ipf /// @@ -523,7 +523,7 @@ static Function [WAVE/D peakX, WAVE/D peakY] PSX_FilterEventsKernelAmpSign(WAVE/ overrideSignQC = overrideResults[i][%$comboKey][%KernelAmpSignQC] endif -#endif +#endif // AUTOMATED_TESTING if(IsNaN(overrideSignQC)) if(sign(amplitude) != sign(kernelAmp)) @@ -829,7 +829,7 @@ static Function PSX_FitEventDecay(WAVE sweepDataOffFilt, WAVE psxEvent, variable decayTau = overrideTau endif endif -#endif +#endif // AUTOMATED_TESTING if(err) psxEvent[eventIndex][%$"Fit manual QC call"] = PSX_REJECT @@ -1739,7 +1739,7 @@ threadsafe static Function PSX_CalculateRiseTime(WAVE sweepDataOffFilt, WAVE psx printf "comboKey: %s, x: [%g, %g], y: [%g, %g], index: %d, dY: %g, thresholds: [%g, %g], levels: [%g, %g], risetime: %g, xlt: %g, xupt: %g\r", comboKey, xStart, xEnd, yStart, yEnd, index, dY, lowerThreshold, upperThreshold, lowerLevel, upperLevel, risetime, xlt, xupt endif -#endif +#endif // DEBUGGING_ENABLED return riseTime End @@ -1775,7 +1775,7 @@ threadsafe static Function PSX_CalculateOnsetTime(WAVE sweepDataDiff, WAVE psxEv DEBUGPRINT_TS(msg) sprintf msg, "level = %g, [%g, %g]\r", level, slewRate_t, baseline_t DEBUGPRINT_TS(msg) -#endif +#endif // DEBUGGING_ENABLED // search backwards in time FindLevel/R=(slewRate_t, baseline_t)/Q sweepDataDiff, level @@ -4241,7 +4241,7 @@ Function PSX_PlotInteractionHook(STRUCT WMWinHookStruct &s) sprintf msg, "Fit range for event %d: [%g, %g]", eventIndex, first, last DEBUGPRINT(msg) -#endif +#endif // DEBUGGING_ENABLED return 1 case EVENT_WINDOW_HOOK_MOUSEUP: win = s.winName diff --git a/Packages/MIES/MIES_SweepFormula_PSX_Macro.ipf b/Packages/MIES/MIES_SweepFormula_PSX_Macro.ipf index 8afc551a11..f7be0e268a 100644 --- a/Packages/MIES/MIES_SweepFormula_PSX_Macro.ipf +++ b/Packages/MIES/MIES_SweepFormula_PSX_Macro.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_PSXM -#endif +#endif // AUTOMATED_TESTING Window PSXPanel() : Panel PauseUpdate; Silent 1 // building window... diff --git a/Packages/MIES/MIES_SweepSaving.ipf b/Packages/MIES/MIES_SweepSaving.ipf index 8949fa77e3..4a0f2afe53 100644 --- a/Packages/MIES/MIES_SweepSaving.ipf +++ b/Packages/MIES/MIES_SweepSaving.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_SWS -#endif +#endif // AUTOMATED_TESTING /// @file MIES_SweepSaving.ipf /// @brief __SWS__ Scale and store acquired data diff --git a/Packages/MIES/MIES_TangoInteract.ipf b/Packages/MIES/MIES_TangoInteract.ipf index ec79fa1c61..9069481812 100644 --- a/Packages/MIES/MIES_TangoInteract.ipf +++ b/Packages/MIES/MIES_TangoInteract.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_TI -#endif +#endif // AUTOMATED_TESTING /// @file MIES_TangoInteract.ipf /// diff --git a/Packages/MIES/MIES_TestPulse.ipf b/Packages/MIES/MIES_TestPulse.ipf index 0e3aa61708..fffb9dfd78 100644 --- a/Packages/MIES/MIES_TestPulse.ipf +++ b/Packages/MIES/MIES_TestPulse.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_TP -#endif +#endif // AUTOMATED_TESTING /// @file MIES_TestPulse.ipf /// @brief __TP__ Basic Testpulse related functionality @@ -468,7 +468,7 @@ static Function [variable result, variable tau, variable baseline] TP_AutoFitBas WAVE data = root:AutoTPDebuggingData WAVE residuals = root:Res_AutoTPDebuggingData endif -#endif +#endif // DEBUGGING_ENABLED if(!debugEnabled) Duplicate/FREE data, residuals diff --git a/Packages/MIES/MIES_TestPulse_Multi.ipf b/Packages/MIES/MIES_TestPulse_Multi.ipf index cf6d166892..3070693dec 100644 --- a/Packages/MIES/MIES_TestPulse_Multi.ipf +++ b/Packages/MIES/MIES_TestPulse_Multi.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_TP_MD -#endif +#endif // AUTOMATED_TESTING /// @brief After this time in s the background task reading data from the ADC device /// @brief will not read multiple TP data sets subsequently to keep up if late diff --git a/Packages/MIES/MIES_TestPulse_Single.ipf b/Packages/MIES/MIES_TestPulse_Single.ipf index 8d311c2ce7..4f2bfab51e 100644 --- a/Packages/MIES/MIES_TestPulse_Single.ipf +++ b/Packages/MIES/MIES_TestPulse_Single.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_TP_SD -#endif +#endif // AUTOMATED_TESTING /// @file MIES_TestPulse_Single.ipf /// @brief __TPS__ Single device background test pulse functionality diff --git a/Packages/MIES/MIES_ThreadedFIFOHandling.ipf b/Packages/MIES/MIES_ThreadedFIFOHandling.ipf index c121838a7a..81ba35b388 100644 --- a/Packages/MIES/MIES_ThreadedFIFOHandling.ipf +++ b/Packages/MIES/MIES_ThreadedFIFOHandling.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_TFM -#endif +#endif // AUTOMATED_TESTING /// @file MIES_ThreadedFIFOHandling.ipf /// @brief __TFH__ Functions related to threadsafe FIFO monitor and stop daemons @@ -53,7 +53,7 @@ static Function TFH_StartFIFODeamonInternal(variable hwType, variable deviceID, BUG("Data acquisition with ITC hardware and no threading is not supported.") #else ThreadStart tgID, 0, TFH_FifoLoop(config, deviceID, stopCollectionPoint, ADChannelToMonitor, mode) -#endif +#endif // THREADING_DISABLED End diff --git a/Packages/MIES/MIES_ThreadsafeDataSharing.ipf b/Packages/MIES/MIES_ThreadsafeDataSharing.ipf index 200d5089d7..85ae4bacf7 100644 --- a/Packages/MIES/MIES_ThreadsafeDataSharing.ipf +++ b/Packages/MIES/MIES_ThreadsafeDataSharing.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_TSDS -#endif +#endif // AUTOMATED_TESTING /// @file MIES_ThreadsafeDataSharing.ipf /// diff --git a/Packages/MIES/MIES_ThreadsafeUtilities.ipf b/Packages/MIES/MIES_ThreadsafeUtilities.ipf index 4e6559ef61..44ef20e024 100644 --- a/Packages/MIES/MIES_ThreadsafeUtilities.ipf +++ b/Packages/MIES/MIES_ThreadsafeUtilities.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_TS -#endif +#endif // AUTOMATED_TESTING static Constant TS_GET_REPEAT_TIMEOUT_IN_MS = 1 static Constant TS_ERROR_INVALID_TGID = 980 // Invalid Thread Group ID or index. diff --git a/Packages/MIES/MIES_TraceUserData.ipf b/Packages/MIES/MIES_TraceUserData.ipf index c19eaa2521..6882aa5276 100644 --- a/Packages/MIES/MIES_TraceUserData.ipf +++ b/Packages/MIES/MIES_TraceUserData.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_TUD -#endif +#endif // AUTOMATED_TESTING /// @file MIES_TraceUserData.ipf /// @brief This file holds helper functions to work with our own trace user data handling diff --git a/Packages/MIES/MIES_Utilities_Algorithm.ipf b/Packages/MIES/MIES_Utilities_Algorithm.ipf index 59115c7453..ea64d79ba2 100644 --- a/Packages/MIES/MIES_Utilities_Algorithm.ipf +++ b/Packages/MIES/MIES_Utilities_Algorithm.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_UTILS_ALGORITHM -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Utilities_Algorithm.ipf /// @brief utility functions for common algorithms diff --git a/Packages/MIES/MIES_Utilities_Checks.ipf b/Packages/MIES/MIES_Utilities_Checks.ipf index a4512998b9..fd5ed4d345 100644 --- a/Packages/MIES/MIES_Utilities_Checks.ipf +++ b/Packages/MIES/MIES_Utilities_Checks.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_UTILS_CHECKS -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Utilities_Checks.ipf /// @brief Utility functions that check for certain properties and return either 1 (TRUE) or 0 (FALSE) diff --git a/Packages/MIES/MIES_Utilities_Conversions.ipf b/Packages/MIES/MIES_Utilities_Conversions.ipf index d1badf223f..71a5b015ba 100644 --- a/Packages/MIES/MIES_Utilities_Conversions.ipf +++ b/Packages/MIES/MIES_Utilities_Conversions.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_UTILS_CONVERSIONS -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Utilities_Conversions.ipf /// @brief Utility functions for conversions diff --git a/Packages/MIES/MIES_Utilities_DataFolder.ipf b/Packages/MIES/MIES_Utilities_DataFolder.ipf index 53c6b8fada..75561128b1 100644 --- a/Packages/MIES/MIES_Utilities_DataFolder.ipf +++ b/Packages/MIES/MIES_Utilities_DataFolder.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_UTILS_DATAFOLDER -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Utilities_DataFolder.ipf /// @brief utility functions for datafolder handling diff --git a/Packages/MIES/MIES_Utilities_Debugger.ipf b/Packages/MIES/MIES_Utilities_Debugger.ipf index 52549e78b8..48781100fe 100644 --- a/Packages/MIES/MIES_Utilities_Debugger.ipf +++ b/Packages/MIES/MIES_Utilities_Debugger.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_UTILS_DEBUGGER -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Utilities_Debugger.ipf /// @brief utility functions for debugger diff --git a/Packages/MIES/MIES_Utilities_File.ipf b/Packages/MIES/MIES_Utilities_File.ipf index c62a3431f6..c40e7778e7 100644 --- a/Packages/MIES/MIES_Utilities_File.ipf +++ b/Packages/MIES/MIES_Utilities_File.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_UTILS_FILE -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Utilities_File.ipf /// @brief utility functions for file handling @@ -344,7 +344,7 @@ Function GetOpenZFlag() return 1 // no dialog if the file does not exist #else return 2 -#endif +#endif // AUTOMATED_TESTING End /// @brief Saves string data to a file @@ -382,7 +382,7 @@ Function SaveTextFile(string data, string fileName, [string fileFilter, string m if(IsEmpty(S_fileName)) return NaN endif -#endif +#endif // AUTOMATED_TESTING Open/Z fnum as S_fileName ASSERT(!V_flag, "Could not open file for writing!") @@ -667,7 +667,7 @@ threadsafe Function MU_GetFreeDiskSpace(string path) ASSERT_TS(0, "Not implemented") End -#endif +#endif // MACINTOSH /// @brief Cleanup the experiment name Function/S CleanupExperimentName(string expName) diff --git a/Packages/MIES/MIES_Utilities_GUI.ipf b/Packages/MIES/MIES_Utilities_GUI.ipf index d7bbcab752..f6a6b3ac84 100644 --- a/Packages/MIES/MIES_Utilities_GUI.ipf +++ b/Packages/MIES/MIES_Utilities_GUI.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_UTILS_GUI -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Utilities_GUI.ipf /// @brief utility functions for GUI @@ -667,7 +667,7 @@ Function HasPanelLatestVersion(string win, variable expectedVersion) #ifdef EVIL_KITTEN_EATING_MODE return 1 -#endif +#endif // EVIL_KITTEN_EATING_MODE version = GetPanelVersion(GetMainWindow(win)) diff --git a/Packages/MIES/MIES_Utilities_Generators.ipf b/Packages/MIES/MIES_Utilities_Generators.ipf index 8bca56fe8a..4b4b877854 100644 --- a/Packages/MIES/MIES_Utilities_Generators.ipf +++ b/Packages/MIES/MIES_Utilities_Generators.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_UTILS_GENERATORS -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Utilities_Generators.ipf /// @brief utility functions that generate code diff --git a/Packages/MIES/MIES_Utilities_JSON.ipf b/Packages/MIES/MIES_Utilities_JSON.ipf index 914fd86211..d0305d0fe6 100644 --- a/Packages/MIES/MIES_Utilities_JSON.ipf +++ b/Packages/MIES/MIES_Utilities_JSON.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_UTILS_JSON -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Utilities_JSON.ipf /// @brief utility functions for json diff --git a/Packages/MIES/MIES_Utilities_List.ipf b/Packages/MIES/MIES_Utilities_List.ipf index 2c1cbf843b..190fe2a61d 100644 --- a/Packages/MIES/MIES_Utilities_List.ipf +++ b/Packages/MIES/MIES_Utilities_List.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_UTILS_LIST -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Utilities_List.ipf /// @brief utility functions for lists diff --git a/Packages/MIES/MIES_Utilities_Numeric.ipf b/Packages/MIES/MIES_Utilities_Numeric.ipf index ec1684fc71..bc2fe0b91e 100644 --- a/Packages/MIES/MIES_Utilities_Numeric.ipf +++ b/Packages/MIES/MIES_Utilities_Numeric.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_UTILS_NUMERIC -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Utilities_Numeric.ipf /// @brief utility functions for numerical operations diff --git a/Packages/MIES/MIES_Utilities_ProgramFlow.ipf b/Packages/MIES/MIES_Utilities_ProgramFlow.ipf index 02341a2c53..2708c712fa 100644 --- a/Packages/MIES/MIES_Utilities_ProgramFlow.ipf +++ b/Packages/MIES/MIES_Utilities_ProgramFlow.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_UTILS_PROGRAMFLOW -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Utilities_ProgramFlow.ipf /// @brief utility functions for program flow @@ -340,7 +340,7 @@ threadsafe Function MU_RunningInMainThread() return V_value End -#endif +#endif // MACINTOSH /// @brief Return 1 if the function was already called with that argument, and 0 otherwise /// As named use or create a constant in @sa CalledOnceNames diff --git a/Packages/MIES/MIES_Utilities_SFHCheckers.ipf b/Packages/MIES/MIES_Utilities_SFHCheckers.ipf index f5f7b8b212..1211c343c5 100644 --- a/Packages/MIES/MIES_Utilities_SFHCheckers.ipf +++ b/Packages/MIES/MIES_Utilities_SFHCheckers.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_SFHCheckers -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Utilities_SFHCheckers.ipf /// @brief Threadsafe check functions which comply with either SFH_NumericChecker_Prototype or SFH_StringChecker_Prototype diff --git a/Packages/MIES/MIES_Utilities_Strings.ipf b/Packages/MIES/MIES_Utilities_Strings.ipf index 38a77bae58..85c85f968d 100644 --- a/Packages/MIES/MIES_Utilities_Strings.ipf +++ b/Packages/MIES/MIES_Utilities_Strings.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_UTILS_STRINGS -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Utilities_Strings.ipf /// @brief utility functions for string handling diff --git a/Packages/MIES/MIES_Utilities_System.ipf b/Packages/MIES/MIES_Utilities_System.ipf index 69abffcc69..bd5df83cc0 100644 --- a/Packages/MIES/MIES_Utilities_System.ipf +++ b/Packages/MIES/MIES_Utilities_System.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_UTILS_SYSTEM -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Utilities_System.ipf /// @brief utility functions for system operations @@ -122,7 +122,7 @@ Function/S GetIgorExecutable() return path + "Igor64.exe" #else return path + "Igor.exe" -#endif +#endif // IGOR64 End /// @brief Return the number of bits of the architecture diff --git a/Packages/MIES/MIES_Utilities_Time.ipf b/Packages/MIES/MIES_Utilities_Time.ipf index c177c73679..375f0e4dec 100644 --- a/Packages/MIES/MIES_Utilities_Time.ipf +++ b/Packages/MIES/MIES_Utilities_Time.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_UTILS_TIME -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Utilities_Time.ipf /// @brief utility functions for time/date related operations diff --git a/Packages/MIES/MIES_Utilities_WaveHandling.ipf b/Packages/MIES/MIES_Utilities_WaveHandling.ipf index ac4e65423e..c9e1377e5e 100644 --- a/Packages/MIES/MIES_Utilities_WaveHandling.ipf +++ b/Packages/MIES/MIES_Utilities_WaveHandling.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_UTILS_WAVEHANDLING -#endif +#endif // AUTOMATED_TESTING /// @file MIES_Utilities_WaveHandling.ipf /// @brief utility functions for wave handling diff --git a/Packages/MIES/MIES_WaveBuilder.ipf b/Packages/MIES/MIES_WaveBuilder.ipf index c8c607486e..f785924439 100644 --- a/Packages/MIES/MIES_WaveBuilder.ipf +++ b/Packages/MIES/MIES_WaveBuilder.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_WB -#endif +#endif // AUTOMATED_TESTING /// @file MIES_WaveBuilder.ipf /// @brief __WB__ Stimulus set creation diff --git a/Packages/MIES/MIES_WaveBuilderPanel.ipf b/Packages/MIES/MIES_WaveBuilderPanel.ipf index ca377dbf9d..a1119d0734 100644 --- a/Packages/MIES/MIES_WaveBuilderPanel.ipf +++ b/Packages/MIES/MIES_WaveBuilderPanel.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_WBP -#endif +#endif // AUTOMATED_TESTING /// @file MIES_WaveBuilderPanel.ipf /// @brief __WBP__ Panel for creating stimulus sets diff --git a/Packages/MIES/MIES_WaveBuilder_Macro.ipf b/Packages/MIES/MIES_WaveBuilder_Macro.ipf index 7973f7c357..bcd6b5009e 100644 --- a/Packages/MIES/MIES_WaveBuilder_Macro.ipf +++ b/Packages/MIES/MIES_WaveBuilder_Macro.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_WBPM -#endif +#endif // AUTOMATED_TESTING /// @file MIES_WaveBuilder_Macro.ipf /// @brief __WBPM__ WaveBuilder panel macro diff --git a/Packages/MIES/MIES_WaveDataFolderGetters.ipf b/Packages/MIES/MIES_WaveDataFolderGetters.ipf index 19783c0374..df60aff51c 100644 --- a/Packages/MIES/MIES_WaveDataFolderGetters.ipf +++ b/Packages/MIES/MIES_WaveDataFolderGetters.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_WAVEGETTERS -#endif +#endif // AUTOMATED_TESTING /// @file MIES_WaveDataFolderGetters.ipf /// diff --git a/Packages/MIES_Include.ipf b/Packages/MIES_Include.ipf index ad12cc4cf3..4a072b5b86 100644 --- a/Packages/MIES_Include.ipf +++ b/Packages/MIES_Include.ipf @@ -138,7 +138,7 @@ End #ifndef THREADING_DISABLED #include -#endif +#endif // !THREADING_DISABLED // third party includes #include "ACL_TabUtilities" @@ -290,4 +290,4 @@ End #include "MIES_WaveBuilder_Macro" #include "MIES_WaveDataFolderGetters" -#endif +#endif // TOO_OLD_IGOR diff --git a/Packages/doc/ipf/MIES_Regenerate-Screenshots.ipf b/Packages/doc/ipf/MIES_Regenerate-Screenshots.ipf index e0624dfc1c..d09c2ad5ad 100644 --- a/Packages/doc/ipf/MIES_Regenerate-Screenshots.ipf +++ b/Packages/doc/ipf/MIES_Regenerate-Screenshots.ipf @@ -4,7 +4,7 @@ #ifdef AUTOMATED_TESTING #pragma ModuleName=MIES_RS -#endif +#endif // AUTOMATED_TESTING static Function/S GetSavePath() diff --git a/Packages/tests/Basic/UTF_AsynFrameworkTest.ipf b/Packages/tests/Basic/UTF_AsynFrameworkTest.ipf index 22d2abd106..8cec00aa19 100644 --- a/Packages/tests/Basic/UTF_AsynFrameworkTest.ipf +++ b/Packages/tests/Basic/UTF_AsynFrameworkTest.ipf @@ -658,7 +658,7 @@ static Function TASYNC_StopForAssert() ASYNC_Stop(timeout = 1, fromAssert = 1) End -#endif +#endif // !THREADING_DISABLED /// @brief Test if ASYNC_Execute triggers execution and data is returned through readout. /// this test uses a worker returning no data folder @@ -1054,7 +1054,7 @@ static Function TASYNC_StopTimeOutForce() PASS() End -#endif +#endif // !THREADING_DISABLED /// @brief Test if a direct stop after pushing mixed workloads finishes all readouts properly on stopping attempt static Function TASYNC_IODiffWLDirectStop() diff --git a/Packages/tests/Basic/UTF_Utils_ProgramFlow.ipf b/Packages/tests/Basic/UTF_Utils_ProgramFlow.ipf index b602043b8f..fd49a86174 100644 --- a/Packages/tests/Basic/UTF_Utils_ProgramFlow.ipf +++ b/Packages/tests/Basic/UTF_Utils_ProgramFlow.ipf @@ -147,7 +147,7 @@ Function RunningInMainThread_Thread() CHECK_EQUAL_VAR(Sum(data), 0) End -#endif +#endif // !THREADING_DISABLED Function RunningInMainThread_Main() diff --git a/Packages/tests/Basic/UTF_Utils_WaveHandling.ipf b/Packages/tests/Basic/UTF_Utils_WaveHandling.ipf index 95fcc5b34a..7e64f5a022 100644 --- a/Packages/tests/Basic/UTF_Utils_WaveHandling.ipf +++ b/Packages/tests/Basic/UTF_Utils_WaveHandling.ipf @@ -850,7 +850,7 @@ Function WMCW_Works2() CHECK_EQUAL_VAR(V_numNans, DimSize(junkWave, ROWS)) End -#endif // THREADING_DISABLED +#endif // !THREADING_DISABLED /// @} diff --git a/Packages/tests/Basic/UTF_XOPsCompilation.ipf b/Packages/tests/Basic/UTF_XOPsCompilation.ipf index 86f16b5de6..eb615fad2b 100644 --- a/Packages/tests/Basic/UTF_XOPsCompilation.ipf +++ b/Packages/tests/Basic/UTF_XOPsCompilation.ipf @@ -20,5 +20,5 @@ static Function CheckCompilation_IGNORE() #ifdef WINDOWS // NWBv2 compound IPNWB_WriteCompound "" -#endif +#endif // WINDOWS End diff --git a/Packages/tests/Basic/UTF_ZeroMQPublishing.ipf b/Packages/tests/Basic/UTF_ZeroMQPublishing.ipf index f0d7c80c99..e85b7a6e9e 100644 --- a/Packages/tests/Basic/UTF_ZeroMQPublishing.ipf +++ b/Packages/tests/Basic/UTF_ZeroMQPublishing.ipf @@ -41,7 +41,7 @@ static Function FetchAndParseMessage(string filter) endfor print "///" print "/// \\endrst" -#endif +#endif // OUTPUT_DOCUMENTATION_JSON_DUMP return jsonID End diff --git a/Packages/tests/HardwareAnalysisFunctions/UTF_MultiPatchSeqFastRheoEstimate.ipf b/Packages/tests/HardwareAnalysisFunctions/UTF_MultiPatchSeqFastRheoEstimate.ipf index 3801149eca..699772493e 100644 --- a/Packages/tests/HardwareAnalysisFunctions/UTF_MultiPatchSeqFastRheoEstimate.ipf +++ b/Packages/tests/HardwareAnalysisFunctions/UTF_MultiPatchSeqFastRheoEstimate.ipf @@ -1092,7 +1092,7 @@ static Function MSQ_FRE11_REENTRY([string str]) sweepNo = 38 #else sweepNo = 39 -#endif +#endif // TESTS_WITH_NI_HARDWARE numEntries = sweepNo + 1 diff --git a/Packages/tests/HardwareAnalysisFunctions/UTF_PatchSeqRheobase.ipf b/Packages/tests/HardwareAnalysisFunctions/UTF_PatchSeqRheobase.ipf index 2e9dcb35f9..b41e7c1bc1 100644 --- a/Packages/tests/HardwareAnalysisFunctions/UTF_PatchSeqRheobase.ipf +++ b/Packages/tests/HardwareAnalysisFunctions/UTF_PatchSeqRheobase.ipf @@ -1090,7 +1090,7 @@ static Function PS_RB12_preAcq(string device) SetFinalDAScale(3999e-12) #else SetFinalDAScale(4090e-12) -#endif +#endif // TESTS_WITH_NI_HARDWARE End // UTF_TD_GENERATOR DeviceNameGeneratorMD1 @@ -1142,7 +1142,7 @@ static Function PS_RB12_REENTRY([string str]) finalDAScale = 3999e-12 #else finalDAScale = 4090e-12 -#endif +#endif // TESTS_WITH_NI_HARDWARE WAVE/Z stimScale = GetStimScaleFactor_IGNORE(sweepNo, str) Make/FREE/D/N=(numEntries) stimScaleRef = (p * PSQ_RB_DASCALE_STEP_LARGE + finalDAScale) * ONE_TO_PICO diff --git a/Packages/tests/HardwareAnalysisFunctions/UTF_PatchSeqSquarePulse.ipf b/Packages/tests/HardwareAnalysisFunctions/UTF_PatchSeqSquarePulse.ipf index f0106a441e..49a4692279 100644 --- a/Packages/tests/HardwareAnalysisFunctions/UTF_PatchSeqSquarePulse.ipf +++ b/Packages/tests/HardwareAnalysisFunctions/UTF_PatchSeqSquarePulse.ipf @@ -727,7 +727,7 @@ static Function PS_SP10_REENTRY([string str]) #else sweepNo = 39 numEntriesRef = sweepNo + 1 -#endif +#endif // TESTS_WITH_NI_HARDWARE WAVE numericalValues = GetLBNumericalValues(str) diff --git a/Packages/tests/HardwareBasic/UTF_BasicHardwareTests.ipf b/Packages/tests/HardwareBasic/UTF_BasicHardwareTests.ipf index ec42cee8a3..7fcd0d48c2 100644 --- a/Packages/tests/HardwareBasic/UTF_BasicHardwareTests.ipf +++ b/Packages/tests/HardwareBasic/UTF_BasicHardwareTests.ipf @@ -2345,7 +2345,7 @@ static Function TestNIAcquisitionReliability_REENTRY([string str]) CHECK_EQUAL_VAR(GetSetVariable(str, "SetVar_Sweep"), 1000) End -#endif +#endif // TESTS_WITH_NI_HARDWARE // IUTF_TD_GENERATOR s0:DeviceNameGeneratorMD1 // IUTF_TD_GENERATOR s1:DataGenerators#RoundTripStimsetFileType @@ -2482,7 +2482,7 @@ static Function GetDataLimitsCheckWorks_REENTRY([string str]) stimsetAColumnZeroLimit = 4095 stimsetAColumnOneLimit = 2047 stimsetEndingColumnZeroLimit = 1365 -#endif +#endif // TESTS_WITH_NI_HARDWARE // unassociated/unused headstage DAScaleLimit = DAP_GetDAScaleMax(str, 0, stimset, 0) diff --git a/Packages/tests/HardwareBasic/UTF_VeryBasicHardwareTests.ipf b/Packages/tests/HardwareBasic/UTF_VeryBasicHardwareTests.ipf index 15c9088d08..2f98d480b8 100644 --- a/Packages/tests/HardwareBasic/UTF_VeryBasicHardwareTests.ipf +++ b/Packages/tests/HardwareBasic/UTF_VeryBasicHardwareTests.ipf @@ -54,22 +54,22 @@ static Function CheckNumberOfRacksAndTTLs([string str]) #ifdef TESTS_WITH_ITC18USB_HARDWARE numRacksRef = 1 numTTlsRef = 4 -#endif +#endif // TESTS_WITH_ITC18USB_HARDWARE #ifdef TESTS_WITH_ITC1600_HARDWARE numRacksRef = 2 numTTlsRef = 8 -#endif +#endif // TESTS_WITH_ITC1600_HARDWARE #ifdef TESTS_WITH_NI_HARDWARE numRacksRef = NaN numTTlsRef = 32 -#endif +#endif // TESTS_WITH_NI_HARDWARE #ifdef TESTS_WITH_SUTTER_HARDWARE numRacksRef = NaN numTTlsRef = 8 -#endif +#endif // TESTS_WITH_SUTTER_HARDWARE CHECK_EQUAL_VAR(numRacksRef, deviceInfo[%RACK]) CHECK_EQUAL_VAR(numTTLsRef, deviceInfo[%TTL]) @@ -123,8 +123,8 @@ static Function CheckGetDeviceInfoValid([string str]) CHECK_EQUAL_VAR(wv[%Rack], NaN) #else CHECK_GE_VAR(wv[%Rack], 0) -#endif -#endif +#endif // TESTS_WITH_SUTTER_HARDWARE +#endif // TESTS_WITH_NI_HARDWARE CHECK_EQUAL_VAR(wv[%HardwareType], GetHardwareType(str)) End diff --git a/Packages/tests/PAPlot/UTF_PA_Tests.ipf b/Packages/tests/PAPlot/UTF_PA_Tests.ipf index acbee75c02..47218018bb 100644 --- a/Packages/tests/PAPlot/UTF_PA_Tests.ipf +++ b/Packages/tests/PAPlot/UTF_PA_Tests.ipf @@ -2807,4 +2807,4 @@ static Function PAT_ImagePlotSortOrder() endfor End -#endif +#endif // AUTOMATED_TESTING diff --git a/Packages/tests/UTF_Constants.ipf b/Packages/tests/UTF_Constants.ipf index 50cb63b4a9..0be68c93b3 100644 --- a/Packages/tests/UTF_Constants.ipf +++ b/Packages/tests/UTF_Constants.ipf @@ -7,7 +7,7 @@ Constant PSQ_TEST_HEADSTAGE = 0 #else Constant PSQ_TEST_HEADSTAGE = 2 -#endif +#endif // TESTS_WITH_SUTTER_HARDWARE StrConstant ZSTD_SUFFIX = ".zst" diff --git a/Packages/tests/UTF_DataGenerators.ipf b/Packages/tests/UTF_DataGenerators.ipf index 16d1cf1de9..941cf7042e 100644 --- a/Packages/tests/UTF_DataGenerators.ipf +++ b/Packages/tests/UTF_DataGenerators.ipf @@ -60,22 +60,22 @@ Function/WAVE DeviceNameGeneratorMD1() #ifdef TESTS_WITH_NI_HARDWARE devList = AddListItem("Dev1", devList, ":") lblList = AddListItem("NI", lblList) -#endif +#endif // TESTS_WITH_NI_HARDWARE #ifdef TESTS_WITH_ITC18USB_HARDWARE devList = AddListItem("ITC18USB_Dev_0", devList, ":") lblList = AddListItem("ITC", lblList) -#endif +#endif // TESTS_WITH_ITC18USB_HARDWARE #ifdef TESTS_WITH_ITC1600_HARDWARE devList = AddListItem("ITC1600_Dev_0", devList, ":") lblList = AddListItem("ITC1600", lblList) -#endif +#endif // TESTS_WITH_ITC1600_HARDWARE #ifdef TESTS_WITH_SUTTER_HARDWARE devList = AddListItem("IPA_E_100170", devList, ":") lblList = AddListItem("SUTTER", lblList) -#endif +#endif // TESTS_WITH_SUTTER_HARDWARE WAVE data = ListToTextWave(devList, ":") for(i = 0; i < DimSize(data, ROWS); i += 1) @@ -91,21 +91,21 @@ Function/WAVE DeviceNameGeneratorMD0() // NI Hardware has no single device support Make/FREE/T/N=0 data return data -#endif +#endif // TESTS_WITH_NI_HARDWARE #ifdef TESTS_WITH_SUTTER_HARDWARE // SUTTER Hardware has no single device support Make/FREE/T/N=0 data return data -#endif +#endif // TESTS_WITH_SUTTER_HARDWARE #ifdef TESTS_WITH_ITC18USB_HARDWARE return DeviceNameGeneratorMD1() -#endif +#endif // TESTS_WITH_ITC18USB_HARDWARE #ifdef TESTS_WITH_ITC1600_HARDWARE return DeviceNameGeneratorMD1() -#endif +#endif // TESTS_WITH_ITC1600_HARDWARE End @@ -163,12 +163,12 @@ Function/WAVE GetITCDevices() #ifdef TESTS_WITH_NI_HARDWARE Make/FREE/T/N=0 wv return wv -#endif +#endif // TESTS_WITH_NI_HARDWARE #ifdef TESTS_WITH_SUTTER_HARDWARE Make/FREE/T/N=0 wv return wv -#endif +#endif // TESTS_WITH_SUTTER_HARDWARE return DeviceNameGeneratorMD1() End @@ -315,8 +315,8 @@ static Function/WAVE EpochTestSamplingFrequencyTTL_Gen() #else #ifdef TESTS_WITH_ITC1600_HARDWARE wTemp[] = wTemp[p] == 100 ? NaN : wTemp[p] -#endif -#endif +#endif // TESTS_WITH_ITC1600_HARDWARE +#endif // TESTS_WITH_ITC18USB_HARDWARE WAVE w = ZapNaNs(wTemp) diff --git a/Packages/tests/UTF_HardwareHelperFunctions.ipf b/Packages/tests/UTF_HardwareHelperFunctions.ipf index 0b14e28c6c..c0956b1433 100644 --- a/Packages/tests/UTF_HardwareHelperFunctions.ipf +++ b/Packages/tests/UTF_HardwareHelperFunctions.ipf @@ -96,7 +96,7 @@ Function TEST_CASE_END_OVERRIDE(string name) #ifndef TESTS_WITH_NI_HARDWARE DQ_StopOngoingDAQAllLocked(DQ_STOP_REASON_INVALID) TP_StopTestPulseOnAllDevices() -#endif +#endif // !TESTS_WITH_NI_HARDWARE expensiveChecks = DoExpensiveChecks() @@ -1461,7 +1461,7 @@ Function AcquireData_NG(STRUCT DAQSettings &s, string device) endif WAVE deviceInfo = GetDeviceInfoWave(device) -#endif +#endif // TESTS_WITH_SUTTER_HARDWARE for(i = 0; i < NUM_HEADSTAGES; i += 1) @@ -1470,7 +1470,7 @@ Function AcquireData_NG(STRUCT DAQSettings &s, string device) if(s.hs[i] == 0) #ifndef TESTS_WITH_SUTTER_HARDWARE PGC_SetAndActivateControl(device, "button_Hardware_ClearChanConn") -#endif +#endif // !TESTS_WITH_SUTTER_HARDWARE continue endif @@ -1486,16 +1486,16 @@ Function AcquireData_NG(STRUCT DAQSettings &s, string device) PGC_SetAndActivateControl(device, "Popup_Settings_IC_DA", str = num2str(s.da[i])) PGC_SetAndActivateControl(device, "Popup_Settings_VC_AD", str = num2str(s.ad[i])) PGC_SetAndActivateControl(device, "Popup_Settings_IC_AD", str = num2str(s.ad[i])) -#endif +#endif // !TESTS_WITH_SUTTER_HARDWARE if(s.aso[i] != 1) #ifdef TESTS_WITH_SUTTER_HARDWARE INFO("Unassociated channel %d is setup on an existing HS", n0 = i) CHECK_GT_VAR(i + 1, deviceInfo[%DA]) -#endif +#endif // TESTS_WITH_SUTTER_HARDWARE #ifndef TESTS_WITH_SUTTER_HARDWARE PGC_SetAndActivateControl(device, "button_Hardware_ClearChanConn") -#endif +#endif // !TESTS_WITH_SUTTER_HARDWARE ctrl = GetPanelControl(s.da[i], CHANNEL_TYPE_DAC, CHANNEL_CONTROL_GAIN) PGC_SetAndActivateControl(device, ctrl, val = 1) ctrl = GetPanelControl(s.da[i], CHANNEL_TYPE_DAC, CHANNEL_CONTROL_CHECK) @@ -1522,7 +1522,7 @@ Function AcquireData_NG(STRUCT DAQSettings &s, string device) CHECK_EQUAL_VAR(i, s.da[i]) INFO("Requested AD channel %d for HS %d does not match fixed AD channel of Sutter HW setup", n0 = s.ad[i], n1 = i) CHECK_EQUAL_VAR(i, s.ad[i]) -#endif +#endif // TESTS_WITH_SUTTER_HARDWARE if(s.amp && activeHS < 2) // first entry is none @@ -1698,7 +1698,7 @@ Function GetMinSamplingInterval([string unit]) return factor * HARDWARE_SU_MIN_SAMPINT_ADC #else return factor * HARDWARE_ITC_MIN_SAMPINT -#endif +#endif // TESTS_WITH_NI_HARDWARE End /// @brief Open a DAEphys panel and lock it to the given device @@ -1744,7 +1744,7 @@ Function StartFakeThreadMonitor_IGNORE(string device, variable fixedFifoPos) BUG("Fake thread monitor and no threading is not supported.") #else ThreadStart tgID, 0, FakeThreadMonitor_IGNORE(fixedFifoPos) -#endif +#endif // THREADING_DISABLED End threadsafe static Function FakeThreadMonitor_IGNORE(variable fixedFifoPos) diff --git a/Packages/tests/UTF_HelperFunctions.ipf b/Packages/tests/UTF_HelperFunctions.ipf index 11286d82b4..e0de5f09c4 100644 --- a/Packages/tests/UTF_HelperFunctions.ipf +++ b/Packages/tests/UTF_HelperFunctions.ipf @@ -243,7 +243,7 @@ Function AdjustAnalysisParamsForPSQ(string device, string stimset) multiplier = 1 #else multiplier = 4 -#endif +#endif // TESTS_WITH_SUTTER_HARDWARE AFH_AddAnalysisParameter(stimset, "SamplingMultiplier", var = multiplier) AFH_AddAnalysisParameter(stimset, "SamplingFrequency", var = samplingFrequency) End @@ -1165,7 +1165,7 @@ Function DoExpensiveChecks() #ifdef AUTOMATED_TESTING_EXPENSIVE return 1 -#endif +#endif // AUTOMATED_TESTING_EXPENSIVE expensive = GetEnvironmentVariableAsBoolean("CI_EXPENSIVE_CHECKS") diff --git a/Packages/tests/UserAnalysisFunctions.ipf b/Packages/tests/UserAnalysisFunctions.ipf index 49842e0fa7..e9b1f5577c 100644 --- a/Packages/tests/UserAnalysisFunctions.ipf +++ b/Packages/tests/UserAnalysisFunctions.ipf @@ -6,7 +6,7 @@ #ifndef AUTOMATED_TESTING #define **error** Can only be used with automated testing -#endif +#endif // !AUTOMATED_TESTING Function CorrectFileMarker() @@ -51,7 +51,7 @@ Function ValidFunc_V1(string device, variable eventType, WAVE DAQDataWave, varia CHECK_EQUAL_VAR(NumberByKey("LOCK", WaveInfo(DAQDataWave, 0)), 0) #else CHECK_EQUAL_VAR(NumberByKey("LOCK", WaveInfo(DAQDataWave, 0)), 1) -#endif +#endif // TESTS_WITH_SUTTER_HARDWARE CHECK_EQUAL_VAR(headstage, 0) WAVE anaFuncTracker = TrackAnalysisFunctionCalls() @@ -81,7 +81,7 @@ Function ValidFunc_V2(string device, variable eventType, WAVE DAQDataWave, varia CHECK_EQUAL_VAR(NumberByKey("LOCK", WaveInfo(DAQDataWave, 0)), 0) #else CHECK_EQUAL_VAR(NumberByKey("LOCK", WaveInfo(DAQDataWave, 0)), 1) -#endif +#endif // TESTS_WITH_SUTTER_HARDWARE CHECK_EQUAL_VAR(headstage, 0) hardwareType = GetHardWareType(device) @@ -125,7 +125,7 @@ Function ValidMultHS_V1(string device, variable eventType, WAVE DAQDataWave, var CHECK_EQUAL_VAR(NumberByKey("LOCK", WaveInfo(DAQDataWave, 0)), 0) #else CHECK_EQUAL_VAR(NumberByKey("LOCK", WaveInfo(DAQDataWave, 0)), 1) -#endif +#endif // TESTS_WITH_SUTTER_HARDWARE WAVE anaFuncTracker = TrackAnalysisFunctionCalls() CHECK_GE_VAR(eventType, 0) diff --git a/tools/run-ipt.sh b/tools/run-ipt.sh index 9199141faa..b69b875cf5 100755 --- a/tools/run-ipt.sh +++ b/tools/run-ipt.sh @@ -29,7 +29,6 @@ while read -r line; do done < <(git ls-files ':(attr:ipt)') echo "exclude = BugproneMissingSwitchDefaultCase" >> config.toml -echo "exclude = CodeStyleEndIfComment" >> config.toml echo "exclude = ReadabilityMissingParenthesis" >> config.toml (cd $top_level && $ipt --arg-file config.toml lint -i) From d310915ab0e6f72f33894c619bd93a54e9b5c09c Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Tue, 4 Feb 2025 21:06:08 +0100 Subject: [PATCH 5/8] treewide: Fix ReadabilityMissingParenthesis for linter --- Packages/MIES/MIES_AcceleratedModifyGraph.ipf | 6 +-- Packages/MIES/MIES_AmplifierInteraction.ipf | 6 +-- Packages/MIES/MIES_AnalysisBrowser.ipf | 16 +++---- .../MIES_AnalysisBrowser_SweepBrowser.ipf | 2 +- .../MIES/MIES_AnalysisFunctionHelpers.ipf | 6 +-- Packages/MIES/MIES_AnalysisFunctions.ipf | 6 +-- .../MIES_AnalysisFunctions_MultiPatchSeq.ipf | 2 +- ...isFunctions_MultiPatchSeq_SpikeControl.ipf | 4 +- .../MIES/MIES_AnalysisFunctions_PatchSeq.ipf | 20 ++++---- Packages/MIES/MIES_Async.ipf | 4 +- Packages/MIES/MIES_Blowout.ipf | 4 +- Packages/MIES/MIES_BrowserSettingsPanel.ipf | 8 ++-- Packages/MIES/MIES_Browser_Plotter.ipf | 2 +- Packages/MIES/MIES_Cache.ipf | 2 +- Packages/MIES/MIES_Configuration.ipf | 8 ++-- Packages/MIES/MIES_DAC-Hardware.ipf | 8 ++-- Packages/MIES/MIES_DAEphys.ipf | 22 ++++----- Packages/MIES/MIES_DAEphys_GuiState.ipf | 2 +- Packages/MIES/MIES_DataAcquisition_Single.ipf | 2 +- Packages/MIES/MIES_DataConfigurator.ipf | 26 +++++----- Packages/MIES/MIES_EnhancedWMRoutines.ipf | 2 +- Packages/MIES/MIES_Epochs.ipf | 34 ++++++------- .../MIES/MIES_ExperimentDocumentation.ipf | 12 ++--- Packages/MIES/MIES_GuiPopupMenuExt.ipf | 10 ++-- Packages/MIES/MIES_GuiUtilities.ipf | 8 ++-- Packages/MIES/MIES_Indexing.ipf | 8 ++-- Packages/MIES/MIES_JSONWaveNotes.ipf | 2 +- Packages/MIES/MIES_LogbookViewer.ipf | 20 ++++---- .../MIES/MIES_MiesUtilities_Algorithm.ipf | 12 ++--- Packages/MIES/MIES_MiesUtilities_Channels.ipf | 12 ++--- Packages/MIES/MIES_MiesUtilities_Config.ipf | 2 +- .../MIES/MIES_MiesUtilities_Conversion.ipf | 2 +- Packages/MIES/MIES_MiesUtilities_Device.ipf | 6 +-- Packages/MIES/MIES_MiesUtilities_GUI.ipf | 4 +- Packages/MIES/MIES_MiesUtilities_Logbook.ipf | 6 +-- Packages/MIES/MIES_MiesUtilities_Logging.ipf | 4 +- .../MIES/MIES_MiesUtilities_Recreation.ipf | 2 +- Packages/MIES/MIES_MiesUtilities_Sweep.ipf | 4 +- Packages/MIES/MIES_MiesUtilities_Uploads.ipf | 6 +-- .../MIES/MIES_NeuroDataWithoutBorders.ipf | 4 +- ..._OptimzedOverlapDistributedAcquisition.ipf | 2 +- Packages/MIES/MIES_Oscilloscope.ipf | 4 +- Packages/MIES/MIES_OverlaySweeps.ipf | 4 +- Packages/MIES/MIES_PressureControl.ipf | 18 +++---- Packages/MIES/MIES_ProgrammaticGUIControl.ipf | 4 +- Packages/MIES/MIES_PulseAveraging.ipf | 48 +++++++++---------- Packages/MIES/MIES_SamplingInterval.ipf | 4 +- Packages/MIES/MIES_StimsetAPI.ipf | 2 +- Packages/MIES/MIES_SweepFormula.ipf | 20 ++++---- Packages/MIES/MIES_SweepFormula_Helpers.ipf | 4 +- Packages/MIES/MIES_SweepFormula_PSX.ipf | 18 +++---- Packages/MIES/MIES_SweepSaving.ipf | 2 +- Packages/MIES/MIES_TestPulse.ipf | 10 ++-- Packages/MIES/MIES_TraceUserData.ipf | 2 +- Packages/MIES/MIES_Utilities_Algorithm.ipf | 10 ++-- Packages/MIES/MIES_Utilities_Checks.ipf | 2 +- Packages/MIES/MIES_Utilities_DataFolder.ipf | 2 +- Packages/MIES/MIES_Utilities_File.ipf | 2 +- Packages/MIES/MIES_Utilities_GUI.ipf | 6 +-- Packages/MIES/MIES_Utilities_List.ipf | 2 +- Packages/MIES/MIES_Utilities_Numeric.ipf | 2 +- Packages/MIES/MIES_Utilities_ProgramFlow.ipf | 2 +- Packages/MIES/MIES_Utilities_System.ipf | 2 +- Packages/MIES/MIES_Utilities_WaveHandling.ipf | 10 ++-- Packages/MIES/MIES_WaveBuilder.ipf | 16 +++---- Packages/MIES/MIES_WaveBuilderPanel.ipf | 4 +- Packages/MIES/MIES_WaveDataFolderGetters.ipf | 6 +-- .../Basic/UTF_AnalysisFunctionHelpers.ipf | 4 +- .../tests/Basic/UTF_AsynFrameworkTest.ipf | 18 +++---- .../Basic/UTF_SweepFormula_Operations.ipf | 8 ++-- Packages/tests/Basic/UTF_SweepFormula_PSX.ipf | 12 ++--- .../UTF_PatchSeqDAScale_Adapt.ipf | 2 +- .../HardwareBasic/UTF_BasicHardwareTests.ipf | 2 +- Packages/tests/HardwareBasic/UTF_Epochs.ipf | 6 +-- Packages/tests/PAPlot/UTF_PA_Tests.ipf | 14 +++--- Packages/tests/UTF_DataGenerators.ipf | 6 +-- .../tests/UTF_HardwareHelperFunctions.ipf | 4 +- tools/run-ipt.sh | 1 - 78 files changed, 300 insertions(+), 301 deletions(-) diff --git a/Packages/MIES/MIES_AcceleratedModifyGraph.ipf b/Packages/MIES/MIES_AcceleratedModifyGraph.ipf index a60440cc8e..5962dbff92 100644 --- a/Packages/MIES/MIES_AcceleratedModifyGraph.ipf +++ b/Packages/MIES/MIES_AcceleratedModifyGraph.ipf @@ -47,7 +47,7 @@ static Function/S GenerateValueString(variable type, variable keywordIndex, vari break case GEN_TYPE_WAVE: for(i = 0; i < numEntryCols; i += 1) - sprintf str, "s%d[h%s][%d]%s", keywordIndex, indexStr, i, SelectString(i < numEntryCols - 1, "", ",") + sprintf str, "s%d[h%s][%d]%s", keywordIndex, indexStr, i, SelectString(i < (numEntryCols - 1), "", ",") result += str endfor @@ -84,13 +84,13 @@ static Function GenerateAcceleratedModifyGraphCaseImpl(WAVE/T keyword, variable for(j = 0; j < numKeywords; j += 1) printf "%s($w[h%s])=%s", keyword[j], indexStr, GenerateValueString(type[j], j, numEntryCols[j], indexStr) - if(j < numKeywords - 1) + if(j < (numKeywords - 1)) printf "," endif endfor if(mod(i + 1, 8) == 0) - if(i + 1 != numEntries) + if((i + 1) != numEntries) printf " \\" endif diff --git a/Packages/MIES/MIES_AmplifierInteraction.ipf b/Packages/MIES/MIES_AmplifierInteraction.ipf index 29d731ea03..af1bf63591 100644 --- a/Packages/MIES/MIES_AmplifierInteraction.ipf +++ b/Packages/MIES/MIES_AmplifierInteraction.ipf @@ -230,7 +230,7 @@ Function AI_UpdateAmpModel(string device, string ctrl, variable headStage, [vari WAVE statusHS = DAG_GetChannelState(device, CHANNEL_TYPE_HEADSTAGE) if(!sendToAll) - statusHS[] = (p == headStage ? 1 : 0) + statusHS[] = ((p == headStage) ? 1 : 0) endif if(!CheckIfValueIsInsideLimits(device, ctrl, value)) @@ -887,7 +887,7 @@ Function AI_GetHoldingCommand(string device, variable headstage) return NaN endif - return MCC_GetHoldingEnable() ? MCC_GetHolding() * AI_GetMCCScale(MCC_GetMode(), MCC_GETHOLDING_FUNC) : 0 + return MCC_GetHoldingEnable() ? (MCC_GetHolding() * AI_GetMCCScale(MCC_GetMode(), MCC_GETHOLDING_FUNC)) : 0 End /// @brief Return the clamp mode of the headstage as returned by the amplifier @@ -1593,7 +1593,7 @@ Function AI_QueryGainsFromMCC(string device) AI_SetClampMode(device, i, old_clampMode) else printf "It appears that a holding potential is being applied, therefore as a precaution, " - printf "the gains cannot be imported for the %s.\r", ConvertAmplifierModeToString(clampMode == V_CLAMP_MODE ? I_CLAMP_MODE : V_CLAMP_MODE) + printf "the gains cannot be imported for the %s.\r", ConvertAmplifierModeToString((clampMode == V_CLAMP_MODE) ? I_CLAMP_MODE : V_CLAMP_MODE) printf "The gains were successfully imported for the %s on i: %d\r", ConvertAmplifierModeToString(clampMode), i endif endfor diff --git a/Packages/MIES/MIES_AnalysisBrowser.ipf b/Packages/MIES/MIES_AnalysisBrowser.ipf index f678ae1767..1b61ed0f0b 100644 --- a/Packages/MIES/MIES_AnalysisBrowser.ipf +++ b/Packages/MIES/MIES_AnalysisBrowser.ipf @@ -174,7 +174,7 @@ static Function AB_RemoveMapEntry(variable index) endif map[index][] = "" - if(index + 1 == GetNumberFromWaveNote(map, NOTE_INDEX)) + if((index + 1) == GetNumberFromWaveNote(map, NOTE_INDEX)) SetNumberInWaveNote(map, NOTE_INDEX, index) endif End @@ -1370,7 +1370,7 @@ static Function AB_CollapseListEntry(variable row, variable col) WAVE expBrowserSelBak = CreateBackupWave(expBrowserSel) mask = expBrowserSel[row][col] - ASSERT(mask & LISTBOX_TREEVIEW && !(mask & LISTBOX_TREEVIEW_EXPANDED), "listbox entry is not a treeview expansion node or is already collapsed") + ASSERT((mask & LISTBOX_TREEVIEW) && !(mask & LISTBOX_TREEVIEW_EXPANDED), "listbox entry is not a treeview expansion node or is already collapsed") last = AB_GetRowWithNextTreeView(expBrowserSel, row, col) colSize = DimSize(expBrowserSel, COLS) @@ -1403,14 +1403,14 @@ static Function AB_ExpandListEntry(variable row, variable col) WAVE expBrowserSelBak = CreateBackupWave(expBrowserSel) mask = expBrowserSel[row][col] - ASSERT(mask & LISTBOX_TREEVIEW && mask & LISTBOX_TREEVIEW_EXPANDED, "listbox entry is not a treeview expansion node or already expanded") + ASSERT((mask & LISTBOX_TREEVIEW) && (mask & LISTBOX_TREEVIEW_EXPANDED), "listbox entry is not a treeview expansion node or already expanded") lastExpandedRow = NaN last = AB_GetRowWithNextTreeView(expBrowserSel, row, col) colSize = DimSize(expBrowserSel, COLS) for(i = last - 1; i >= row; i -= 1) for(j = colSize - 1; j >= col; j -= 1) - val = i == row && j == col ? ClearBit(mask, LISTBOX_TREEVIEW_EXPANDED) : expBrowserSel[i][j] + val = (i == row && j == col) ? ClearBit(mask, LISTBOX_TREEVIEW_EXPANDED) : expBrowserSel[i][j] if(!(val & LISTBOX_TREEVIEW)) continue endif @@ -1537,7 +1537,7 @@ static Function AB_LoadFromExpandedRange(variable row, variable subSectionColumn endif device = "" else - if(expBrowserSel[j][EXPERIMENT_TREEVIEW_COLUMN] & LISTBOX_TREEVIEW || expBrowserSel[j][DEVICE_TREEVIEW_COLUMN] & LISTBOX_TREEVIEW) + if((expBrowserSel[j][EXPERIMENT_TREEVIEW_COLUMN] & LISTBOX_TREEVIEW) || (expBrowserSel[j][DEVICE_TREEVIEW_COLUMN] & LISTBOX_TREEVIEW)) // ignore rows with tree view icons, we have them already in our list continue endif @@ -1598,7 +1598,7 @@ static Function AB_GetRowWithNextTreeView(WAVE selWave, variable startRow, varia numRows = DimSize(selWave, ROWS) for(i = startRow + 1; i < numRows; i += 1) - status[] = (selWave[i][p] & LISTBOX_TREEVIEW ? 1 : 0) + status[] = ((selWave[i][p] & LISTBOX_TREEVIEW) ? 1 : 0) if(Sum(status, 0, col) > 0) return i @@ -2033,7 +2033,7 @@ static Function AB_SortConfigSweeps(WAVE/I config) Make/FREE/N=(numRows)/I/U valindex = p //sort order: XOP_CHANNEL_TYPE_DAC = 1, XOP_CHANNEL_TYPE_ADC = 0, XOP_CHANNEL_TYPE_TTL = 3 - MultiThread keyPrimary[] = config[p][%type] == XOP_CHANNEL_TYPE_ADC ? 2 : config[p][%type] + MultiThread keyPrimary[] = (config[p][%type] == XOP_CHANNEL_TYPE_ADC) ? 2 : config[p][%type] MultiThread keySecondary[] = config[p][%number] Sort/A {keyPrimary, keySecondary}, valindex @@ -2523,7 +2523,7 @@ static Function AB_AddExperimentEntries(string win, WAVE/T entries) ControlWindowToFront() continue endif - if(sTime < stopMSTimer(-2) * MILLI_TO_ONE) + if(sTime < (stopMSTimer(-2) * MILLI_TO_ONE)) sprintf title, "%s, Reading %s", panel, GetFile(fName) DoWindow/T $panel, title DoUpdate/W=$panel diff --git a/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser.ipf b/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser.ipf index 477934c1d1..0aa2a2912c 100644 --- a/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser.ipf +++ b/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser.ipf @@ -47,7 +47,7 @@ static Function SB_GetSweepIndexFromMap(WAVE/T sweepMap, variable sweepNo) V_row = dummy #endif // AUTOMATED_TESTING - return V_row == -1 ? NaN : V_row + return (V_row == -1) ? NaN : V_row End /// @brief Return the sweep data folder for either a given index or sweepNo diff --git a/Packages/MIES/MIES_AnalysisFunctionHelpers.ipf b/Packages/MIES/MIES_AnalysisFunctionHelpers.ipf index 1239ea21aa..0a28a4d89d 100644 --- a/Packages/MIES/MIES_AnalysisFunctionHelpers.ipf +++ b/Packages/MIES/MIES_AnalysisFunctionHelpers.ipf @@ -485,7 +485,7 @@ Function/S AFH_GetListOfAnalysisParams(string func, variable mode) re = "\[.+\]" - if(mode & REQUIRED_PARAMS && mode & OPTIONAL_PARAMS) + if((mode & REQUIRED_PARAMS) && (mode & OPTIONAL_PARAMS)) return ReplaceString("[", ReplaceString("]", params, ""), "") elseif(mode & REQUIRED_PARAMS) return GrepList(params, re, 1, ",") @@ -966,7 +966,7 @@ Function AFH_AddAnalysisParameter(string setName, string name, [variable var, st WAVE/Z/T WPT = WB_GetWaveTextParamForSet(setName) ASSERT(WaveExists(WPT), "Missing stimset") - ASSERT(ParamIsDefault(var) + ParamIsDefault(str) + ParamIsDefault(wv) == 2, "Expected one of var, str or wv") + ASSERT((ParamIsDefault(var) + ParamIsDefault(str) + ParamIsDefault(wv)) == 2, "Expected one of var, str or wv") if(!ParamIsDefault(var)) return WB_AddAnalysisParameterIntoWPT(WPT, name, var = var) @@ -990,7 +990,7 @@ Function AFH_AddAnalysisParameterToParams(string ¶ms, string name, [variable string type, value - ASSERT(ParamIsDefault(var) + ParamIsDefault(str) + ParamIsDefault(wv) == 2, "Expected one of var, str or wv") + ASSERT((ParamIsDefault(var) + ParamIsDefault(str) + ParamIsDefault(wv)) == 2, "Expected one of var, str or wv") if(!ParamIsDefault(var)) type = "variable" diff --git a/Packages/MIES/MIES_AnalysisFunctions.ipf b/Packages/MIES/MIES_AnalysisFunctions.ipf index 422308ac77..4905f60c9a 100644 --- a/Packages/MIES/MIES_AnalysisFunctions.ipf +++ b/Packages/MIES/MIES_AnalysisFunctions.ipf @@ -662,7 +662,7 @@ Function AdjustDAScale(string device, variable eventType, WAVE DAQDataWave, vari PGC_SetAndActivateControl(device, ctrl, val = DAScales[index]) endif - sprintf msg, "(%s, %d): DAScale = %g", device, headstage, (index < DimSize(DAScales, ROWS) ? DAScales[index] : NaN) + sprintf msg, "(%s, %d): DAScale = %g", device, headstage, ((index < DimSize(DAScales, ROWS)) ? DAScales[index] : NaN) DEBUGPRINT(msg) // index equals the number of sweeps in the stimset on the last call (*post* sweep event) @@ -878,7 +878,7 @@ Function SetDAScaleModOp(string device, variable sweepNo, variable headstage, va case "+": return SetDAScale(device, sweepNo, headstage, offset = invert ? -modifier : modifier, roundTopA = roundTopA, limitCheck = limitCheck) case "*": - return SetDAScale(device, sweepNo, headstage, relative = invert ? 1 / modifier : modifier, roundTopA = roundTopA, limitCheck = limitCheck) + return SetDAScale(device, sweepNo, headstage, relative = invert ? (1 / modifier) : modifier, roundTopA = roundTopA, limitCheck = limitCheck) default: ASSERT(0, "Invalid operator") break @@ -904,7 +904,7 @@ Function SetDAScale(string device, variable sweepNo, variable headstage, [variab variable amps, DAC, nextStimsetColumn, DAScaleLimit, skipCountExisting, setCount string DAUnit, ctrl, lbl, stimSetName - ASSERT(ParamIsDefault(absolute) + ParamIsDefault(relative) + ParamIsDefault(offset) == 2, "One of absolute, relative or offset has to be present") + ASSERT((ParamIsDefault(absolute) + ParamIsDefault(relative) + ParamIsDefault(offset)) == 2, "One of absolute, relative or offset has to be present") if(ParamIsDefault(roundTopA)) roundTopA = 0 diff --git a/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq.ipf b/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq.ipf index c3f810d4d7..e64f483a5c 100644 --- a/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq.ipf +++ b/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq.ipf @@ -337,7 +337,7 @@ static Function/WAVE MSQ_SearchForSpikes(string device, variable type, WAVE swee endif WAVE spikeDetection = LBN_GetNumericWave() - spikeDetection = (p == headstage ? 0 : defaultValue) + spikeDetection = ((p == headstage) ? 0 : defaultValue) sprintf msg, "Type %d, headstage %d, totalOnsetDelay %g, numberOfSpikes %d", type, headstage, totalOnsetDelay, numberOfSpikes DEBUGPRINT(msg) diff --git a/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq_SpikeControl.ipf b/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq_SpikeControl.ipf index 9861618993..9518112b27 100644 --- a/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq_SpikeControl.ipf +++ b/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq_SpikeControl.ipf @@ -46,7 +46,7 @@ static Function [variable minTrials, variable maxTrials] SC_GetTrials(string dev if(EqualWaves(setSweepCountPrev, setSweepCount, EQWAVES_DATA) && EqualWaves(stimsetAcqCycleIDPrev, stimsetAcqCycleID, EQWAVES_DATA)) trialsLBN[0, NUM_HEADSTAGES - 1] += (statusHS[p] == 1) else - trialsLBN[0, NUM_HEADSTAGES - 1] = (statusHS[p] == 1 ? 0 : NaN) + trialsLBN[0, NUM_HEADSTAGES - 1] = ((statusHS[p] == 1) ? 0 : NaN) endif key = CreateAnaFuncLBNKey(SC_SPIKE_CONTROL, MSQ_FMT_LBN_RERUN_TRIAL) @@ -1089,7 +1089,7 @@ Function SC_SpikeControl(string device, STRUCT AnalysisFunction_V3 &s) ED_AddEntryToLabnotebook(device, key, rerunExceeded, unit = LABNOTEBOOK_BINARY_UNIT, overrideSweepNo = s.sweepNo) WAVE trialsLBN = LBN_GetNumericWave() - trialsLBN[0, NUM_HEADSTAGES - 1] = (statusHS[p] == 1 ? 0 : NaN) + trialsLBN[0, NUM_HEADSTAGES - 1] = ((statusHS[p] == 1) ? 0 : NaN) key = CreateAnaFuncLBNKey(SC_SPIKE_CONTROL, MSQ_FMT_LBN_RERUN_TRIAL) ED_AddEntryToLabnotebook(device, key, trialsLBN, overrideSweepNo = s.sweepNo) diff --git a/Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf b/Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf index b90d427eea..d95ccaa080 100644 --- a/Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf +++ b/Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf @@ -433,7 +433,7 @@ static Function [variable ret, variable chunk] PSQ_EvaluateBaselineChunks(string // NaN: not enough data for check // last chunk was only partially present and so can never pass - if(i == numBaselineChunks - 1 && s.lastKnownRowIndexAD == s.lastValidRowIndexAD) + if(i == (numBaselineChunks - 1) && s.lastKnownRowIndexAD == s.lastValidRowIndexAD) ret = PSQ_BL_FAILED endif @@ -475,7 +475,7 @@ Function [variable chunkStartTimeMax, variable chunkLengthTime] PSQ_GetBaselineC ASSERT(!chunk || (chunk && WaveExists(durations)), "Need durations wave") chunkLengthTime = chunk ? ps.postPulseChunkLength : ps.prePulseChunkLength // for chunk > 0: skip onset delay, the pulse itself and one chunk of post pulse baseline - chunkStartTimeMax = chunk ? (totalOnsetDelayMS + ps.prePulseChunkLength + WaveMax(durations)) + chunk * ps.postPulseChunkLength : totalOnsetDelayMS + chunkStartTimeMax = chunk ? ((totalOnsetDelayMS + ps.prePulseChunkLength + WaveMax(durations)) + chunk * ps.postPulseChunkLength) : totalOnsetDelayMS return [chunkStartTimeMax, chunkLengthTime] End @@ -555,7 +555,7 @@ static Function PSQ_EvaluateBaselineProperties(string device, STRUCT AnalysisFun endif // not enough data to evaluate - if(fifoInStimsetTime + totalOnsetDelay < chunkStartTimeMax + chunkLengthTime) + if((fifoInStimsetTime + totalOnsetDelay) < (chunkStartTimeMax + chunkLengthTime)) return NaN endif @@ -978,7 +978,7 @@ static Function PSQ_Calculate(WAVE wv, variable column, variable startTime, vari startPoints = trunc(startTime / DimDelta(channel, ROWS)) rangePoints = max(trunc(rangeTime / DimDelta(channel, ROWS)), 1) - if(startPoints + rangePoints >= DimSize(channel, ROWS)) + if((startPoints + rangePoints) >= DimSize(channel, ROWS)) rangePoints = max(trunc(DimSize(channel, ROWS) - startPoints - 1), 1) endif @@ -1379,7 +1379,7 @@ static Function/WAVE PSQ_SearchForSpikes(string device, variable type, WAVE swee string msg WAVE spikeDetection = LBN_GetNumericWave() - spikeDetection = (p == headstage ? 0 : NaN) + spikeDetection = ((p == headstage) ? 0 : NaN) WAVE config = AFH_GetConfigWave(device, sweepWave) @@ -2560,7 +2560,7 @@ static Function PSQ_DS_CalculateReachedFinalSlope(variable validFit, WAVE fitSlo return validFit \ && IsFinite(fitSlope) \ && IsFinite(maxSlope) \ - && (fitSlope < maxSlope * (1 - (slopePercentage * PERCENT_TO_ONE))) \ + && (fitSlope < (maxSlope * (1 - (slopePercentage * PERCENT_TO_ONE)))) \ && PSQ_DS_IsValidFitSlopePosition(fitSlopes, DAScales, fitSlope, maxSlope) End @@ -3023,11 +3023,11 @@ static Function/WAVE PSQ_DS_FilterPassingData(WAVE/Z data, WAVE/Z booleanQC, [va Duplicate/FREE data, indices if(inBetween) - ASSERT(DimSize(data, ROWS) + 1 == DimSize(booleanQC, ROWS), "Umatched wave sizes for inBetween") - indices[] = booleanQC[p + 1] == 1 ? NaN : p + ASSERT((DimSize(data, ROWS) + 1) == DimSize(booleanQC, ROWS), "Umatched wave sizes for inBetween") + indices[] = (booleanQC[p + 1] == 1) ? NaN : p else ASSERT(DimSize(data, ROWS) == DimSize(booleanQC, ROWS), "Umatched wave sizes for inBetween") - indices[] = booleanQC[p] == 1 ? NaN : p + indices[] = (booleanQC[p] == 1) ? NaN : p endif WAVE/Z indicesToRemove = ZapNaNs(indices) @@ -5423,7 +5423,7 @@ Function PSQ_Ramp(string device, STRUCT AnalysisFunction_V3 &s) // recalculate pulse duration PSQ_GetPulseDurations(device, PSQ_RAMP, s.sweepNo, totalOnsetDelay, forceRecalculation = 1) - elseif(fifoInStimsetTime > pulseStart + pulseDuration) + elseif(fifoInStimsetTime > (pulseStart + pulseDuration)) // we are past the pulse and have not found a spike // write the results into the LBN key = CreateAnaFuncLBNKey(PSQ_RAMP, PSQ_FMT_LBN_SPIKE_DETECT) diff --git a/Packages/MIES/MIES_Async.ipf b/Packages/MIES/MIES_Async.ipf index b329b02cd5..e98649385d 100644 --- a/Packages/MIES/MIES_Async.ipf +++ b/Packages/MIES/MIES_Async.ipf @@ -208,7 +208,7 @@ Function ASYNC_ThreadReadOut() SVAR workloadClass = dfr:$ASYNC_WORKLOADCLASS_STR wlcIndex = FindDimLabel(track, ROWS, workloadClass) ASSERT(wlcIndex >= 0, "Could not find work load class") - if(workloadClassCounter[0] - track[wlcIndex][%OUTPUTCOUNT] == 0) + if((workloadClassCounter[0] - track[wlcIndex][%OUTPUTCOUNT]) == 0) DeletePoints i, 1, DFREFbuffer break endif @@ -227,7 +227,7 @@ Function ASYNC_ThreadReadOut() WAVE workloadClassCounter = dfr:$ASYNC_WLCOUNTER_STR wlcIndex = FindDimLabel(track, ROWS, workloadClass) ASSERT(wlcIndex >= 0, "Could not find work load class") - if(workloadClassCounter[0] - track[wlcIndex][%OUTPUTCOUNT] != 0) + if((workloadClassCounter[0] - track[wlcIndex][%OUTPUTCOUNT]) != 0) bufferSize = numpnts(DFREFbuffer) Redimension/N=(bufferSize + 1) DFREFbuffer DFREFbuffer[bufferSize] = dfr diff --git a/Packages/MIES/MIES_Blowout.ipf b/Packages/MIES/MIES_Blowout.ipf index 85ae90ea33..323b64a546 100644 --- a/Packages/MIES/MIES_Blowout.ipf +++ b/Packages/MIES/MIES_Blowout.ipf @@ -151,7 +151,7 @@ static Function BWO_InitParaPipetteClear(string device) do TPM_BkrdTPFuncMD(s) DoUpdate/W=$SCOPE_GetPanel (device) - while(ticks - startTime < 90) // wait for 1.5 seconds but update oscilloscope + while((ticks - startTime) < 90) // wait for 1.5 seconds but update oscilloscope PGC_SetAndActivateControl(device, "button_DataAcq_SSSetPressureMan") // turn OFF manual pressure PGC_SetAndActivateControl(device, "check_DataAcq_ManPressureAll", val = CHECKBOX_UNSELECTED) // turn off apply pressure mode to all HS End @@ -197,7 +197,7 @@ static Function BWO_CheckAndClearPipettes(string device) endif TPM_BkrdTPFuncMD(s) DoUpdate/W=$SCOPE_GetPanel (device) - while(TPResults[%ResistanceSteadyState][i] > BWO_MAX_RESISTANCE && ticks - startTime < FIFTEEN_SECONDS) // continue if the pipette is not clear AND the timeout hasn't been exceeded + while(TPResults[%ResistanceSteadyState][i] > BWO_MAX_RESISTANCE && (ticks - startTime) < FIFTEEN_SECONDS) // continue if the pipette is not clear AND the timeout hasn't been exceeded PGC_SetAndActivateControl(device, "button_DataAcq_SSSetPressureMan") // turn off manual pressure PGC_SetAndActivateControl(device, "setvar_DataAcq_SSPressure", val = 0) diff --git a/Packages/MIES/MIES_BrowserSettingsPanel.ipf b/Packages/MIES/MIES_BrowserSettingsPanel.ipf index e97e426183..15ed7749a8 100644 --- a/Packages/MIES/MIES_BrowserSettingsPanel.ipf +++ b/Packages/MIES/MIES_BrowserSettingsPanel.ipf @@ -254,7 +254,7 @@ Function BSP_SweepFormulaHook(STRUCT WMWinHookStruct &s) switch(s.eventCode) case EVENT_WINDOW_HOOK_KEYBOARD: // keyboard - if(s.specialKeyCode == 200 && s.eventMod & WINDOW_HOOK_EMOD_SHIFTKEYDOWN) // Enter + Shift + if(s.specialKeyCode == 200 && (s.eventMod & WINDOW_HOOK_EMOD_SHIFTKEYDOWN)) // Enter + Shift win = GetMainWindow(s.winName) bsPanel = BSP_GetPanel(win) @@ -298,7 +298,7 @@ Function BSP_BindListBoxWaves(string win) string mainPanel, bsPanel - ASSERT(BSP_IsDataBrowser(win) && BSP_HasBoundDevice(win) || !BSP_IsDataBrowser(win), "DataBrowser needs bound device to bind listBox waves.") + ASSERT((BSP_IsDataBrowser(win) && BSP_HasBoundDevice(win)) || !BSP_IsDataBrowser(win), "DataBrowser needs bound device to bind listBox waves.") mainPanel = GetMainWindow(win) bsPanel = BSP_GetPanel(win) @@ -751,7 +751,7 @@ Function BSP_SliderProc_ChangedSetting(STRUCT WMSliderAction &spa) : SliderContr string win - if(spa.eventCode > 0 && spa.eventCode & 0x1) + if(spa.eventCode > 0 && (spa.eventCode & 0x1)) win = spa.win UpdateSweepPlot(win) endif @@ -1103,7 +1103,7 @@ Function BSP_ScaleAxes(string win) equalY = GetCheckBoxState(bsPanel, "check_Display_EqualYrange") && !IsControlDisabled(bsPanel, "check_Display_EqualYrange") equalYIgn = GetCheckBoxState(bsPanel, "check_Display_EqualYignore") && !IsControlDisabled(bsPanel, "check_Display_EqualYignore") - ASSERT(visXRange + equalY + equalYIgn <= 1, "Only one scaling mode is allowed to be selected") + ASSERT((visXRange + equalY + equalYIgn) <= 1, "Only one scaling mode is allowed to be selected") if(visXRange) AutoscaleVertAxisVisXRange(graph) diff --git a/Packages/MIES/MIES_Browser_Plotter.ipf b/Packages/MIES/MIES_Browser_Plotter.ipf index 7552c8de75..60457b4c51 100644 --- a/Packages/MIES/MIES_Browser_Plotter.ipf +++ b/Packages/MIES/MIES_Browser_Plotter.ipf @@ -346,7 +346,7 @@ Function CreateTiledChannelGraph(string graph, WAVE config, variable sweepNo, WA // waves per channel type for(j = 0; j < numVertWaves; j += 1) - ttlBit = channelType == XOP_CHANNEL_TYPE_TTL && tgs.splitTTLBits ? j : NaN + ttlBit = (channelType == XOP_CHANNEL_TYPE_TTL && tgs.splitTTLBits) ? j : NaN if(channelType == XOP_CHANNEL_TYPE_TTL) guiChannelNumber = channelMapHWToGUI[chan][IsNaN(ttlBit) ? 0 : ttlBit] diff --git a/Packages/MIES/MIES_Cache.ipf b/Packages/MIES/MIES_Cache.ipf index 065825f6e1..174edc5143 100644 --- a/Packages/MIES/MIES_Cache.ipf +++ b/Packages/MIES/MIES_Cache.ipf @@ -591,7 +591,7 @@ threadsafe static Function CA_GetCacheIndex(WAVE keys, string key) FindValue/TXOP=4/TEXT=key/RMD=[0, numFilledRows] keys - return V_Value == -1 ? NaN : V_Value + return (V_Value == -1) ? NaN : V_Value End /// @brief Try to fetch the wave stored under key from the cache diff --git a/Packages/MIES/MIES_Configuration.ipf b/Packages/MIES/MIES_Configuration.ipf index 38a3bd8e85..40b3af54c0 100644 --- a/Packages/MIES/MIES_Configuration.ipf +++ b/Packages/MIES/MIES_Configuration.ipf @@ -1376,7 +1376,7 @@ static Function CONF_RestoreControl(string wName, variable restoreMask, variable endif endif elseif(ctrlType == CONTROL_TYPE_POPUPMENU) - if(restoreMask & EXPCONFIG_SAVE_POPUPMENU_AS_INDEX_ONLY && !(restoreMask & EXPCONFIG_SAVE_ONLY_RELEVANT)) + if((restoreMask & EXPCONFIG_SAVE_POPUPMENU_AS_INDEX_ONLY) && !(restoreMask & EXPCONFIG_SAVE_ONLY_RELEVANT)) val = JSON_GetVariable(jsonID, jsonPath + EXPCONFIG_FIELD_CTRLVVALUE) PGC_SetAndActivateControl(wName, ctrlName, val = val, mode = PGC_MODE_SKIP_ON_DISABLED) else @@ -1774,7 +1774,7 @@ static Function CONF_ControlToJSON(string wName, string ctrlName, variable saveM JSON_AddString(jsonID, ctrlPath + EXPCONFIG_FIELD_CTRLSDF, S_DataFolder) endif elseif(ctrlType == CONTROL_TYPE_POPUPMENU) - if(saveMask & EXPCONFIG_SAVE_POPUPMENU_AS_STRING_ONLY || saveMask & EXPCONFIG_SAVE_ONLY_RELEVANT) + if((saveMask & EXPCONFIG_SAVE_POPUPMENU_AS_STRING_ONLY) || (saveMask & EXPCONFIG_SAVE_ONLY_RELEVANT)) JSON_AddString(jsonID, ctrlPath + EXPCONFIG_FIELD_CTRLSVALUE, S_Value) elseif(saveMask & EXPCONFIG_SAVE_POPUPMENU_AS_INDEX_ONLY) JSON_AddVariable(jsonID, ctrlPath + EXPCONFIG_FIELD_CTRLVVALUE, V_Value) @@ -1868,7 +1868,7 @@ static Function CONF_ControlToJSON(string wName, string ctrlName, variable saveM JSON_AddTreeArray(jsonID, ctrlPath + EXPCONFIG_FIELD_CTRLARRAYVALUES) oldSize = 0 endif - for(i = oldSize; i < arrayIndex + 1; i += 1) + for(i = oldSize; i < (arrayIndex + 1); i += 1) JSON_AddNull(jsonID, ctrlPath + EXPCONFIG_FIELD_CTRLARRAYVALUES) endfor arrayElemPath = ctrlPath + EXPCONFIG_FIELD_CTRLARRAYVALUES + "/" + num2istr(arrayIndex) @@ -2443,7 +2443,7 @@ Function CONF_Position_MCC_Win(string serialNum, string winTitle, string winPosi endif Make/T/FREE/N=(NUM_HEADSTAGES / 2) winNm - for(w = 0; w < NUM_HEADSTAGES / 2; w += 1) + for(w = 0; w < (NUM_HEADSTAGES / 2); w += 1) winNm[w] = {stringfromlist(w, winTitle) + "(" + stringfromlist(w, serialNum) + ")"} sprintf cmd, "\"%s\" nircmd.exe win center title \"%s\"", cmdPath, winNm[w] diff --git a/Packages/MIES/MIES_DAC-Hardware.ipf b/Packages/MIES/MIES_DAC-Hardware.ipf index 468addf672..6f648af4f3 100644 --- a/Packages/MIES/MIES_DAC-Hardware.ipf +++ b/Packages/MIES/MIES_DAC-Hardware.ipf @@ -562,7 +562,7 @@ Function HW_WriteDeviceInfo(variable hardwareType, string device, WAVE deviceInf deviceInfo[%AD] = devInfoHW[%ADCCount] deviceInfo[%DA] = devInfoHW[%DACCount] deviceInfo[%Rack] = ceil(min(devInfoHW[%DOCount], devInfoHW[%DICount]) / 3) - deviceInfo[%TTL] = deviceInfo[%Rack] == 1 ? 4 : 8 + deviceInfo[%TTL] = (deviceInfo[%Rack] == 1) ? 4 : 8 deviceInfo[%AuxAD] = NaN deviceInfo[%AuxDA] = NaN break @@ -2037,7 +2037,7 @@ threadsafe Function HW_ITC_GetRackRange(variable rack, variable &first, variable ASSERT_TS(0, "Invalid rack parameter") endif - ASSERT_TS(last - first + 1 == NUM_ITC_TTL_BITS_PER_RACK, "Rack channel range must be NUM_ITC_TTL_BITS_PER_RACK for each rack") + ASSERT_TS((last - first + 1) == NUM_ITC_TTL_BITS_PER_RACK, "Rack channel range must be NUM_ITC_TTL_BITS_PER_RACK for each rack") End /// @brief Clip the ttlBit to adapt for differences in notation @@ -2575,7 +2575,7 @@ Function HW_NI_WriteDigital(string device, variable value, [variable DIOPort, va taskID = V_DAQmx_DIO_TaskNumber - ASSERT(log(value) / log(2) <= fDAQmx_DIO_PortWidth(device, DIOport), "value has bits sets which are higher than the number of output lines in this port") + ASSERT((log(value) / log(2)) <= fDAQmx_DIO_PortWidth(device, DIOport), "value has bits sets which are higher than the number of output lines in this port") ret = fDAQmx_DIO_Write(device, taskID, value) if(ret) print fDAQmx_ErrorString() @@ -3405,7 +3405,7 @@ static Function [variable channel, string encode] HW_SU_GetEncodeFromHS(variable if(i > headstage) amp = index ampType = hsInAmp - subHS = index ? headstage - sum(hsNums, 0, index - 1) : headstage + subHS = index ? (headstage - sum(hsNums, 0, index - 1)) : headstage break endif index += 1 diff --git a/Packages/MIES/MIES_DAEphys.ipf b/Packages/MIES/MIES_DAEphys.ipf index d0fdc88e86..e448c75c94 100644 --- a/Packages/MIES/MIES_DAEphys.ipf +++ b/Packages/MIES/MIES_DAEphys.ipf @@ -1107,9 +1107,9 @@ Function GetHeadstageFromSettings(string device, variable channelType, variable WAVE chanAmpAssign = GetChanAmpAssign(device) if(channelType == XOP_CHANNEL_TYPE_ADC) - row = clampMode == V_CLAMP_MODE ? 2 : 2 + 4 + row = (clampMode == V_CLAMP_MODE) ? 2 : (2 + 4) elseif(channelType == XOP_CHANNEL_TYPE_DAC) - row = clampMode == V_CLAMP_MODE ? 0 : 0 + 4 + row = (clampMode == V_CLAMP_MODE) ? 0 : (0 + 4) else ASSERT(0, "Unexpected clamp mode") endif @@ -2386,7 +2386,7 @@ static Function DAP_CheckAsyncSettings(string device) hwChannel = HW_ITC_CalculateDevChannelOff(device) + i // AD channel already used - isADinUse = hwChannel + auxOffset < NUM_AD_CHANNELS ? statusAD[hwChannel + auxOffset] : 0 + isADinUse = ((hwChannel + auxOffset) < NUM_AD_CHANNELS) ? statusAD[hwChannel + auxOffset] : 0 if(hwChannel < NUM_ASYNC_CHANNELS && isADinUse) printf "(%s) The Async channel %d is already used for DAQ.\r", device, i ControlWindowToFront() @@ -2687,7 +2687,7 @@ static Function DAP_CheckHeadStage(string device, variable headStage, variable m endif #ifndef EVIL_KITTEN_EATING_MODE - if(DAG_GetNumericalValue(device, "check_Settings_RequireAmpConn") && ampConnState != AMPLIFIER_CONNECTION_SUCCESS || ampConnState == AMPLIFIER_CONNECTION_MCC_FAILED) + if((DAG_GetNumericalValue(device, "check_Settings_RequireAmpConn") && ampConnState != AMPLIFIER_CONNECTION_SUCCESS) || ampConnState == AMPLIFIER_CONNECTION_MCC_FAILED) printf "(%s) The amplifier of the headstage %d can not be selected, please call \"Query connected Amps\" from the Hardware Tab\r", device, headStage printf " and ensure that the \"Multiclamp 700B Commander\" application is open.\r" ControlWindowToFront() @@ -3028,7 +3028,7 @@ static Function DAP_RemoveClampModeSettings(string device, variable headStage, v endif if(!IsFinite(DACchannel) || !IsFinite(ADCchannel)) - ChannelClampMode[][][%Headstage] = ChannelClampMode[p][q][%Headstage] == headstage ? NaN : ChannelClampMode[p][q][%Headstage] + ChannelClampMode[][][%Headstage] = (ChannelClampMode[p][q][%Headstage] == headstage) ? NaN : ChannelClampMode[p][q][%Headstage] return NaN endif @@ -3355,7 +3355,7 @@ static Function DAP_SetHeadstageChanControls(string device, variable headstage, return NaN endif - oppositeMode = (clampMode == I_CLAMP_MODE || clampMode == I_EQUAL_ZERO_MODE ? V_CLAMP_MODE : I_CLAMP_MODE) + oppositeMode = ((clampMode == I_CLAMP_MODE || clampMode == I_EQUAL_ZERO_MODE) ? V_CLAMP_MODE : I_CLAMP_MODE) DAP_RemoveClampModeSettings(device, headstage, oppositeMode) DAP_ApplyClmpModeSavdSettngs(device, headstage, clampMode) DAP_AllChanDASettings(device, headStage, delayed = delayed) @@ -3429,7 +3429,7 @@ static Function DAP_ChangeHeadstageState(string device, string headStageCtrl, va ICstate = GetCheckBoxState(device, ICctrl) IZeroState = GetCheckBoxState(device, IZeroCtrl) - if(VCstate + ICstate + IZeroState != 1) // someone messed up the radio button logic, reset to V_CLAMP_MODE + if((VCstate + ICstate + IZeroState) != 1) // someone messed up the radio button logic, reset to V_CLAMP_MODE PGC_SetAndActivateControl(device, VCctrl, val = CHECKBOX_SELECTED) else if(enabled && DAG_GetNumericalValue(device, "check_Settings_SyncMiesToMCC")) @@ -3516,7 +3516,7 @@ Function DAP_SliderProc_MIESHeadStage(STRUCT WMSliderAction &sc) : SliderControl // eventCode is a bitmask as opposed to a plain value // compared to other controls - if(sc.eventCode > 0 && sc.eventCode & 0x1) + if(sc.eventCode > 0 && (sc.eventCode & 0x1)) headstage = sc.curval device = sc.win DAG_Update(device, sc.ctrlName, val = headstage) @@ -4492,7 +4492,7 @@ static Function DAP_AdaptPanelForDeviceSpecifics(string device, [variable forceE for(i = 0; i < NUM_DA_TTL_CHANNELS; i += 1) controls = DAP_GetControlsForChannelIndex(i, CHANNEL_TYPE_DAC) - channels = isNaN(deviceInfo[%AuxDA]) ? deviceInfo[%DA] : deviceInfo[%DA] + deviceInfo[%AuxDA] + channels = isNaN(deviceInfo[%AuxDA]) ? deviceInfo[%DA] : (deviceInfo[%DA] + deviceInfo[%AuxDA]) if(i < channels) EnableControls(device, controls) else @@ -4509,7 +4509,7 @@ static Function DAP_AdaptPanelForDeviceSpecifics(string device, [variable forceE for(i = 0; i < NUM_AD_CHANNELS; i += 1) controls = DAP_GetControlsForChannelIndex(i, CHANNEL_TYPE_ADC) - channels = isNaN(deviceInfo[%AuxAD]) ? deviceInfo[%AD] : deviceInfo[%AD] + deviceInfo[%AuxAD] + channels = isNaN(deviceInfo[%AuxAD]) ? deviceInfo[%AD] : (deviceInfo[%AD] + deviceInfo[%AuxAD]) if(i < channels) EnableControls(device, controls) else @@ -4946,7 +4946,7 @@ End Function DAP_getFilteredSkipAhead(string device, variable skipAhead) variable maxSkipAhead = max(0, IDX_MinNoOfSweeps(device) - 1) - return skipAhead > maxSkipAhead ? maxSkipAhead : skipAhead + return (skipAhead > maxSkipAhead) ? maxSkipAhead : skipAhead End Function DAP_setSkipAheadLimit(string device, variable filteredSkipAhead) diff --git a/Packages/MIES/MIES_DAEphys_GuiState.ipf b/Packages/MIES/MIES_DAEphys_GuiState.ipf index fe98753704..8e5d71451f 100644 --- a/Packages/MIES/MIES_DAEphys_GuiState.ipf +++ b/Packages/MIES/MIES_DAEphys_GuiState.ipf @@ -404,7 +404,7 @@ Function DAG_Update(string device, string controlName, [variable val, string str variable col, channelIndex, channelType, controlType - ASSERT(ParamIsDefault(val) + ParamIsDefault(str) < 2, "One or both of `val` and `str` must be passed.") + ASSERT((ParamIsDefault(val) + ParamIsDefault(str)) < 2, "One or both of `val` and `str` must be passed.") if(!ParamIsDefault(val)) WAVE GUIState = GetDA_EphysGuiStateNum(device) diff --git a/Packages/MIES/MIES_DataAcquisition_Single.ipf b/Packages/MIES/MIES_DataAcquisition_Single.ipf index c6c11faada..27c6747b47 100644 --- a/Packages/MIES/MIES_DataAcquisition_Single.ipf +++ b/Packages/MIES/MIES_DataAcquisition_Single.ipf @@ -27,7 +27,7 @@ Function DQS_StartDAQSingleDevice(string device, [variable useBackground]) useBackground = !!useBackground endif - DAP_OneTimeCallBeforeDAQ(device, useBackground == 1 ? DAQ_BG_SINGLE_DEVICE : DAQ_FG_SINGLE_DEVICE) + DAP_OneTimeCallBeforeDAQ(device, (useBackground == 1) ? DAQ_BG_SINGLE_DEVICE : DAQ_FG_SINGLE_DEVICE) AssertOnAndClearRTError() try diff --git a/Packages/MIES/MIES_DataConfigurator.ipf b/Packages/MIES/MIES_DataConfigurator.ipf index 8b68396f58..bc1722a3bf 100644 --- a/Packages/MIES/MIES_DataConfigurator.ipf +++ b/Packages/MIES/MIES_DataConfigurator.ipf @@ -361,7 +361,7 @@ static Function [WAVE/Z DAQDataWave, WAVE/WAVE NIDataWave] DC_MakeAndGetDAQDataW Make/FREE/N=(s.numActiveChannels) type = SWS_GetRawDataFPType(device) WAVE config = GetDAQConfigWave(device) - type = config[p][%ChannelType] == XOP_CHANNEL_TYPE_TTL ? IGOR_TYPE_UNSIGNED | IGOR_TYPE_8BIT_INT : type[p] + type = (config[p][%ChannelType] == XOP_CHANNEL_TYPE_TTL) ? (IGOR_TYPE_UNSIGNED | IGOR_TYPE_8BIT_INT) : type[p] if(s.hardwareType == HARDWARE_NI_DAC) NISUDataWave = DC_MakeNIChannelWave(device, dataAcqOrTP, config[p][%ChannelType], config[p][%SamplingInterval], p, type[p]) elseif(s.hardwareType == HARDWARE_SUTTER_DAC) @@ -506,7 +506,7 @@ static Function DC_MakeHelperWaves(string device, variable dataAcqOrTP) break endswitch - tpLength = dataAcqOrTP == DATA_ACQUISITION_MODE ? TPSettingsCalc[%totalLengthPointsDAQ_ADC] : TPSettingsCalc[%totalLengthPointsTP_ADC] + tpLength = (dataAcqOrTP == DATA_ACQUISITION_MODE) ? TPSettingsCalc[%totalLengthPointsDAQ_ADC] : TPSettingsCalc[%totalLengthPointsTP_ADC] powerSpectrum = DAG_GetNumericalValue(device, "check_settings_show_power") if(powerSpectrum) // see DisplayHelpTopic `FFT` for the explanation of the calculation @@ -603,7 +603,7 @@ static Function DC_CalculateChannelSizeForScaledData(string device, variable dat switch(hardwareType) case HARDWARE_ITC_DAC: - return dataAcqOrTP == DATA_ACQUISITION_MODE ? ROVar(GetStopCollectionPoint(device)) : TPSettingsCalc[%totalLengthPointsTP_ADC] + return (dataAcqOrTP == DATA_ACQUISITION_MODE) ? ROVar(GetStopCollectionPoint(device)) : TPSettingsCalc[%totalLengthPointsTP_ADC] case HARDWARE_NI_DAC: // intended-drop-through case HARDWARE_SUTTER_DAC: if(dataAcqOrTP == DATA_ACQUISITION_MODE) @@ -740,8 +740,8 @@ Function/WAVE DC_GetFilteredChannelState(string device, variable dataAcqOrTP, va WAVE/T allSetNames = DAG_GetChannelTextual(device, CHANNEL_TYPE_DAC, CHANNEL_CONTROL_WAVE) result[] = statusChannel[p] && (!cmpstr(allSetNames[p], STIMSET_TP_WHILE_DAQ, 1) \ - ? DAQChannelType == DAQ_CHANNEL_TYPE_TP \ - : DAQChannelType == DAQ_CHANNEL_TYPE_DAQ) + ? (DAQChannelType == DAQ_CHANNEL_TYPE_TP) \ + : (DAQChannelType == DAQ_CHANNEL_TYPE_DAQ)) return result @@ -806,7 +806,7 @@ static Function DC_PlaceDataInDAQConfigWave(string device, variable dataAcqOrTP) DAQConfigWave[j][%ChannelType] = XOP_CHANNEL_TYPE_DAC DAQConfigWave[j][%ChannelNumber] = i unitList = AddListItem(DAG_GetTextualValue(device, ctrl, index = i), unitList, ",", Inf) - DAQConfigWave[j][%DAQChannelType] = !CmpStr(allSetNames[i], STIMSET_TP_WHILE_DAQ, 1) || dataAcqOrTP == TEST_PULSE_MODE ? DAQ_CHANNEL_TYPE_TP : DAQ_CHANNEL_TYPE_DAQ + DAQConfigWave[j][%DAQChannelType] = (!CmpStr(allSetNames[i], STIMSET_TP_WHILE_DAQ, 1) || dataAcqOrTP == TEST_PULSE_MODE) ? DAQ_CHANNEL_TYPE_TP : DAQ_CHANNEL_TYPE_DAQ headstage = AFH_GetHeadstageFromDAC(device, i) DAQConfigWave[j][%HEADSTAGE] = headstage if(IsAssociatedChannel(headstage)) @@ -1071,15 +1071,15 @@ static Function DC_WriteTTLIntoDAQDataWave(string device, STRUCT DataConfigurati // Place TTL waves into ITCDataWave ITCRackZeroChecked = !!DC_AreTTLsInRackChecked(device, RACK_ZERO) - bitMask = 1 << NUM_ITC_TTL_BITS_PER_RACK - 1 + bitMask = (1 << NUM_ITC_TTL_BITS_PER_RACK) - 1 if(ITCRackZeroChecked) MultiThread ITCDataWave[startOffset, startOffset + singleSetLength - 1][ttlOffset] = \ limit(TTLWaveITC[round(s.decimationFactor * (p - startOffset))] & bitMask, minLimit, maxLimit); AbortOnRTE endif if(DC_AreTTLsInRackChecked(device, RACK_ONE)) - MultiThread ITCDataWave[startOffset, startOffset + singleSetLength - 1][ttlOffset + ITCRackZeroChecked] = \ - limit(TTLWaveITC[round(s.decimationFactor * (p - startOffset))] >> NUM_ITC_TTL_BITS_PER_RACK & bitMask, minLimit, maxLimit); AbortOnRTE + MultiThread ITCDataWave[startOffset, startOffset + singleSetLength - 1][ttlOffset + ITCRackZeroChecked] = \ + limit((TTLWaveITC[round(s.decimationFactor * (p - startOffset))] >> NUM_ITC_TTL_BITS_PER_RACK) & bitMask, minLimit, maxLimit); AbortOnRTE endif break endswitch @@ -1155,7 +1155,7 @@ static Function DC_PrepareLBNEntries(string device, STRUCT DataConfigurationResu ctrl = GetSpecialControlLabel(CHANNEL_TYPE_DAC, CHANNEL_CONTROL_UNIT) DC_DocumentChannelProperty(device, "DA Unit", headstage, channel, XOP_CHANNEL_TYPE_DAC, str = DAG_GetTextualValue(device, ctrl, index = channel)) - DC_DocumentChannelProperty(device, STIMSET_SCALE_FACTOR_KEY, headstage, channel, XOP_CHANNEL_TYPE_DAC, var = s.dataAcqOrTP == DATA_ACQUISITION_MODE && config[i][%DAQChannelType] == DAQ_CHANNEL_TYPE_DAQ ? s.DACAmp[i][%DASCALE] : s.DACAmp[i][%TPAMP]) + DC_DocumentChannelProperty(device, STIMSET_SCALE_FACTOR_KEY, headstage, channel, XOP_CHANNEL_TYPE_DAC, var = (s.dataAcqOrTP == DATA_ACQUISITION_MODE && config[i][%DAQChannelType] == DAQ_CHANNEL_TYPE_DAQ) ? s.DACAmp[i][%DASCALE] : s.DACAmp[i][%TPAMP]) DC_DocumentChannelProperty(device, "Set Sweep Count", headstage, channel, XOP_CHANNEL_TYPE_DAC, var = s.setColumn[i]) DC_DocumentChannelProperty(device, "Electrode", headstage, channel, XOP_CHANNEL_TYPE_DAC, str = cellElectrodeNames[headstage]) DC_DocumentChannelProperty(device, "Set Cycle Count", headstage, channel, XOP_CHANNEL_TYPE_DAC, var = s.setCycleCount[i]) @@ -1282,7 +1282,7 @@ static Function DC_FillSetEventFlag(string device, STRUCT DataConfigurationResul channel = s.DACList[i] if(config[i][%DAQChannelType] == DAQ_CHANNEL_TYPE_DAQ) - setEventFlag[channel][] = (s.setColumn[i] + 1 == IDX_NumberOfSweepsInSet(s.setName[i])) + setEventFlag[channel][] = ((s.setColumn[i] + 1) == IDX_NumberOfSweepsInSet(s.setName[i])) endif endfor End @@ -1731,7 +1731,7 @@ static Function [STRUCT DataConfigurationResult s] DC_GetConfiguration(string de s.setLength[] = DC_CalculateStimsetLength(s.stimSet[p], device, TEST_PULSE_MODE) elseif(dataAcqOrTP == DATA_ACQUISITION_MODE) Duplicate/FREE s.setLength, setMode - setMode[] = config[p][%DAQChannelType] == DAQ_CHANNEL_TYPE_TP ? TEST_PULSE_MODE : DATA_ACQUISITION_MODE + setMode[] = (config[p][%DAQChannelType] == DAQ_CHANNEL_TYPE_TP) ? TEST_PULSE_MODE : DATA_ACQUISITION_MODE s.setLength[] = DC_CalculateStimsetLength(s.stimSet[p], device, setMode[p]) WaveClear setMode endif @@ -1954,7 +1954,7 @@ Function DC_DocumentChannelProperty(string device, string entry, variable headst variable colData, colKey, numCols string ua_entry - ASSERT(ParamIsDefault(var) + ParamIsDefault(str) == 1, "Exactly one of var or str has to be supplied") + ASSERT((ParamIsDefault(var) + ParamIsDefault(str)) == 1, "Exactly one of var or str has to be supplied") ASSERT(!IsEmpty(entry), "Entry must be non-empty") WAVE sweepDataLNB = GetSweepSettingsWave(device) diff --git a/Packages/MIES/MIES_EnhancedWMRoutines.ipf b/Packages/MIES/MIES_EnhancedWMRoutines.ipf index b93c0e2234..f870551f2b 100644 --- a/Packages/MIES/MIES_EnhancedWMRoutines.ipf +++ b/Packages/MIES/MIES_EnhancedWMRoutines.ipf @@ -263,7 +263,7 @@ threadsafe Function/WAVE MIES_fWaveAverage(WAVE/Z yWaves, variable ignoreNaNs, v endif // points with no values added are set to NaN here: - MultiThread AveW = (TempNWave[p] == 0) ? NaN : AveW[p] / TempNWave[p] + MultiThread AveW = (TempNWave[p] == 0) ? NaN : (AveW[p] / TempNWave[p]) result = {AveW, SumW, TempNWave} return result diff --git a/Packages/MIES/MIES_Epochs.ipf b/Packages/MIES/MIES_Epochs.ipf index 288dfaf845..4f22839826 100644 --- a/Packages/MIES/MIES_Epochs.ipf +++ b/Packages/MIES/MIES_Epochs.ipf @@ -205,7 +205,7 @@ static Function EP_CollectEpochInfoDA(WAVE/T epochWave, STRUCT DataConfiguration if(s.distributedDAQOptOv) epochBegin = ec.dwStimsetBegin * s.samplingIntervalDA - epochEnd = err ? Inf : (ec.dwStimsetBegin + ec.dwStimsetSize) * s.samplingIntervalDA + epochEnd = err ? Inf : ((ec.dwStimsetBegin + ec.dwStimsetSize) * s.samplingIntervalDA) EP_AddEpochsFromOodDAQRegions(ec.epochWave, ec.channel, s.regions[i], epochBegin, epochEnd) endif @@ -400,7 +400,7 @@ static Function [WAVE/D stimepochOffsetTime, WAVE/D stimepochDuration] EP_GetSti Make/FREE/D/N=(epochCount) stimepochDuration, stimepochOffsetTime for(epochNr = 0; epochNr < epochCount; epochNr += 1) - indexInStimset = ec.flipping ? wbFlippingIndex - wbStimsetEpochOffset[epochNr] - wbStimsetEpochLength[epochNr] : ec.wbOodDAQOffset + wbStimsetEpochOffset[epochNr] + indexInStimset = ec.flipping ? (wbFlippingIndex - wbStimsetEpochOffset[epochNr] - wbStimsetEpochLength[epochNr]) : (ec.wbOodDAQOffset + wbStimsetEpochOffset[epochNr]) stimepochOffsetTime[epochNr] = (IndexAfterDecimation(indexInStimset, ec.decimationFactor) + 1) * ec.samplingInterval endfor @@ -412,7 +412,7 @@ static Function [WAVE/D stimepochOffsetTime, WAVE/D stimepochDuration] EP_GetSti stimepochDuration[epochNr] = (IndexAfterDecimation(wbFlippingIndex - wbStimsetEpochOffset[epochNr], ec.decimationFactor) + 1) * ec.samplingInterval - stimepochOffsetTime[epochNr] endif else - if(epochNr < epochCount - 1) + if(epochNr < (epochCount - 1)) stimepochDuration[epochNr] = stimepochOffsetTime[epochNr + 1] - stimepochOffsetTime[epochNr] else stimepochDuration[epochNr] = (IndexAfterDecimation(ec.wbOodDAQOffset + wbStimsetEpochOffset[epochNr] + wbStimsetEpochLength[epochNr], ec.decimationFactor) + 1) * ec.samplingInterval - stimepochOffsetTime[epochNr] @@ -626,7 +626,7 @@ static Function/WAVE EP_PTGetPulseStartTimes(STRUCT EP_EpochCreationData &ec, va numPulses = DimSize(pulseStartIndices, ROWS) for(pulseNr = 0; pulseNr < numPulses; pulseNr += 1) - indexInStimset = ec.flipping ? wbFlippingIndex - wbStimsetEpochOffset - pulseStartIndices[pulseNr] : ec.wbOodDAQOffset + wbStimsetEpochOffset + pulseStartIndices[pulseNr] + indexInStimset = ec.flipping ? (wbFlippingIndex - wbStimsetEpochOffset - pulseStartIndices[pulseNr]) : (ec.wbOodDAQOffset + wbStimsetEpochOffset + pulseStartIndices[pulseNr]) startTimes[pulseNr] = (IndexAfterDecimation(indexInStimset, ec.decimationFactor) + 1) * ec.samplingInterval sprintf msg, "\rPT pulse starts: nPulse iStimOffset tStart\r %d %d %7.0f µs\r", pulseNr, indexInStimset, startTimes[pulseNr] @@ -657,11 +657,11 @@ static Function [variable subEpochBegin, variable subEpochEnd] EP_PTAddPTPEpoch( // Pulse-to-Pulse epoch if(ec.flipping) - subEpochBegin = pulseNr + 1 == numPulses ? epochBegin : startTimes[pulseNr + 1] + subEpochBegin = ((pulseNr + 1) == numPulses) ? epochBegin : startTimes[pulseNr + 1] subEpochEnd = startTimes[pulseNr] else subEpochBegin = startTimes[pulseNr] - subEpochEnd = pulseNr + 1 == numPulses ? epochEnd : startTimes[pulseNr + 1] + subEpochEnd = ((pulseNr + 1) == numPulses) ? epochEnd : startTimes[pulseNr + 1] endif if(subEpochBegin >= epochEnd) return [NaN, NaN] @@ -700,7 +700,7 @@ static Function EP_PTAddPTBLTEpoch(STRUCT EP_EpochCreationData &ec, string short // pulse-to-pulse base line trail, consider both sides as oodDAQ can introduce a base line trail on the front tags = ReplaceStringByKey(EPOCH_SUBTYPE_KEY, epSubTags, EPOCH_BASELINE_REGION_KEY, STIMSETKEYNAME_SEP, EPOCHNAME_SEP) - if(pulseNr + 1 == numPulses) + if((pulseNr + 1) == numPulses) if(ec.flipping && subEpochBegin > epochBegin) subsubEpochBegin = epochBegin subsubEpochEnd = subEpochBegin @@ -920,11 +920,11 @@ static Function [variable err, variable stimsetEndIndex] EP_AddEpochsFromStimSet for(epochNr = 0; epochNr < epochCount; epochNr += 1) if(ec.flipping) - if(wbFlippingIndex - wbStimsetEpochOffset[epochNr] - wbStimsetEpochLength[epochNr] >= ec.reducedStimsetSize) + if((wbFlippingIndex - wbStimsetEpochOffset[epochNr] - wbStimsetEpochLength[epochNr]) >= ec.reducedStimsetSize) continue endif else - if(ec.wbOodDAQOffset + wbStimsetEpochOffset[epochNr] >= ec.reducedStimsetSize) + if((ec.wbOodDAQOffset + wbStimsetEpochOffset[epochNr]) >= ec.reducedStimsetSize) break endif endif @@ -1030,9 +1030,9 @@ static Function [variable err, variable stimsetEndIndex] EP_AddEpochsFromStimSet // Half Cycle 1: 3, 4 // ... - hasFullCycle = (i + 2 < numInflectionPoints) + hasFullCycle = ((i + 2) < numInflectionPoints) hasIncompleteCycleAtStart = (i == 0 && tiInflectionPoints[i] != 0) - hasIncompleteCycleAtEnd = !hasFullCycle || (i + 1 >= numInflectionPoints) + hasIncompleteCycleAtEnd = !hasFullCycle || ((i + 1) >= numInflectionPoints) if(!hasFullCycle || hasIncompleteCycleAtStart) if(hasIncompleteCycleAtStart) @@ -1146,7 +1146,7 @@ End static Function EP_GetEpochCount(WAVE/T epochWave, variable channel, variable channelType) FindValue/Z/RMD=[][][channel][channelType]/TXOP=4/TEXT="" epochWave - return V_row == -1 ? DimSize(epochWave, ROWS) : V_row + return (V_row == -1) ? DimSize(epochWave, ROWS) : V_row End /// @brief Add user epochs @@ -1385,7 +1385,7 @@ Function EP_AdaptEpochInfoChannelImpl(WAVE/T epochWave, variable channelNumber, continue endif - if(acquiredEpochsEndTime < startTime || abs(acquiredEpochsEndTime - startTime) <= 10^(-EPOCHTIME_PRECISION)) + if(acquiredEpochsEndTime < startTime || abs(acquiredEpochsEndTime - startTime) <= (10^(-EPOCHTIME_PRECISION))) // lies completely outside the acquired region // mark it for deletion epochWave[epoch][%StartTime][channelNumber][channelType] = "NaN" @@ -1665,7 +1665,7 @@ static Function/WAVE EP_GetGaps(WAVE numericalValues, WAVE textualValues, variab SetDimLabel COLS, 0, GAPBEGIN, gaps SetDimLabel COLS, 1, GAPEND, gaps - for(i = 0; i < numEpochs - 1; i += 1) + for(i = 0; i < (numEpochs - 1); i += 1) if(i == 0 && str2numSafe(zeroEpochs[i][EPOCH_COL_STARTTIME]) > 0) gaps[index][%GAPBEGIN] = 0 @@ -1984,7 +1984,7 @@ static Function EP_AddRecreatedUserEpochs_PSQ_Ramp(WAVE numericalValues, WAVE/T level = GetMachineEpsilon(WaveType(sweepDA)) FindLevel/Q/EDGE=(FINDLEVEL_EDGE_DECREASING)/R=[Inf, 0]/P sweepDA, level first = ceil(V_levelX) - if(first > DimSize(sweepDA, ROWS) - 2) + if(first > (DimSize(sweepDA, ROWS) - 2)) DEBUGPRINT("RA U_RA_DS epoch recreation: no suppressed DA region found.") return NaN endif @@ -1993,7 +1993,7 @@ static Function EP_AddRecreatedUserEpochs_PSQ_Ramp(WAVE numericalValues, WAVE/T // The DA output wave is always the next greater power of two size of the actual needed output size // Thus, the epoch is always longer than the DA channel length. It is later cut off to the actual // maximum acquired time, see @ref EP_AdaptEpochInfo - last = hwType == HARDWARE_ITC_DAC ? DimSize(sweepDA, ROWS) : DimSize(sweepDA, ROWS) - 1 + last = (hwType == HARDWARE_ITC_DAC) ? DimSize(sweepDA, ROWS) : (DimSize(sweepDA, ROWS) - 1) PSQ_Ramp_AddEpochImpl(epochWave, sweepDA, DAC, "Name=DA Suppression", "RA_DS", first, last) @@ -2098,7 +2098,7 @@ static Function EP_AddRecreatedUserEpochs_PSQ_Chirp(WAVE numericalValues, WAVE/T return NaN endif - ASSERT(DimSize(fullCycleEpochs, ROWS) == (chirpCycles == 1 ? 1 : 2), "Chirp resulted in successful stimset QC, but could not find cycle base epochs E1_TG_C0 && E1_TG_C" + num2istr(chirpCycles - 1)) + ASSERT(DimSize(fullCycleEpochs, ROWS) == ((chirpCycles == 1) ? 1 : 2), "Chirp resulted in successful stimset QC, but could not find cycle base epochs E1_TG_C0 && E1_TG_C" + num2istr(chirpCycles - 1)) [epBegin, epEnd] = PSQ_CR_AddCycleEvaluationEpoch(epochWave, fullCycleEpochs, DAC) End diff --git a/Packages/MIES/MIES_ExperimentDocumentation.ipf b/Packages/MIES/MIES_ExperimentDocumentation.ipf index 3d16b6690d..87a62bbd62 100644 --- a/Packages/MIES/MIES_ExperimentDocumentation.ipf +++ b/Packages/MIES/MIES_ExperimentDocumentation.ipf @@ -105,7 +105,7 @@ static Function ED_createTextNotes(WAVE/T incomingTextualValues, WAVE/T incoming // nothing to do numCols = DimSize(incomingTextualValues, COLS) - lastValidIncomingLayer = DimSize(incomingTextualValues, LAYERS) == 0 ? 0 : DimSize(incomingTextualValues, LAYERS) - 1 + lastValidIncomingLayer = (DimSize(incomingTextualValues, LAYERS) == 0) ? 0 : (DimSize(incomingTextualValues, LAYERS) - 1) for(i = 0; i < numCols; i += 1) values[rowIndex][indizes[i]][0, lastValidIncomingLayer] = NormalizeToEOL(incomingTextualValues[0][i][r], "\n") endfor @@ -148,7 +148,7 @@ static Function ED_GetHeadstageContingency(WAVE values) if(IsTextWave(values)) WAVE/T valuesText = values WAVE stats = LBN_GetNumericWave() - stats[] = strlen(valuesText[p]) == 0 ? NaN : 1 + stats[] = (strlen(valuesText[p]) == 0) ? NaN : 1 else WAVE stats = values endif @@ -218,7 +218,7 @@ static Function ED_createWaveNotes(WAVE incomingNumericalValues, WAVE/T incoming valuesDat[rowIndex] = values[rowIndex][1] numCols = DimSize(incomingNumericalValues, COLS) - lastValidIncomingLayer = DimSize(incomingNumericalValues, LAYERS) == 0 ? 0 : DimSize(incomingNumericalValues, LAYERS) - 1 + lastValidIncomingLayer = (DimSize(incomingNumericalValues, LAYERS) == 0) ? 0 : (DimSize(incomingNumericalValues, LAYERS) - 1) for(i = 0; i < numCols; i += 1) values[rowIndex][indizes[i]][0, lastValidIncomingLayer] = incomingNumericalValues[0][i][r] endfor @@ -624,7 +624,7 @@ static Function [WAVE colIndizes, variable rowIndex] ED_FindIndizesAndRedimensio Redimension/N=(-1, numKeyCols + numAdditions, -1) key, values // rowIndex will be zero for empty waves only and these also need dimension labels for all columns - LBN_SetDimensionLabels(key, values, start = (rowIndex == 0 ? 0 : numKeyCols)) + LBN_SetDimensionLabels(key, values, start = ((rowIndex == 0) ? 0 : numKeyCols)) endif if(IsNumericWave(values)) @@ -874,8 +874,8 @@ Function ED_TPDocumentation(string device) TPSettingsWave[0][7][i] = AI_SendToAmp(device, i, V_CLAMP_MODE, MCC_GETSLOWCOMPTAU_FUNC, NaN, selectAmp = 0) endfor - TPSettingsWave[0][1][0, NUM_HEADSTAGES - 1] = hsProp[r][%ClampMode] == V_CLAMP_MODE ? TPResults[%BaselineSteadyState][r] : NaN - TPSettingsWave[0][0][0, NUM_HEADSTAGES - 1] = hsProp[r][%ClampMode] == I_CLAMP_MODE ? TPResults[%BaselineSteadyState][r] : NaN + TPSettingsWave[0][1][0, NUM_HEADSTAGES - 1] = (hsProp[r][%ClampMode] == V_CLAMP_MODE) ? TPResults[%BaselineSteadyState][r] : NaN + TPSettingsWave[0][0][0, NUM_HEADSTAGES - 1] = (hsProp[r][%ClampMode] == I_CLAMP_MODE) ? TPResults[%BaselineSteadyState][r] : NaN TPSettingsWave[0][9][0, NUM_HEADSTAGES - 1] = hsProp[r][%DAC] TPSettingsWave[0][10][0, NUM_HEADSTAGES - 1] = hsProp[r][%ADC] diff --git a/Packages/MIES/MIES_GuiPopupMenuExt.ipf b/Packages/MIES/MIES_GuiPopupMenuExt.ipf index 0ab013f85c..55a09cf62c 100644 --- a/Packages/MIES/MIES_GuiPopupMenuExt.ipf +++ b/Packages/MIES/MIES_GuiPopupMenuExt.ipf @@ -600,13 +600,13 @@ Function/WAVE PEXT_SplitToSubMenus(WAVE/Z/T menuList, [variable method]) if(method == PEXT_SUBSPLIT_DEFAULT) Sort/A menuList, menuList subMenuCnt = trunc(DimSize(menuList, ROWS) / numPerSubEntry) + 1 - subMenuCnt = subMenuCnt > MAX_SUBMENUS ? MAX_SUBMENUS : subMenuCnt + subMenuCnt = (subMenuCnt > MAX_SUBMENUS) ? MAX_SUBMENUS : subMenuCnt Make/FREE/T/N=(subMenuCnt) splitMenu for(i = 0; i < subMenuCnt; i++) beginItem = i * numPerSubEntry - endItem = i == subMenuCnt - 1 ? DimSize(menuList, ROWS) - 1 : beginItem + numPerSubEntry - 1 + endItem = (i == (subMenuCnt - 1)) ? (DimSize(menuList, ROWS) - 1) : (beginItem + numPerSubEntry - 1) for(j = beginitem; j < enditem; j++) splitMenu[i] = AddListItem(menuList[j], splitMenu[i], ";", Inf) @@ -619,7 +619,7 @@ Function/WAVE PEXT_SplitToSubMenus(WAVE/Z/T menuList, [variable method]) Make/FREE/T/N=(MAX_SUBMENUS) splitMenu do remainItems = DimSize(menuList, ROWS) - menuPos - if(remainItems < numPerSubEntry || subIndex == MAX_SUBMENUS - 1) + if(remainItems < numPerSubEntry || subIndex == (MAX_SUBMENUS - 1)) subMenuLength = remainItems else begEntry = menuList[menuPos] @@ -682,7 +682,7 @@ Function PEXT_GenerateSubMenuNames(WAVE/Z/T splitMenu, [variable method]) endfor minLen = 0 - for(i = 0; i < 2 * subMenuCnt - 1; i++) + for(i = 0; i < (2 * subMenuCnt - 1); i++) begEntry = subMenuBoundary[i] endEntry = subMenuBoundary[i + 1] endLen = min(strlen(begEntry), strlen(endEntry)) @@ -702,7 +702,7 @@ Function PEXT_GenerateSubMenuNames(WAVE/Z/T splitMenu, [variable method]) minLen = j subMenuShort[i] = s1 - if(i == 2 * subMenuCnt - 2) + if(i == (2 * subMenuCnt - 2)) subMenuShort[i + 1] = s2 endif endfor diff --git a/Packages/MIES/MIES_GuiUtilities.ipf b/Packages/MIES/MIES_GuiUtilities.ipf index 33c3700da7..f650203157 100644 --- a/Packages/MIES/MIES_GuiUtilities.ipf +++ b/Packages/MIES/MIES_GuiUtilities.ipf @@ -1369,7 +1369,7 @@ Function GetInternalSetVariableType(string recMacro) variable builtinString = (strsearch(recMacro, "_STR:\"", 0) != -1) variable builtinNumber = (strsearch(recMacro, "_NUM:", 0) != -1) - ASSERT(builtinString + builtinNumber != 2, "SetVariable can not hold both numeric and string contents") + ASSERT((builtinString + builtinNumber) != 2, "SetVariable can not hold both numeric and string contents") if(builtinString) return SET_VARIABLE_BUILTIN_STR @@ -2031,7 +2031,7 @@ Function DrawScaleBar(string graph, variable x0, variable y0, variable x1, varia length = abs(y0 - y1) ASSERT(!IsEmpty(unit), "empty unit") - subDigits = length > 1 ? 0 : abs(floor(log(length) / log(10))) + subDigits = (length > 1) ? 0 : abs(floor(log(length) / log(10))) sprintf str, "%.*f%s%s", subDigits, length, SelectString(newlineBeforeUnit, NUMBER_UNIT_SPACE, "\r"), unit xPos = x0 - labelOffset @@ -2045,7 +2045,7 @@ Function DrawScaleBar(string graph, variable x0, variable y0, variable x1, varia length = abs(x0 - x1) ASSERT(!IsEmpty(unit), "empty unit") - subDigits = length > 1 ? 0 : abs(floor(log(length) / log(10))) + subDigits = (length > 1) ? 0 : abs(floor(log(length) / log(10))) sprintf str, "%.*f%s%s", subDigits, length, SelectString(newlineBeforeUnit, NUMBER_UNIT_SPACE, "\r"), unit xPos = min(x0, x1) + abs(x0 - x1) / 2 @@ -2363,7 +2363,7 @@ Function [variable first, variable last] GetMarqueeHelper(string axisName, [vari doAssert = !!doAssert endif - ASSERT(ParamIsDefault(horiz) + ParamIsDefault(vert) == 1, "Required exactly one of horiz/vert") + ASSERT((ParamIsDefault(horiz) + ParamIsDefault(vert)) == 1, "Required exactly one of horiz/vert") if(ParamIsDefault(horiz)) horiz = 0 diff --git a/Packages/MIES/MIES_Indexing.ipf b/Packages/MIES/MIES_Indexing.ipf index 43446d2da8..9cb48ffaca 100644 --- a/Packages/MIES/MIES_Indexing.ipf +++ b/Packages/MIES/MIES_Indexing.ipf @@ -293,7 +293,7 @@ Function IDX_MinNoOfSweeps(string device) MinNoOfSweeps = min(MinNoOfSweeps, IDX_NumberOfSweepsAcrossSets(device, i, CHANNEL_TYPE_TTL, 1)) endfor - return MinNoOfSweeps == Inf ? 0 : MinNoOfSweeps + return (MinNoOfSweeps == Inf) ? 0 : MinNoOfSweeps End /// @brief Returns a 1D textwave of selected set names @@ -449,7 +449,7 @@ Function IDX_UnlockedIndexingStepNo(string device, variable channelNumber, varia ASSERT(first != last, "Unexpected combo") count = mod(count, totalListSTeps) - direction = first < last ? +1 : -1 + direction = (first < last) ? +1 : -1 for(i = 0; stepsInSummedSets <= count; i += direction) stepsInSummedSets += IDX_NumberOfSweepsInSet(IDX_GetSingleStimset(stimsets, first + i)) @@ -473,8 +473,8 @@ static Function IDX_DetIfCountIsAtSetBorder(string device, variable count, varia ASSERT(TotalListSteps > 0, "Expected strictly positive value") ASSERT(first != last, "Unexpected combo") - count = (mod(count, totalListSteps) == 0 ? totalListSteps : mod(count, totalListSTeps)) - direction = first < last ? +1 : -1 + count = ((mod(count, totalListSteps) == 0) ? totalListSteps : mod(count, totalListSTeps)) + direction = (first < last) ? +1 : -1 for(i = 0; stepsInSummedSets <= count; i += direction) stepsInSummedSets += IDX_NumberOfSweepsInSet(IDX_GetSingleStimset(stimsets, first + i)) diff --git a/Packages/MIES/MIES_JSONWaveNotes.ipf b/Packages/MIES/MIES_JSONWaveNotes.ipf index 0094a56baa..8b3cb00ccb 100644 --- a/Packages/MIES/MIES_JSONWaveNotes.ipf +++ b/Packages/MIES/MIES_JSONWaveNotes.ipf @@ -18,7 +18,7 @@ threadsafe Function/S JWN_GetWaveNoteAsString(WAVE wv) noteStr = note(wv) pos = strsearch(noteStr, WAVE_NOTE_JSON_SEPARATOR, 0) len = strlen(WAVE_NOTE_JSON_SEPARATOR) - if(pos >= 0 && strlen(noteStr) > pos + len) + if(pos >= 0 && strlen(noteStr) > (pos + len)) return noteStr[pos + len, Inf] endif diff --git a/Packages/MIES/MIES_LogbookViewer.ipf b/Packages/MIES/MIES_LogbookViewer.ipf index 2e2370f0ac..cd4a59b841 100644 --- a/Packages/MIES/MIES_LogbookViewer.ipf +++ b/Packages/MIES/MIES_LogbookViewer.ipf @@ -535,18 +535,18 @@ static Function LBV_AddTraceToLBGraph(string graph, WAVE keys, WAVE values, stri endif endif - TUD_SetUserDataFromWaves(graph, \ - trace, \ - userDataKeys, \ - {key, \ - num2str(isTextData), \ - GetWavesDataFolder(keys, 2), \ - GetWavesDataFolder(values, 2), \ - num2str(i < NUM_HEADSTAGES ? i : NaN), \ + TUD_SetUserDataFromWaves(graph, \ + trace, \ + userDataKeys, \ + {key, \ + num2str(isTextData), \ + GetWavesDataFolder(keys, 2), \ + GetWavesDataFolder(values, 2), \ + num2str((i < NUM_HEADSTAGES) ? i : NaN), \ axis}) [s] = GetHeadstageColor(i) - marker = i == 0 ? 39 : i + marker = (i == 0) ? 39 : i ModifyGraph/W=$graph rgb($trace)=(s.red, s.green, s.blue, IsTextData ? 0 : Inf), marker($trace)=marker SetAxis/W=$graph/A=2 $axis @@ -728,7 +728,7 @@ static Function LBV_AddTraceToLBGraphTPStorage(string graph, DFREF dfr, string k }) [s] = GetHeadstageColor(headstage) - marker = headstage == 0 ? 39 : headstage + marker = (headstage == 0) ? 39 : headstage ModifyGraph/W=$graph rgb($trace)=(s.red, s.green, s.blue), marker($trace)=marker SetAxis/W=$graph/A=2 $axis endfor diff --git a/Packages/MIES/MIES_MiesUtilities_Algorithm.ipf b/Packages/MIES/MIES_MiesUtilities_Algorithm.ipf index e744151330..d75a2145e2 100644 --- a/Packages/MIES/MIES_MiesUtilities_Algorithm.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Algorithm.ipf @@ -359,7 +359,7 @@ threadsafe static Function DecimateMinMax(WAVE input, WAVE output, variable idx, WaveStats/Q/M=1/RMD=[first, last][colInp] input ASSERT_TS(V_numINFS == 0, "INFs are not supported.") ASSERT_TS(V_numNaNS == 0, "NaNs are not supported.") - ASSERT_TS(last - first + 1 == V_npnts && V_npnts > 0, "Range got clipped") + ASSERT_TS((last - first + 1) == V_npnts && V_npnts > 0, "Range got clipped") // comment in for debugging // #ifdef DEBUGGING_ENABLED @@ -426,7 +426,7 @@ threadsafe Function/WAVE FindIndizes(WAVE numericOrTextWave, [variable col, stri numLayers = DimSize(numericOrTextWave, LAYERS) ASSERT_TS(DimSize(numericOrTextWave, CHUNKS) <= 1, "No support for chunks") - ASSERT_TS(!ParamIsDefault(col) + !ParamIsDefault(colLabel) < 2, "Ambiguous input. Col and ColLabel is set.") + ASSERT_TS((!ParamIsDefault(col) + !ParamIsDefault(colLabel)) < 2, "Ambiguous input. Col and ColLabel is set.") if(!ParamIsDefault(col)) // do nothing elseif(!ParamIsDefault(colLabel)) @@ -523,15 +523,15 @@ threadsafe Function/WAVE FindIndizes(WAVE numericOrTextWave, [variable col, stri if(!ParamIsDefault(prop)) if(prop & PROP_EMPTY) if(prop & PROP_NOT) - MultiThread matches[startRow, endRow][startLayer, endLayer] = numtype(wv[p][col][q]) != 2 ? p : -1 + MultiThread matches[startRow, endRow][startLayer, endLayer] = (numtype(wv[p][col][q]) != 2) ? p : -1 else - MultiThread matches[startRow, endRow][startLayer, endLayer] = numtype(wv[p][col][q]) == 2 ? p : -1 + MultiThread matches[startRow, endRow][startLayer, endLayer] = (numtype(wv[p][col][q]) == 2) ? p : -1 endif elseif(prop & PROP_MATCHES_VAR_BIT_MASK) if(prop & PROP_NOT) MultiThread matches[startRow, endRow][startLayer, endLayer] = !(wv[p][col][q] & var) ? p : -1 else - MultiThread matches[startRow, endRow][startLayer, endLayer] = wv[p][col][q] & var ? p : -1 + MultiThread matches[startRow, endRow][startLayer, endLayer] = (wv[p][col][q] & var) ? p : -1 endif elseif(prop & PROP_GREP) if(prop & PROP_NOT) @@ -564,7 +564,7 @@ threadsafe Function/WAVE FindIndizes(WAVE numericOrTextWave, [variable col, stri if(prop & PROP_NOT) MultiThread matches[startRow, endRow][startLayer, endLayer] = !(str2num(wvText[p][col][q]) & var) ? p : -1 else - MultiThread matches[startRow, endRow][startLayer, endLayer] = str2num(wvText[p][col][q]) & var ? p : -1 + MultiThread matches[startRow, endRow][startLayer, endLayer] = (str2num(wvText[p][col][q]) & var) ? p : -1 endif elseif(prop & PROP_GREP) if(prop & PROP_NOT) diff --git a/Packages/MIES/MIES_MiesUtilities_Channels.ipf b/Packages/MIES/MIES_MiesUtilities_Channels.ipf index f848d50c74..633a857a4a 100644 --- a/Packages/MIES/MIES_MiesUtilities_Channels.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Channels.ipf @@ -247,13 +247,13 @@ threadsafe static Function/WAVE GetActiveChannelsTTL(WAVE numericalValues, WAVE if(WaveExists(ttlBitsRackZero)) HW_ITC_GetRackRange(RACK_ZERO, first, last) bits = ttlBitsRackZero[index] - entries[first, last] = (bits & (1 << p)) != 0 ? p : NaN + entries[first, last] = ((bits & (1 << p)) != 0) ? p : NaN endif if(WaveExists(ttlBitsRackOne)) HW_ITC_GetRackRange(RACK_ONE, first, last) bits = ttlBitsRackOne[index] - entries[first, last] = (bits & (1 << (p - NUM_ITC_TTL_BITS_PER_RACK))) != 0 ? p : NaN + entries[first, last] = ((bits & (1 << (p - NUM_ITC_TTL_BITS_PER_RACK))) != 0) ? p : NaN endif return entries @@ -273,14 +273,14 @@ threadsafe static Function/WAVE GetActiveChannelsTTL(WAVE numericalValues, WAVE HW_ITC_GetRackRange(RACK_ZERO, first, last) bits = ttlBitsRackZero[index] hwChannel = ttlChannelRackZero[index] - channelMapGUIToHW[first, last][%TTLBITNR] = (bits & (1 << p)) != 0 ? p : NaN + channelMapGUIToHW[first, last][%TTLBITNR] = ((bits & (1 << p)) != 0) ? p : NaN channelMapGUIToHW[first, last][%HWCHANNEL] = IsNaN(channelMapGUIToHW[p][%TTLBITNR]) ? NaN : hwChannel endif if(haveRackOne) HW_ITC_GetRackRange(RACK_ONE, first, last) bits = ttlBitsRackOne[index] hwChannel = ttlChannelRackOne[index] - channelMapGUIToHW[first, last][%TTLBITNR] = (bits & (1 << (p - NUM_ITC_TTL_BITS_PER_RACK))) != 0 ? p - NUM_ITC_TTL_BITS_PER_RACK : NaN + channelMapGUIToHW[first, last][%TTLBITNR] = ((bits & (1 << (p - NUM_ITC_TTL_BITS_PER_RACK))) != 0) ? (p - NUM_ITC_TTL_BITS_PER_RACK) : NaN channelMapGUIToHW[first, last][%HWCHANNEL] = IsNaN(channelMapGUIToHW[p][%TTLBITNR]) ? NaN : hwChannel endif if(haveRackZero || haveRackOne) @@ -300,13 +300,13 @@ threadsafe static Function/WAVE GetActiveChannelsTTL(WAVE numericalValues, WAVE HW_ITC_GetRackRange(RACK_ZERO, first, last) bits = ttlBitsRackZero[index] hwChannel = ttlChannelRackZero[index] - channelMapHWToGUI[hwChannel][first, last] = (bits & (1 << q)) != 0 ? q : NaN + channelMapHWToGUI[hwChannel][first, last] = ((bits & (1 << q)) != 0) ? q : NaN endif if(haveRackOne) HW_ITC_GetRackRange(RACK_ONE, first, last) bits = ttlBitsRackOne[index] hwChannel = ttlChannelRackOne[index] - channelMapHWToGUI[hwChannel][first - NUM_ITC_TTL_BITS_PER_RACK, last - NUM_ITC_TTL_BITS_PER_RACK] = (bits & (1 << q)) != 0 ? q + NUM_ITC_TTL_BITS_PER_RACK : NaN + channelMapHWToGUI[hwChannel][first - NUM_ITC_TTL_BITS_PER_RACK, last - NUM_ITC_TTL_BITS_PER_RACK] = ((bits & (1 << q)) != 0) ? (q + NUM_ITC_TTL_BITS_PER_RACK) : NaN endif if(haveRackZero || haveRackOne) return channelMapHWToGUI diff --git a/Packages/MIES/MIES_MiesUtilities_Config.ipf b/Packages/MIES/MIES_MiesUtilities_Config.ipf index d775353901..7fd2bd24ed 100644 --- a/Packages/MIES/MIES_MiesUtilities_Config.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Config.ipf @@ -18,7 +18,7 @@ threadsafe Function GetSamplingInterval(WAVE config, variable channelType) ASSERT_TS(IsValidConfigWave(config, version = 0), "Expected a valid config wave") [colChannelType, colChannelNumber] = GetConfigWaveDims(config) colSamplingInterval = FindDimLabel(config, COLS, "SamplingInterval") - colSamplingInterval = colSamplingInterval == -2 ? 2 : colSamplingInterval + colSamplingInterval = (colSamplingInterval == -2) ? 2 : colSamplingInterval numChannels = DimSize(config, ROWS) for(i = 0; i < numChannels; i += 1) diff --git a/Packages/MIES/MIES_MiesUtilities_Conversion.ipf b/Packages/MIES/MIES_MiesUtilities_Conversion.ipf index 53e3866aac..55fa106f33 100644 --- a/Packages/MIES/MIES_MiesUtilities_Conversion.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Conversion.ipf @@ -66,7 +66,7 @@ End /// @param xopVar numeric XOP channel types threadsafe Function GetNumberFromType([variable var, string str, variable xopVar]) - ASSERT_TS(ParamIsDefault(var) + ParamIsDefault(str) + ParamIsDefault(xopVar) == 2, "Expected exactly one parameter") + ASSERT_TS((ParamIsDefault(var) + ParamIsDefault(str) + ParamIsDefault(xopVar)) == 2, "Expected exactly one parameter") if(!ParamIsDefault(str)) strswitch(str) diff --git a/Packages/MIES/MIES_MiesUtilities_Device.ipf b/Packages/MIES/MIES_MiesUtilities_Device.ipf index 3f2866cafb..f7f60a19db 100644 --- a/Packages/MIES/MIES_MiesUtilities_Device.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Device.ipf @@ -110,21 +110,21 @@ Function/S GetAllDevicesWithContent([variable contentType]) dataPath = GetDeviceDataPathAsString(device) testPulsePath = GetDeviceTestPulseAsString(device) - if(contentType & CONTENT_TYPE_SWEEP \ + if((contentType & CONTENT_TYPE_SWEEP) \ && DataFolderExists(dataPath) \ && CountObjects(dataPath, COUNTOBJECTS_WAVES) > 0) list = AddListItem(device, list, ";", Inf) continue endif - if(contentType & CONTENT_TYPE_TPSTORAGE \ + if((contentType & CONTENT_TYPE_TPSTORAGE) \ && DataFolderExists(testPulsePath) \ && ItemsInList(GetListOfObjects($testPulsePath, TP_STORAGE_REGEXP)) > 0) list = AddListItem(device, list, ";", Inf) continue endif - if(contentType & CONTENT_TYPE_COMMENT \ + if((contentType & CONTENT_TYPE_COMMENT) \ && DeviceHasUserComments(device)) list = AddListItem(device, list, ";", Inf) continue diff --git a/Packages/MIES/MIES_MiesUtilities_GUI.ipf b/Packages/MIES/MIES_MiesUtilities_GUI.ipf index 6818d672c3..d3b2cafa60 100644 --- a/Packages/MIES/MIES_MiesUtilities_GUI.ipf +++ b/Packages/MIES/MIES_MiesUtilities_GUI.ipf @@ -119,7 +119,7 @@ Function [STRUCT RGBColor s] GetHeadstageColor(variable headstage, [variable cha blockSizeTTL = NUM_ITC_TTL_BITS_PER_RACK + 1 activeChannelIndexAsOfITC = trunc(channelNumber / NUM_ITC_TTL_BITS_PER_RACK) ttlBitAsOfITC = mod(channelNumber, NUM_ITC_TTL_BITS_PER_RACK) - blockOffsetTTL = isSplitted ? 1 + ttlBitAsOfITC : 0 + blockOffsetTTL = isSplitted ? (1 + ttlBitAsOfITC) : 0 colorIndex = offsetTTL + activeChannelIndexAsOfITC * blockSizeTTL + blockOffsetTTL else colorIndex = NUM_HEADSTAGES @@ -608,7 +608,7 @@ Function EqualizeVerticalAxesRanges(string graph, [variable ignoreAxesWithLevelC if(!IsFinite(refClampMode)) refClampMode = clampMode else - axisClampMode[i] = refClampMode == clampMode ? clampMode : -1 + axisClampMode[i] = (refClampMode == clampMode) ? clampMode : -1 endif WaveStats/M=2/Q/R=(xRangeBegin, xRangeEnd) wv diff --git a/Packages/MIES/MIES_MiesUtilities_Logbook.ipf b/Packages/MIES/MIES_MiesUtilities_Logbook.ipf index 21409668bb..74e52a7aac 100644 --- a/Packages/MIES/MIES_MiesUtilities_Logbook.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Logbook.ipf @@ -1372,7 +1372,7 @@ threadsafe static Function FindRange(WAVE wv, variable col, variable val, variab for(i = numRows - 2; i >= 0; i -= 1) index = indizes[i] // a backward search stops when the beginning of the last sequence was found - if(index < first - 1 && sourceTypeCol >= 0) + if(index < (first - 1) && sourceTypeCol >= 0) if(IsNumeric) for(j = index + 1; j < first; j += 1) if(!IsNaN(wv[j][sourceTypeCol][0])) @@ -1619,7 +1619,7 @@ End /// Since that commit we store the data in `INDEP_HEADSTAGE`. threadsafe Function GetIndexForHeadstageIndepData(WAVE values) - return DimSize(values, LAYERS) == NUM_HEADSTAGES ? 0 : INDEP_HEADSTAGE + return (DimSize(values, LAYERS) == NUM_HEADSTAGES) ? 0 : INDEP_HEADSTAGE End /// @brief Create a labnotebook key for unassociated channels @@ -1701,7 +1701,7 @@ End /// UTF_NOINSTRUMENTATION threadsafe Function ReverseEntrySourceTypeMapper(variable mapped) - return (mapped == 0 ? NaN : --mapped) + return ((mapped == 0) ? NaN : --mapped) End /// @brief Return labnotebook keys for patch seq analysis functions diff --git a/Packages/MIES/MIES_MiesUtilities_Logging.ipf b/Packages/MIES/MIES_MiesUtilities_Logging.ipf index c780edd2da..62b4bbb2a6 100644 --- a/Packages/MIES/MIES_MiesUtilities_Logging.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Logging.ipf @@ -142,7 +142,7 @@ Function ArchiveLogFilesOnceAndKeepMonth() if(fSize < ARCHIVE_SIZETHRESHOLD) continue endif - if(fSize > 512 * 1024 * 1024) + if(fSize > (512 * 1024 * 1024)) printf "Just a moment, archiving log file %s.\rThis is only done once.\r", file endif @@ -232,7 +232,7 @@ static Function SaveRemainingLog(WAVE/T logData, variable index, string fullFile zeromq_set(flags) endif - if(index == DimSize(logData, ROWS) - 1) + if(index == (DimSize(logData, ROWS) - 1)) DeleteFile fullFilePath return NaN endif diff --git a/Packages/MIES/MIES_MiesUtilities_Recreation.ipf b/Packages/MIES/MIES_MiesUtilities_Recreation.ipf index 7332ee1723..557861b5a7 100644 --- a/Packages/MIES/MIES_MiesUtilities_Recreation.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Recreation.ipf @@ -376,7 +376,7 @@ static Function AddHeadstageFromLBN(WAVE numericalValues, variable sweepNo, WAVE for(i = 0; i < numEntries; i += 1) [WAVE setting, index] = GetLastSettingChannel(numericalValues, $"", sweepNo, "Headstage Active", configWave[i][%ChannelNumber], configWave[i][%ChannelType], DATA_ACQUISITION_MODE) if(WaveExists(setting)) - configWave[i][%HEADSTAGE] = setting[index] == 1 ? index : NaN + configWave[i][%HEADSTAGE] = (setting[index] == 1) ? index : NaN else configWave[i][%HEADSTAGE] = NaN endif diff --git a/Packages/MIES/MIES_MiesUtilities_Sweep.ipf b/Packages/MIES/MIES_MiesUtilities_Sweep.ipf index e24fadb590..70142e4171 100644 --- a/Packages/MIES/MIES_MiesUtilities_Sweep.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Sweep.ipf @@ -81,7 +81,7 @@ threadsafe Function/WAVE GetDAQDataSingleColumnWave(DFREF sweepDFR, variable cha splitTTLBits = !!splitTTLBits endif - ASSERT_TS(ParamIsDefault(splitTTLBits) + ParamIsDefault(ttlBit) != 1, "Expected both or none of splitTTLBits and ttlBit") + ASSERT_TS((ParamIsDefault(splitTTLBits) + ParamIsDefault(ttlBit)) != 1, "Expected both or none of splitTTLBits and ttlBit") ASSERT_TS(channelNumber < GetNumberFromType(xopVar = channelType), "Invalid channel index") wvName = StringFromList(channelType, XOP_CHANNEL_NAMES) + "_" + num2str(channelNumber) @@ -250,7 +250,7 @@ threadsafe static Function AreAllSingleSweepWavesPresent(DFREF targetDFR, WAVE/T chanMissing = 1 endif endif - ASSERT_TS(chanPresent + chanMissing == 1, "For sweep in " + GetDataFolder(1, targetDFR) + " some single channels are missing, some are present.") + ASSERT_TS((chanPresent + chanMissing) == 1, "For sweep in " + GetDataFolder(1, targetDFR) + " some single channels are missing, some are present.") endfor return chanPresent diff --git a/Packages/MIES/MIES_MiesUtilities_Uploads.ipf b/Packages/MIES/MIES_MiesUtilities_Uploads.ipf index 610632b96e..9638fc3151 100644 --- a/Packages/MIES/MIES_MiesUtilities_Uploads.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Uploads.ipf @@ -27,7 +27,7 @@ Function UploadCrashDumpsDaily() lastWrite = ParseISO8601TimeStamp(JSON_GetString(jsonID, "/diagnostics/last upload")) - if(lastWrite + SECONDS_PER_DAY > DateTimeInUTC()) + if((lastWrite + SECONDS_PER_DAY) > DateTimeInUTC()) // nothing to do return NaN endif @@ -60,7 +60,7 @@ Function UploadLogFilesDaily() lastWrite = ParseISO8601TimeStamp(ts) now = DateTimeInUTC() - if(lastWrite + SECONDS_PER_DAY > now) + if((lastWrite + SECONDS_PER_DAY) > now) // nothing to do return NaN endif @@ -105,7 +105,7 @@ Function UploadPingPeriodically() now = DateTimeInUTC() lastPing = ParseISO8601TimeStamp(GetUserPingTimestamp()) - if(now - lastPing < SECONDS_PER_DAY * 7) + if((now - lastPing) < (SECONDS_PER_DAY * 7)) today = GetDayOfWeek(now) lastWeekDay = GetDayOfWeek(lastPing) if(today == lastWeekDay || \ diff --git a/Packages/MIES/MIES_NeuroDataWithoutBorders.ipf b/Packages/MIES/MIES_NeuroDataWithoutBorders.ipf index c750be2591..44a69d9bab 100644 --- a/Packages/MIES/MIES_NeuroDataWithoutBorders.ipf +++ b/Packages/MIES/MIES_NeuroDataWithoutBorders.ipf @@ -202,7 +202,7 @@ static Function [variable fileID, variable createdNewNWBFile] NWB_GetFileForExpo // as these are most probably due to the above bug. It is very // unlikely that the time between device locking (session start // time) and first data acquisition is larger than 45min. - if((oldestData - sessionStartTime) > 0.75 * 3600) + if((oldestData - sessionStartTime) > (0.75 * 3600)) ti.session_start_time = floor(oldestData) else ti.session_start_time = min(sessionStartTime, floor(oldestData)) @@ -1936,7 +1936,7 @@ static Function NWB_AppendLogFileToString(string path, string &str) endif endif - ASSERT(strlen(data) + strlen(str) + 2 + strlen(LOGFILE_NWB_MARKER) < STRING_MAX_SIZE, "NWB log file string too bad.") + ASSERT((strlen(data) + strlen(str) + 2 + strlen(LOGFILE_NWB_MARKER)) < STRING_MAX_SIZE, "NWB log file string too bad.") str += "\n" + LOGFILE_NWB_MARKER + "\n" + data End diff --git a/Packages/MIES/MIES_OptimzedOverlapDistributedAcquisition.ipf b/Packages/MIES/MIES_OptimzedOverlapDistributedAcquisition.ipf index 4d87050708..f5f2e286fc 100644 --- a/Packages/MIES/MIES_OptimzedOverlapDistributedAcquisition.ipf +++ b/Packages/MIES/MIES_OptimzedOverlapDistributedAcquisition.ipf @@ -203,7 +203,7 @@ static Function/WAVE OOD_CalculateOffsetsImpl(WAVE/WAVE setRegions) endfor while(overlap) - if(setNr < numSets - 1) + if(setNr < (numSets - 1)) Redimension/N=(baseRegCnt + regCnt, -1) baseRegions baseRegions[baseRegCnt,][] = regions[p - baseRegCnt][q] + offsets[setNr] SortColumns/KNDX={0} sortWaves={baseRegions} diff --git a/Packages/MIES/MIES_Oscilloscope.ipf b/Packages/MIES/MIES_Oscilloscope.ipf index 3c511287c2..1fd3eadd5a 100644 --- a/Packages/MIES/MIES_Oscilloscope.ipf +++ b/Packages/MIES/MIES_Oscilloscope.ipf @@ -98,7 +98,7 @@ Function SCOPE_UpdateGraph(string device, variable dataAcqOrTP) NVAR timestamp = $GetLastAcqHookCallTimeStamp(device) updateInt = DAG_GetNumericalValue(device, "setvar_Settings_OsciUpdInt") now = DateTime - if((now - timestamp) < updateInt * MILLI_TO_ONE) + if((now - timestamp) < (updateInt * MILLI_TO_ONE)) return 0 endif timestamp = now @@ -225,7 +225,7 @@ Function SCOPE_CreateGraph(string device, variable dataAcqOrTP) activeHeadStage = DAG_GetNumericalValue(device, "slider_DataAcq_ActiveHeadstage") [axisMinTop, axisMaxTop] = GetAxisRange(graph, AXIS_SCOPE_TP_TIME, mode = AXIS_RANGE_INC_AUTOSCALED) - if(dataAcqOrTP != TEST_PULSE_MODE || !showPowerSpectrum && scopeScaleMode == GUI_SETTING_OSCI_SCALE_FIXED) + if((dataAcqOrTP != TEST_PULSE_MODE || !showPowerSpectrum) && scopeScaleMode == GUI_SETTING_OSCI_SCALE_FIXED) WAVE previousADAxesProperties = GetAxesProperties(graph, axesRegexp = AXIS_SCOPE_AD_REGEXP, orientation = AXIS_ORIENTATION_LEFT, mode = AXIS_RANGE_INC_AUTOSCALED) endif diff --git a/Packages/MIES/MIES_OverlaySweeps.ipf b/Packages/MIES/MIES_OverlaySweeps.ipf index ada7ac392e..11828c3bac 100644 --- a/Packages/MIES/MIES_OverlaySweeps.ipf +++ b/Packages/MIES/MIES_OverlaySweeps.ipf @@ -246,7 +246,7 @@ Function OVS_UpdatePanel(string win, [variable fullUpdate]) listBoxSelWave[][%Sweep] = LISTBOX_CHECKBOX listBoxSelWave[lastEntry][%Sweep] = LISTBOX_CHECKBOX | LISTBOX_CHECKBOX_SELECTED else - listBoxSelWave[][%Sweep] = listBoxSelWave[p] & LISTBOX_CHECKBOX_SELECTED ? LISTBOX_CHECKBOX | LISTBOX_CHECKBOX_SELECTED : LISTBOX_CHECKBOX + listBoxSelWave[][%Sweep] = (listBoxSelWave[p] & LISTBOX_CHECKBOX_SELECTED) ? (LISTBOX_CHECKBOX | LISTBOX_CHECKBOX_SELECTED) : LISTBOX_CHECKBOX endif // we select the first sweep when doing a fullUpdate and nothing selected @@ -434,7 +434,7 @@ Function OVS_ChangeSweepSelectionState(string win, variable newState, [variable for(i = 0; i < numEntries; i += 1) sweepNo = sweeps[i] FindValue/RMD=[][0]/TEXT=(num2str(sweepNo))/TXOP=4 listboxWave - indices1D[i] = V_Value >= 0 ? V_Value : NaN + indices1D[i] = (V_Value >= 0) ? V_Value : NaN endfor WAVE/Z indices = ZapNans(indices1D) diff --git a/Packages/MIES/MIES_PressureControl.ipf b/Packages/MIES/MIES_PressureControl.ipf index 7edc1e6721..fc838ee4b4 100644 --- a/Packages/MIES/MIES_PressureControl.ipf +++ b/Packages/MIES/MIES_PressureControl.ipf @@ -167,7 +167,7 @@ static Function P_UpdateTPStorage(string device, variable headStage) old = P_FindLastSetEntry(TPStorage, count - 1, headstage, "Pressure") new = PressureDataWv[headStage][%RealTimePressure][0] - TPStorage[count][headstage][%PressureChange] = (new == old ? NaN : PRESSURE_CHANGE) + TPStorage[count][headstage][%PressureChange] = ((new == old) ? NaN : PRESSURE_CHANGE) TPStorage[count][headstage][%PressureMethod] = PressureDataWv[headStage][%Approach_Seal_BrkIn_Clear] old = P_FindLastSetEntry(TPStorage, count - 1, headstage, "PressureMethod") @@ -883,9 +883,9 @@ Function P_UpdatePressureDataStorageWv(string device) /// @todo Needs to be rewo PressureDataWv[settingHS][%ADC] = GetPopupMenuIndex(device, "Popup_Settings_Pressure_AD") PressureDataWv[settingHS][%ADC_Gain] = GetSetVariable(device, "setvar_Settings_Pressure_ADgain") idx = GetPopupMenuIndex(device, "Popup_Settings_Pressure_TTLA") - PressureDataWv[settingHS][%TTL_A] = idx == 0 ? NaN : --idx + PressureDataWv[settingHS][%TTL_A] = (idx == 0) ? NaN : --idx idx = GetPopupMenuIndex(device, "Popup_Settings_Pressure_TTLB") - PressureDataWv[settingHS][%TTL_B] = idx == 0 ? NaN : --idx + PressureDataWv[settingHS][%TTL_B] = (idx == 0) ? NaN : --idx PressureDataWv[userHS][%ManSSPressure] = DAG_GetNumericalValue(device, "setvar_DataAcq_SSPressure") PressureDataWv[][%PSI_air] = GetSetVariable(device, "setvar_Settings_InAirP") PressureDataWv[][%PSI_solution] = GetSetVariable(device, "setvar_Settings_InBathP") @@ -1314,7 +1314,7 @@ End static Function P_FillDAQWaves(string device, variable headStage, STRUCT P_PressureDA &p) - ASSERT(p.first < p.last && p.last - p.first >= 1, "first/last mismatch") + ASSERT(p.first < p.last && (p.last - p.first) >= 1, "first/last mismatch") variable hwType @@ -2456,16 +2456,16 @@ Function P_UpdatePressureType(string device) WAVE pressureType = GetPressureTypeWv(device) WAVE pressureDataWv = P_GetPressureDataWaveRef(device) // Encode atm pressure mode - pressureType[] = pressureDataWv[p][0] == PRESSURE_METHOD_ATM ? PRESSURE_TYPE_ATM : pressureType[p] + pressureType[] = (pressureDataWv[p][0] == PRESSURE_METHOD_ATM) ? PRESSURE_TYPE_ATM : pressureType[p] // Encode automated pressure modes - pressureType[] = pressureDataWv[p][0] >= PRESSURE_METHOD_APPROACH && pressureDataWv[p][0] <= PRESSURE_METHOD_CLEAR ? PRESSURE_TYPE_AUTO : pressureType[p] + pressureType[] = (pressureDataWv[p][0] >= PRESSURE_METHOD_APPROACH && pressureDataWv[p][0] <= PRESSURE_METHOD_CLEAR) ? PRESSURE_TYPE_AUTO : pressureType[p] // Encode manual pressure mode - pressureType[] = pressureDataWv[p][0] == PRESSURE_METHOD_MANUAL ? PRESSURE_TYPE_MANUAL : pressureType[p] + pressureType[] = (pressureDataWv[p][0] == PRESSURE_METHOD_MANUAL) ? PRESSURE_TYPE_MANUAL : pressureType[p] // Encode user access headstage = pressureDataWv[0][%userSelectedHeadStage] - pressureType[headstage] = P_GetUserAccess(device, headstage, pressureDataWv[headstage][0]) == ACCESS_USER ? PRESSURE_TYPE_USER : PressureType[headstage] + pressureType[headstage] = (P_GetUserAccess(device, headstage, pressureDataWv[headstage][0]) == ACCESS_USER) ? PRESSURE_TYPE_USER : PressureType[headstage] // Encode headstages without valid pressure settings - pressureType[] = P_ValidatePressureSetHeadstage(device, p) == 1 ? pressureType[p] : NaN + pressureType[] = (P_ValidatePressureSetHeadstage(device, p) == 1) ? pressureType[p] : NaN End Function/S P_PressureMethodToString(variable method) diff --git a/Packages/MIES/MIES_ProgrammaticGUIControl.ipf b/Packages/MIES/MIES_ProgrammaticGUIControl.ipf index b4dc9281a7..88f20dbbdb 100644 --- a/Packages/MIES/MIES_ProgrammaticGUIControl.ipf +++ b/Packages/MIES/MIES_ProgrammaticGUIControl.ipf @@ -221,7 +221,7 @@ Function PGC_SetAndActivateControl(string win, string control, [variable val, st ButtonProc(ba) break case CONTROL_TYPE_POPUPMENU: - ASSERT(ParamIsDefault(val) + ParamIsDefault(str) == 1, "Needs an argument") + ASSERT((ParamIsDefault(val) + ParamIsDefault(str)) == 1, "Needs an argument") [popupMenuValue, popupMenuType] = ParsePopupMenuValue(S_recreation) @@ -314,7 +314,7 @@ Function PGC_SetAndActivateControl(string win, string control, [variable val, st TabProc(tca) break case CONTROL_TYPE_SETVARIABLE: - ASSERT(ParamIsDefault(val) + ParamIsDefault(str) == 1, "Needs a variable or string argument") + ASSERT((ParamIsDefault(val) + ParamIsDefault(str)) == 1, "Needs a variable or string argument") if(GetControlSettingVar(S_recreation, "noEdit") == 1) switch(mode) diff --git a/Packages/MIES/MIES_PulseAveraging.ipf b/Packages/MIES/MIES_PulseAveraging.ipf index 5d7dacd3cd..45206f509b 100644 --- a/Packages/MIES/MIES_PulseAveraging.ipf +++ b/Packages/MIES/MIES_PulseAveraging.ipf @@ -408,8 +408,8 @@ static Function PA_DiffPulseInfos(WAVE numericalValues, variable sweepNo, WAVE/Z else for(i = 0; i < numRowsEpochs; i += 1) for(j = 0; j < numColsEpochs; j += 1) - if(abs(pulseInfosEpochs[i][j] - pulseInfosCalc[i][j]) > warnDiffms \ - && j == DimSize(pulseInfosEpochs, COLS) - 1 && i == DimSize(pulseInfosEpochs, ROWS) - 1) + if(abs(pulseInfosEpochs[i][j] - pulseInfosCalc[i][j]) > warnDiffms \ + && j == (DimSize(pulseInfosEpochs, COLS) - 1) && i == (DimSize(pulseInfosEpochs, ROWS) - 1)) print/D "Warn: Differing pulse infos in [" + num2str(i) + ", " + GetDimLabel(pulseInfosEpochs, COLS, j) + "], from epochs:\r", pulseInfosEpochs, "from Calculation:\r", pulseInfosCalc break endif @@ -477,7 +477,7 @@ static Function/WAVE PA_RetrievePulseInfosFromEpochs(string epochInfo) pulseInfos[idx][%Length] = (last - first) * ONE_TO_MILLI hasOneValidEntry = 1 - elseif(level == 3 && (strsearch(tags, "Active", 0) != -1) || (strsearch(tags, "SubType=Pulse;", 0) != -1)) + elseif((level == 3 && (strsearch(tags, "Active", 0) != -1)) || (strsearch(tags, "SubType=Pulse;", 0) != -1)) pulseInfos[idx][%PulseStart] = first * ONE_TO_MILLI pulseInfos[idx][%PulseEnd] = last * ONE_TO_MILLI @@ -1384,17 +1384,17 @@ threadsafe static Function/WAVE PA_GetSetWaves_TS(WAVE properties, WAVE/WAVE pro for(i = 0; i < numWaves; i += 1) index = setIndizes[i] - if(getMode & PA_GETSETWAVES_NEW && index >= startIndexNewPulses && !(properties[index][PA_PROPERTIES_INDEX_PULSEHASFAILED] == 1 && removeFailedPulses)) + if((getMode & PA_GETSETWAVES_NEW) && index >= startIndexNewPulses && !(properties[index][PA_PROPERTIES_INDEX_PULSEHASFAILED] == 1 && removeFailedPulses)) setWavesNew[numNewPulses][0] = propertiesWaves[index][PA_PROPERTIESWAVES_INDEX_PULSE] setWavesNew[numNewPulses][1] = propertiesWaves[index][PA_PROPERTIESWAVES_INDEX_PULSENOTE] numNewPulses += 1 endif - if(getMode & PA_GETSETWAVES_OLD && index < startIndexNewPulses && !(properties[index][PA_PROPERTIES_INDEX_PULSEHASFAILED] == 1 && removeFailedPulses)) + if((getMode & PA_GETSETWAVES_OLD) && index < startIndexNewPulses && !(properties[index][PA_PROPERTIES_INDEX_PULSEHASFAILED] == 1 && removeFailedPulses)) setWavesOld[numOldPulses][0] = propertiesWaves[index][PA_PROPERTIESWAVES_INDEX_PULSE] setWavesOld[numOldPulses][1] = propertiesWaves[index][PA_PROPERTIESWAVES_INDEX_PULSENOTE] numOldPulses += 1 endif - if(getMode & PA_GETSETWAVES_ALL && !(properties[index][PA_PROPERTIES_INDEX_PULSEHASFAILED] == 1 && removeFailedPulses)) + if((getMode & PA_GETSETWAVES_ALL) && !(properties[index][PA_PROPERTIES_INDEX_PULSEHASFAILED] == 1 && removeFailedPulses)) setWavesAll[numAllPulses][0] = propertiesWaves[index][PA_PROPERTIESWAVES_INDEX_PULSE] setWavesAll[numAllPulses][1] = propertiesWaves[index][PA_PROPERTIESWAVES_INDEX_PULSENOTE] numAllPulses += 1 @@ -1606,7 +1606,7 @@ static Function/S PA_ShowPulses(string win, STRUCT PulseAverageSettings &pa, STR for(j = 0; j < numActive; j += 1) channelNumber = pasi.channels[j] // graph change logic - if(!pa.multipleGraphs && j == 0 && i == firstActiveRegionIndex || pa.multipleGraphs) + if((!pa.multipleGraphs && j == 0 && i == firstActiveRegionIndex) || pa.multipleGraphs) graph = PA_GetGraph(win, pa, PA_DISPLAYMODE_TRACES, channelNumber, region, i + 1, j + 1, numActive) endif // build list of used graphs, when not incremental we clear it on first encounter @@ -1741,7 +1741,7 @@ static Function/S PA_ShowPulses(string win, STRUCT PulseAverageSettings &pa, STR vertAxis = axesNames[0] horizAxis = axesNames[1] - if(!pa.multipleGraphs && i == 0 && j == 0 || pa.multipleGraphs) + if((!pa.multipleGraphs && i == 0 && j == 0) || pa.multipleGraphs) graph = PA_GetGraph(win, pa, PA_DISPLAYMODE_TRACES, channelNumber, region, i + 1, j + 1, numActive) graphDataIndex = PA_GetTraceCountFromGraphData(graph) WAVE/T averageTraceNames = ListToTextWave(paGraphData[graphDataIndex][lblTRACES_AVERAGE], ";") @@ -2152,7 +2152,7 @@ threadsafe static Function PA_TAAdaptAverageWave(WAVE/Z avg, WAVE/WAVE set) dOffset = DimOffset(avg, ROWS) dDelta = DimDelta(avg, ROWS) l = (WaveMax(left) - dOffset) / dDelta - l = IsInteger(l) ? l : trunc(l) + 1 + l = IsInteger(l) ? l : (trunc(l) + 1) r = (WaveMin(right) - dOffset) / dDelta r = IsInteger(r) ? r : trunc(r) if(l >= r) @@ -2238,7 +2238,7 @@ Function PA_UpdateScaleBars(string win, variable resetToUserLength) bsPanel = GetUserData(win, "", MIES_BSP_PA_MAINPANEL) - displayMode = ItemsInList(ImageNameList(win, ";")) > 0 ? PA_DISPLAYMODE_IMAGES : PA_DISPLAYMODE_TRACES + displayMode = (ItemsInList(ImageNameList(win, ";")) > 0) ? PA_DISPLAYMODE_IMAGES : PA_DISPLAYMODE_TRACES STRUCT PulseAverageSettings pa PA_GatherSettings(bsPanel, pa) @@ -2288,7 +2288,7 @@ static Function PA_DrawScaleBars(string win, STRUCT PulseAverageSettings &pa, ST vertAxis = axesNames[0] horizAxis = axesNames[1] - if(!pa.multipleGraphs && i == 0 && j == firstActiveRegionIndex || pa.multipleGraphs) + if((!pa.multipleGraphs && i == 0 && j == firstActiveRegionIndex) || pa.multipleGraphs) SetDrawLayer/K/W=$graph $PA_DRAWLAYER_SCALEBAR endif @@ -3036,7 +3036,7 @@ static Function PA_AddColorScales(string win, STRUCT PulseAverageSettings &pa, S for(j = 0; j < numActive; j += 1) channelNumber = pasi.channels[j] - if(!pa.multipleGraphs && i == 0 && j == 0 || pa.multipleGraphs) + if((!pa.multipleGraphs && i == 0 && j == 0) || pa.multipleGraphs) graph = PA_GetGraphName(win, pa, PA_DISPLAYMODE_IMAGES, channelNumber, i + 1) endif @@ -3089,7 +3089,7 @@ static Function PA_AddColorScales(string win, STRUCT PulseAverageSettings &pa, S for(j = 0; j < numActive; j += 1) channelNumber = pasi.channels[j] - if(!pa.multipleGraphs && i == 0 && j == 0 || pa.multipleGraphs) + if((!pa.multipleGraphs && i == 0 && j == 0) || pa.multipleGraphs) graph = PA_GetGraphName(win, pa, PA_DISPLAYMODE_IMAGES, channelNumber, i + 1) graphsToResize = AddListItem(graph, graphsToResize, ";", Inf) colorScaleGraph = PA_GetColorScaleGraph(graph) @@ -3140,7 +3140,7 @@ static Function PA_AddColorScales(string win, STRUCT PulseAverageSettings &pa, S channelNumber = pasi.channels[i] // we always take the last region except for the last channel as that would be diagonal again - if(i == numActive - 1) + if(i == (numActive - 1)) regionTaken = 0 region = pasi.regions[regionTaken] else @@ -3195,7 +3195,7 @@ static Function PA_AddColorScales(string win, STRUCT PulseAverageSettings &pa, S colorScaleGraph = PA_GetColorScaleGraph(graph) ASSERT(WindowExists(colorScaleGraph), "Missing external subwindow for color scale") - if(i == numActive - 1) + if(i == (numActive - 1)) regionTaken = 0 region = pasi.regions[regionTaken] imageGraph = PA_GetGraphName(win, pa, PA_DISPLAYMODE_IMAGES, channelNumber, 1) @@ -3398,7 +3398,7 @@ static Function/S PA_ShowImage(string win, STRUCT PulseAverageSettings &pa, STRU [WAVE averageWave, baseName] = GetPAPermanentAverageWave(pasi.pulseAverageDFR, channelNumber, region) - if(!pa.multipleGraphs && i == 0 && j == 0 || pa.multipleGraphs) + if((!pa.multipleGraphs && i == 0 && j == 0) || pa.multipleGraphs) graph = PA_GetGraph(win, pa, PA_DISPLAYMODE_IMAGES, channelNumber, region, j + 1, i + 1, numActive) graphsWithImages += AddPrefixToEachListItem(graph + "#", ImageNameList(graph, ";")) SetDrawLayer/W=$graph/K $PA_DRAWLAYER_FAILED_PULSES @@ -3436,7 +3436,7 @@ static Function/S PA_ShowImage(string win, STRUCT PulseAverageSettings &pa, STRU refScaleRight = WaveMax(scaleRight) refScalePoints = WaveMax(scalePoints) refScaleDelta = (refScaleRight - refScaleLeft) / refScalePoints - scaleChanged = (DimOffset(img, ROWS) != refScaleLeft) || (DimOffset(img, ROWS) + (DimSize(img, ROWS) - 1) * DimDelta(img, ROWS) != refScaleRight) + scaleChanged = (DimOffset(img, ROWS) != refScaleLeft) || ((DimOffset(img, ROWS) + (DimSize(img, ROWS) - 1) * DimDelta(img, ROWS)) != refScaleRight) xUnits = WaveUnits(set2[0][0], ROWS) WAVE oldSizes = GetWaveDimensions(img) @@ -3482,12 +3482,12 @@ static Function/S PA_ShowImage(string win, STRUCT PulseAverageSettings &pa, STRU Multithread img[][colStart, colEnd - 1] = WaveRef(set2[q][0])(x); err = GetRTError(1) // see developer docu section Preventing Debugger Popup for(k = colStart; k < colEnd; k += 1) pulseScaleLeft = scaleLeft[k] - if(refScaleLeft != pulseScaleLeft && pulseScaleLeft > refScaleLeft + refScaleDelta) + if(refScaleLeft != pulseScaleLeft && pulseScaleLeft > (refScaleLeft + refScaleDelta)) // fill left side with NaN img[0, ScaleToIndexWrapper(img, pulseScaleLeft, ROWS)][k] = NaN endif pulseScaleRight = scaleRight[k] - if(refScaleRight != pulseScaleRight && pulseScaleRight < refScaleRight - refScaleDelta) + if(refScaleRight != pulseScaleRight && pulseScaleRight < (refScaleRight - refScaleDelta)) // fill right side with NaN img[ScaleToIndexWrapper(img, pulseScaleRight, ROWS), Inf][k] = NaN endif @@ -3512,11 +3512,11 @@ static Function/S PA_ShowImage(string win, STRUCT PulseAverageSettings &pa, STRU AssertOnAndClearRTError() Multithread img[][colStart, colEnd - 1] = averageWave(x); err = GetRTError(1) // see developer docu section Preventing Debugger Popup val = leftx(averageWave) - if(refScaleLeft != val && val > refScaleLeft + refScaleDelta) + if(refScaleLeft != val && val > (refScaleLeft + refScaleDelta)) img[0, ScaleToIndexWrapper(img, val, ROWS)][colStart, colEnd - 1] = NaN endif val = rightx(averageWave) - if(refScaleRight != val && val < refScaleRight - refScaleDelta) + if(refScaleRight != val && val < (refScaleRight - refScaleDelta)) img[ScaleToIndexWrapper(img, val, ROWS), Inf][colStart, colEnd - 1] = NaN endif pasi.imageAvgDataPresent[i][j] = 1 @@ -3532,11 +3532,11 @@ static Function/S PA_ShowImage(string win, STRUCT PulseAverageSettings &pa, STRU AssertOnAndClearRTError() Multithread img[][colStart, colEnd - 1] = limit(deconv(x), vert_min, vert_max); err = GetRTError(1) // see developer docu section Preventing Debugger Popup val = leftx(deconv) - if(refScaleLeft != val && val > refScaleLeft + refScaleDelta) + if(refScaleLeft != val && val > (refScaleLeft + refScaleDelta)) img[0, ScaleToIndexWrapper(img, val, ROWS)][colStart, colEnd - 1] = NaN endif val = rightx(deconv) - if(refScaleRight != val && val < refScaleRight - refScaleDelta) + if(refScaleRight != val && val < (refScaleRight - refScaleDelta)) img[ScaleToIndexWrapper(img, val, ROWS), Inf][colStart, colEnd - 1] = NaN endif pasi.imageDeconvDataPresent[i][j] = 1 @@ -3758,7 +3758,7 @@ static Function PA_DrawXZeroLines(string win, STRUCT PulseAverageSettings &pa, S for(j = 0; j < numActive; j += 1) region = pasi.regions[j] - if(!pa.multipleGraphs && i == 0 && j == 0 || pa.multipleGraphs) + if((!pa.multipleGraphs && i == 0 && j == 0) || pa.multipleGraphs) graph = PA_GetGraph(win, pa, displayMode, channelNumber, region, j + 1, i + 1, numActive) SetDrawLayer/W=$graph/K $PA_DRAWLAYER_XZEROLINE endif diff --git a/Packages/MIES/MIES_SamplingInterval.ipf b/Packages/MIES/MIES_SamplingInterval.ipf index 7bd5275bd1..560df9d456 100644 --- a/Packages/MIES/MIES_SamplingInterval.ipf +++ b/Packages/MIES/MIES_SamplingInterval.ipf @@ -455,7 +455,7 @@ static Function SI_TestSampInt(string device) if(numConsecutive == MIN_CONSECUTIVE_SAMPINT) return sampIntRef else - ASSERT(numConsecutive == 0 || iLast == i - 1, "Expected consecutive hits") + ASSERT(numConsecutive == 0 || iLast == (i - 1), "Expected consecutive hits") iLast = i numConsecutive += 1 endif @@ -498,7 +498,7 @@ Function SI_CalculateMinSampInterval(string device, variable dataAcqOrTP, variab return SI_NI_CalculateMinSampInterval(device) break case HARDWARE_SUTTER_DAC: - return channelType == XOP_CHANNEL_TYPE_ADC ? HARDWARE_SU_MIN_SAMPINT_ADC * MILLI_TO_MICRO : HARDWARE_SU_MIN_SAMPINT_DAC * MILLI_TO_MICRO + return (channelType == XOP_CHANNEL_TYPE_ADC) ? (HARDWARE_SU_MIN_SAMPINT_ADC * MILLI_TO_MICRO) : (HARDWARE_SU_MIN_SAMPINT_DAC * MILLI_TO_MICRO) break endswitch End diff --git a/Packages/MIES/MIES_StimsetAPI.ipf b/Packages/MIES/MIES_StimsetAPI.ipf index 5d6ba2a838..8a1b104ae1 100644 --- a/Packages/MIES/MIES_StimsetAPI.ipf +++ b/Packages/MIES/MIES_StimsetAPI.ipf @@ -68,7 +68,7 @@ static Function/WAVE ST_GetStimsetParametersEpochType(string setName, variable e // remove empty elements from the end FindValue/TEXT=""/TXOP=4 wv - Redimension/N=(V_Value >= 0 ? V_Value : numpnts(wv)) wv + Redimension/N=((V_Value >= 0) ? V_Value : numpnts(wv)) wv return wv End diff --git a/Packages/MIES/MIES_SweepFormula.ipf b/Packages/MIES/MIES_SweepFormula.ipf index 34989cfc5d..9e5aa03746 100644 --- a/Packages/MIES/MIES_SweepFormula.ipf +++ b/Packages/MIES/MIES_SweepFormula.ipf @@ -869,7 +869,7 @@ static Function/WAVE SF_FormulaExecutor(string graph, variable jsonID, [string j SFH_ASSERT(!(V_Value >= 0), "Encountered null element in array.", jsonId = jsonId) Redimension/N=(MAX_DIMENSION_COUNT) topArraySize - topArraySize[] = topArraySize[p] != 0 ? topArraySize[p] : 1 + topArraySize[] = (topArraySize[p] != 0) ? topArraySize[p] : 1 Make/FREE/D/N=0 indicesOfOperationsWithScalarResult WAVE/ZZ out @@ -1494,7 +1494,7 @@ Function [STRUCT RGBColor s] SF_GetTraceColor(string graph, string opStack, WAVE Make/FREE/N=(numDoInh) findPos for(i = 0; i < numDoInh; i += 1) FindValue/TEXT=doInheritance[i]/TXOP=4 opStackW - findPos[i] = V_Value == -1 ? NaN : V_Value + findPos[i] = (V_Value == -1) ? NaN : V_Value endfor minVal = WaveMin(findPos) if(IsNaN(minVal)) @@ -1511,7 +1511,7 @@ Function [STRUCT RGBColor s] SF_GetTraceColor(string graph, string opStack, WAVE channelType = JWN_GetNumberFromWaveNote(data, SF_META_CHANNELTYPE) isAveraged = JWN_GetNumberFromWaveNote(data, SF_META_ISAVERAGED) mapIndex = JWN_GetNumberFromWaveNote(data, SF_META_SWEEPMAPINDEX) - sweepNo = isAveraged == 1 ? JWN_GetNumberFromWaveNote(data, SF_META_AVERAGED_FIRST_SWEEP) : JWN_GetNumberFromWaveNote(data, SF_META_SWEEPNO) + sweepNo = (isAveraged == 1) ? JWN_GetNumberFromWaveNote(data, SF_META_AVERAGED_FIRST_SWEEP) : JWN_GetNumberFromWaveNote(data, SF_META_SWEEPNO) if(!IsValidSweepNumber(sweepNo)) return [s] endif @@ -1698,7 +1698,7 @@ static Function [WAVE/T plotGraphs, WAVE/WAVE infos] SF_PreparePlotter(string wi endif // create horizontal guides (one more than graphs) - for(i = 0; i < numGraphs + 1; i += 1) + for(i = 0; i < (numGraphs + 1); i += 1) guideName1 = SF_PLOTTER_GUIDENAME + num2istr(i) guidePos = i / numGraphs DefineGuide/W=$win $guideName1={FT, guidePos, FB} @@ -2727,14 +2727,14 @@ static Function SF_IsValidSingleSelection(STRUCT SF_SelectParameters &filter, WA endif if(filter.sweepQC != SF_OP_SELECT_IVSCCSWEEPQC_IGNORE) - sweepQC = SFH_IsSweepQCPassed(numericalValues, textualValues, sweepNo, channelNumber, channelType) == 1 ? SF_OP_SELECT_IVSCCSWEEPQC_PASSED : SF_OP_SELECT_IVSCCSWEEPQC_FAILED + sweepQC = (SFH_IsSweepQCPassed(numericalValues, textualValues, sweepNo, channelNumber, channelType) == 1) ? SF_OP_SELECT_IVSCCSWEEPQC_PASSED : SF_OP_SELECT_IVSCCSWEEPQC_FAILED if(!(filter.sweepQC & sweepQC)) return 0 endif endif if(filter.setQC != SF_OP_SELECT_IVSCCSETQC_IGNORE) - setQC = SFH_IsSetQCPassed(numericalValues, textualValues, sweepNo, channelNumber, channelType) == 1 ? SF_OP_SELECT_IVSCCSETQC_PASSED : SF_OP_SELECT_IVSCCSETQC_FAILED + setQC = (SFH_IsSetQCPassed(numericalValues, textualValues, sweepNo, channelNumber, channelType) == 1) ? SF_OP_SELECT_IVSCCSETQC_PASSED : SF_OP_SELECT_IVSCCSETQC_FAILED if(!(filter.setQC & setQC)) return 0 endif @@ -3437,9 +3437,9 @@ static Function/WAVE SF_OperationTPImpl(string graph, WAVE/WAVE mode, WAVE/Z sel elseif(!CmpStr(retWhat, SF_OP_TPFIT_RET_TAUSMALL)) fitResult = min(coefWave[2], coefWave[4]) elseif(!CmpStr(retWhat, SF_OP_TPFIT_RET_AMP)) - fitResult = max(abs(coefWave[1]), abs(coefWave[3])) == abs(coefWave[1]) ? coefWave[1] : coefWave[3] + fitResult = (max(abs(coefWave[1]), abs(coefWave[3])) == abs(coefWave[1])) ? coefWave[1] : coefWave[3] elseif(!CmpStr(retWhat, SF_OP_TPFIT_RET_MINAMP)) - fitResult = min(abs(coefWave[1]), abs(coefWave[3])) == abs(coefWave[1]) ? coefWave[1] : coefWave[3] + fitResult = (min(abs(coefWave[1]), abs(coefWave[3])) == abs(coefWave[1])) ? coefWave[1] : coefWave[3] endif endif endif @@ -4704,7 +4704,7 @@ static Function/WAVE SF_OperationPowerSpectrum(variable jsonId, string jsonPath, MultiThread indexHelper[] = SF_RemoveEndOfSweepNaNs(input[p]) doAvg = !CmpStr(avg, "avg") - cutOff = ratioFreq == 0 ? cutOff : NaN + cutOff = (ratioFreq == 0) ? cutOff : NaN if(doAvg) Make/FREE/WAVE/N=(DimSize(input, ROWS)) output @@ -6743,7 +6743,7 @@ static Function/WAVE SF_AverageTPFromSweep(WAVE/T epochMatches, WAVE sweepData) Make/FREE/D/N=(numTPEpochs) tpStart = trunc(str2num(epochMatches[p][EPOCH_COL_STARTTIME]) * ONE_TO_MILLI / sweepDelta) Make/FREE/D/N=(numTPEpochs) tpDelta = trunc(str2num(epochMatches[p][EPOCH_COL_ENDTIME]) * ONE_TO_MILLI / sweepDelta) - tpStart[p] [tpDataSizeMin, tpDataSizeMax] = WaveMinAndMax(tpDelta) - SFH_ASSERT(tpDataSizeMax - tpDataSizeMin <= 1, "TP data size from TP epochs mismatch within sweep.") + SFH_ASSERT((tpDataSizeMax - tpDataSizeMin) <= 1, "TP data size from TP epochs mismatch within sweep.") Make/FREE/D/N=(tpDataSizeMin) tpData CopyScales/P sweepData, tpData diff --git a/Packages/MIES/MIES_SweepFormula_Helpers.ipf b/Packages/MIES/MIES_SweepFormula_Helpers.ipf index a017628fd3..55f1d4cca4 100644 --- a/Packages/MIES/MIES_SweepFormula_Helpers.ipf +++ b/Packages/MIES/MIES_SweepFormula_Helpers.ipf @@ -608,7 +608,7 @@ static Function/WAVE SFH_GetSweepsForFormulaImpl(string graph, WAVE/WAVE selectD rangeEndIndex = limit(rangeEndIndex, -Inf, sweepSize) endif - SFH_ASSERT(rangeStartIndex < rangeEndIndex - 1, "Starting range must be smaller than the ending range for sweep " + num2istr(sweepNo) + ".") + SFH_ASSERT(rangeStartIndex < (rangeEndIndex - 1), "Starting range must be smaller than the ending range for sweep " + num2istr(sweepNo) + ".") SFH_ASSERT(rangeStartIndex == -Inf || (IsFinite(rangeStartIndex) && rangeStartIndex >= 0 && rangeStartIndex < sweepSize), "Specified starting range not inside sweep " + num2istr(sweepNo) + ".") SFH_ASSERT(rangeEndIndex == Inf || (IsFinite(rangeEndIndex) && rangeEndIndex > 0 && rangeEndIndex <= sweepSize), "Specified ending range not inside sweep " + num2istr(sweepNo) + ".") Duplicate/FREE/RMD=[rangeStartIndex, rangeEndIndex - 1] sweep, rangedSweepData @@ -660,7 +660,7 @@ Function SFH_GetNumberOfArguments(variable jsonId, string jsonPath) return size endif - return JSON_GetType(jsonId, jsonPath + "/0") == JSON_NULL ? 0 : size + return (JSON_GetType(jsonId, jsonPath + "/0") == JSON_NULL) ? 0 : size End Function/DF SFH_GetWorkingDF(string win) diff --git a/Packages/MIES/MIES_SweepFormula_PSX.ipf b/Packages/MIES/MIES_SweepFormula_PSX.ipf index a1605cf978..85d82f429d 100644 --- a/Packages/MIES/MIES_SweepFormula_PSX.ipf +++ b/Packages/MIES/MIES_SweepFormula_PSX.ipf @@ -567,7 +567,7 @@ static Function [variable peak_t, variable peak] PSX_CalculateEventPeak(WAVE pea peak_start_search = max(deconvPeak_t - PSX_PEAK_RANGE_FACTOR_LEFT * kernelRiseTau, prevDeconvPeak_t) // upper bound - if(index < numCrossings - 1) + if(index < (numCrossings - 1)) nextDeconvPeak_t = peakX[index + 1] else nextDeconvPeak_t = Inf @@ -745,7 +745,7 @@ static Function [variable first, variable last] PSX_GetSingleEventRange(WAVE psx first = baseline endif - if(index == numEvents - 1) + if(index == (numEvents - 1)) last = min(first + offset, IndexToScale(sweepDataOffFilt, DimSize(sweepDataOffFilt, ROWS) - 1, ROWS)) else last = min(first + offset, psxEvent[index + 1][%baseline_t]) @@ -839,7 +839,7 @@ static Function PSX_FitEventDecay(WAVE sweepDataOffFilt, WAVE psxEvent, variable fitRange = endTime - startTime - if(IsFinite(decayTau) && decayTau > maxTauFactor * fitRange) + if(IsFinite(decayTau) && decayTau > (maxTauFactor * fitRange)) psxEvent[eventIndex][%$"Fit manual QC call"] = PSX_REJECT psxEvent[eventIndex][%$"Fit result"] = PSX_DECAY_FIT_ERROR return NaN @@ -1217,7 +1217,7 @@ static Function [WAVE/D results, WAVE eventIndex, WAVE marker, WAVE/T comboKeys] if(!cmpstr(propLabel, "iei") && numEntries >= 2) // recalculate the iei as that might have changed due to in-between events being not selected - Multithread results[0, numEntries - 1] = events[indizes[p]][%peak_t] - (p >= 1 ? events[indizes[p - 1]][%peak_t] : NaN) + Multithread results[0, numEntries - 1] = events[indizes[p]][%peak_t] - ((p >= 1) ? events[indizes[p - 1]][%peak_t] : NaN) else Multithread results[] = events[indizes[p]][%$propLabel] endif @@ -1545,7 +1545,7 @@ static Function/WAVE PSX_OperationStatsImpl(string graph, string id, WAVE/WAVE r // +inf -> +1 // finite -> NaN Duplicate/FREE resultsRaw, results - Multithread results[] = resultsRaw[p] == -Inf ? -1 : (IsNaN(resultsRaw[p]) ? 0 : (resultsRaw[p] == +Inf ? +1 : NaN)) + Multithread results[] = resultsRaw[p] == -Inf ? -1 : (IsNaN(resultsRaw[p]) ? 0 : ((resultsRaw[p] == +Inf) ? +1 : NaN)) WAVE/Z resultsClean = ZapNaNs(results) @@ -2006,7 +2006,7 @@ static Function PSX_UpdateOffsetInAllEventGraph(string win) switch(offsetMode) case PSX_HORIZ_OFFSET_ONSET: - xOffset = IsFinite(psxEvent[i][%$"Onset Time"]) ? first - psxEvent[i][%$"Onset Time"] : 0 + xOffset = IsFinite(psxEvent[i][%$"Onset Time"]) ? (first - psxEvent[i][%$"Onset Time"]) : 0 yOffset = 0 break case PSX_HORIZ_OFFSET_PEAK: @@ -2539,7 +2539,7 @@ static Function PSX_UpdateHideStateInAllEventGraphImpl(string win, string traceT allSelected = checkboxActive[%all] Make/FREE/N=(numEntries) hideState - MultiThread/NT=(numEntries < 128) hideState[] = !((str2num(currentState[p]) == PSX_ALL ? allSelected : (stateMatchPattern & str2num(currentState[p])))) + MultiThread/NT=(numEntries < 128) hideState[] = !(((str2num(currentState[p]) == PSX_ALL) ? allSelected : (stateMatchPattern & str2num(currentState[p])))) ACC_HideTracesPerTrace(extAllGraph, traceNames, numEntries, hideState) @@ -2576,7 +2576,7 @@ static Function PSX_UpdateBlockIndizes(string win) for(i = 0; i < numBlocks; i += 1) first = i * blockSize - if(i == numBlocks - 1) + if(i == (numBlocks - 1)) // take the rest of the events into the last block last = numEntries - 1 else @@ -2585,7 +2585,7 @@ static Function PSX_UpdateBlockIndizes(string win) indexHelper[first, last] = TUD_SetUserData(extAllGraph, traceNames[p], PSX_TUD_BLOCK_INDEX, num2str(i)) - if(last >= numEntries - 1) + if(last >= (numEntries - 1)) // assigned all events // update numBlocks numBlocks = i + 1 diff --git a/Packages/MIES/MIES_SweepSaving.ipf b/Packages/MIES/MIES_SweepSaving.ipf index 4a0f2afe53..19caaafe3c 100644 --- a/Packages/MIES/MIES_SweepSaving.ipf +++ b/Packages/MIES/MIES_SweepSaving.ipf @@ -143,7 +143,7 @@ Function [variable plannedTime, variable acquiredTime] SWS_DeterminePlannedAndAc return [plannedTime, NaN] endif - acquiredTime = lastFifoPos ? IndexToScale(channelAD, max(lastFifoPos - 1, 0), ROWS) * MILLI_TO_ONE : 0 + acquiredTime = lastFifoPos ? (IndexToScale(channelAD, max(lastFifoPos - 1, 0), ROWS) * MILLI_TO_ONE) : 0 return [plannedTime, acquiredTime] End diff --git a/Packages/MIES/MIES_TestPulse.ipf b/Packages/MIES/MIES_TestPulse.ipf index fffb9dfd78..30af8445cf 100644 --- a/Packages/MIES/MIES_TestPulse.ipf +++ b/Packages/MIES/MIES_TestPulse.ipf @@ -130,7 +130,7 @@ Function/WAVE TP_GetStoredTPs(string device, variable tpMarker, variable number) Make/FREE/N=(number)/WAVE result - if(number > V_row + 1) + if(number > (V_row + 1)) // too few TPs available return $"" endif @@ -209,7 +209,7 @@ Function TP_ROAnalysis(STRUCT ASYNC_ReadOutStruct &ar) posElevInst = FindDimLabel(asyncBuffer, COLS, "ELEVATED_INST") FindValue/RMD=[][posAsync][posMarker, posMarker]/V=(marker)/T=0 asyncBuffer - i = V_Value >= 0 ? V_Row : bufSize + i = (V_Value >= 0) ? V_Row : bufSize if(i == bufSize) Redimension/N=(bufSize + 1, -1, -1) asyncBuffer @@ -1091,10 +1091,10 @@ static Function TP_RecordTP(string device, WAVE TPResults, variable now, variabl TPStorage[count][][%Headstage] = hsProp[q][%Enabled] ? q : NaN TPStorage[count][][%ClampMode] = hsProp[q][%ClampMode] - TPStorage[count][][%Baseline_VC] = hsProp[q][%ClampMode] == V_CLAMP_MODE ? TPResults[%BaselineSteadyState][q] : NaN - TPStorage[count][][%Baseline_IC] = hsProp[q][%ClampMode] == I_CLAMP_MODE ? TPResults[%BaselineSteadyState][q] : NaN + TPStorage[count][][%Baseline_VC] = (hsProp[q][%ClampMode] == V_CLAMP_MODE) ? TPResults[%BaselineSteadyState][q] : NaN + TPStorage[count][][%Baseline_IC] = (hsProp[q][%ClampMode] == I_CLAMP_MODE) ? TPResults[%BaselineSteadyState][q] : NaN - TPStorage[count][][%DeltaTimeInSeconds] = count > 0 ? now - TPStorage[0][0][%TimeInSeconds] : 0 + TPStorage[count][][%DeltaTimeInSeconds] = (count > 0) ? (now - TPStorage[0][0][%TimeInSeconds]) : 0 TPStorage[count][][%TPMarker] = tpMarker cycleID = ROVAR(GetTestpulseCycleID(device)) diff --git a/Packages/MIES/MIES_TraceUserData.ipf b/Packages/MIES/MIES_TraceUserData.ipf index 6882aa5276..acfdaf400d 100644 --- a/Packages/MIES/MIES_TraceUserData.ipf +++ b/Packages/MIES/MIES_TraceUserData.ipf @@ -159,7 +159,7 @@ Function/WAVE TUD_GetUserDataAsWave(string graph, string key, [WAVE/T keys, WAVE endif endif - ASSERT(ParamIsDefault(keys) + ParamIsDefault(values) != 1, "Unexpected optional paramters") + ASSERT((ParamIsDefault(keys) + ParamIsDefault(values)) != 1, "Unexpected optional paramters") // both optional parameters are present diff --git a/Packages/MIES/MIES_Utilities_Algorithm.ipf b/Packages/MIES/MIES_Utilities_Algorithm.ipf index ea64d79ba2..dc35495d1a 100644 --- a/Packages/MIES/MIES_Utilities_Algorithm.ipf +++ b/Packages/MIES/MIES_Utilities_Algorithm.ipf @@ -80,7 +80,7 @@ Function Downsample(WAVE/Z wv, variable downsampleFactor, variable upsampleFacto case DECIMATION_BY_AVERAGING: // See again the Igor Manual page III-141 // take the next odd number - numReconstructionSamples = mod(downSampleFactor, 2) == 0 ? downSampleFactor + 1 : downSampleFactor + numReconstructionSamples = (mod(downSampleFactor, 2) == 0) ? (downSampleFactor + 1) : downSampleFactor Resample/DOWN=(downsampleFactor)/UP=(upsampleFactor)/N=(numReconstructionSamples)/WINF=None wv break default: @@ -263,7 +263,7 @@ threadsafe Function GetRowIndex(WAVE wv, [variable val, string str, WAVE/Z refWa variable numEntries, i - ASSERT_TS(ParamIsDefault(val) + ParamIsDefault(str) + ParamIsDefault(refWave) == 2, "Expected exactly one argument") + ASSERT_TS((ParamIsDefault(val) + ParamIsDefault(str) + ParamIsDefault(refWave)) == 2, "Expected exactly one argument") if(ParamIsDefault(reverseSearch)) reverseSearch = 0 @@ -852,7 +852,7 @@ threadsafe Function/WAVE FindLevelWrapper(WAVE data, variable level, variable ed maxLevels = WaveMax(numMaxLevels) Make/D/FREE/N=(numColsFixed, maxLevels) resultMulti - resultMulti[][] = q < numMaxLevels[p] ? WaveRef(allLevels[p])[q] : NaN + resultMulti[][] = (q < numMaxLevels[p]) ? WaveRef(allLevels[p])[q] : NaN endif // don't use numColsFixed here as we want to have the original shape @@ -922,7 +922,7 @@ Function [WAVE/D start, WAVE/D stop] DistributeElements(variable numElements, [v // limit the spacing for a lot of entries // we only want to use 20% for spacing in total - if((numElements - 1) * GRAPH_DIV_SPACING > 0.20) + if(((numElements - 1) * GRAPH_DIV_SPACING) > 0.20) spacing = 0.20 / (numElements - 1) else spacing = GRAPH_DIV_SPACING @@ -1134,7 +1134,7 @@ Function/WAVE SplitLogDataBySize(WAVE/T logData, string sep, variable lim, [vari lineCnt = DimSize(logData, ROWS) firstPartSize = ParamIsDefault(firstPartSize) ? lim : firstPartSize - lastIndex = ParamIsDefault(lastIndex) ? lineCnt - 1 : limit(lastIndex, 0, lineCnt - 1) + lastIndex = ParamIsDefault(lastIndex) ? (lineCnt - 1) : limit(lastIndex, 0, lineCnt - 1) sepLen = strlen(sep) Make/FREE/D/N=(lastIndex + 1) logSizes MultiThread logSizes[0, lastIndex] = strlen(logData[p]) diff --git a/Packages/MIES/MIES_Utilities_Checks.ipf b/Packages/MIES/MIES_Utilities_Checks.ipf index fd5ed4d345..ede56d3806 100644 --- a/Packages/MIES/MIES_Utilities_Checks.ipf +++ b/Packages/MIES/MIES_Utilities_Checks.ipf @@ -324,7 +324,7 @@ Function StringEndsWith(string str, string suffix) return 0 endif - if(pos == strlen(str) - strlen(suffix)) + if(pos == (strlen(str) - strlen(suffix))) return 1 endif diff --git a/Packages/MIES/MIES_Utilities_DataFolder.ipf b/Packages/MIES/MIES_Utilities_DataFolder.ipf index 75561128b1..ed9619bfe4 100644 --- a/Packages/MIES/MIES_Utilities_DataFolder.ipf +++ b/Packages/MIES/MIES_Utilities_DataFolder.ipf @@ -257,7 +257,7 @@ Function RenameDataFolderToUniqueName(string path, string suffix) DFREF dfr = $path name = GetFile(path) - folder = UniqueDataFolderName($path + "::", name + suffix) + folder = UniqueDataFolderName($(path + "::"), name + suffix) name = GetFile(folder) RenameDataFolder $path, $name ASSERT_TS(!DataFolderExists(path), "Could not move it of the way.") diff --git a/Packages/MIES/MIES_Utilities_File.ipf b/Packages/MIES/MIES_Utilities_File.ipf index c40e7778e7..fd7a282494 100644 --- a/Packages/MIES/MIES_Utilities_File.ipf +++ b/Packages/MIES/MIES_Utilities_File.ipf @@ -368,7 +368,7 @@ Function SaveTextFile(string data, string fileName, [string fileFilter, string m string S_fileName = fileName #else showDialogOnOverwrite = ParamIsDefault(showDialogOnOverwrite) ? 0 : !!showDialogOnOverwrite - dialogCode = showDialogOnOverwrite && FileExists(fileName) ? 1 : 2 + dialogCode = (showDialogOnOverwrite && FileExists(fileName)) ? 1 : 2 if(ParamIsDefault(fileFilter) && ParamIsDefault(message)) Open/D=(dialogCode) fnum as fileName elseif(ParamIsDefault(fileFilter) && !ParamIsDefault(message)) diff --git a/Packages/MIES/MIES_Utilities_GUI.ipf b/Packages/MIES/MIES_Utilities_GUI.ipf index f6a6b3ac84..16b3c34b5b 100644 --- a/Packages/MIES/MIES_Utilities_GUI.ipf +++ b/Packages/MIES/MIES_Utilities_GUI.ipf @@ -21,7 +21,7 @@ Function IsWaveDisplayedOnGraph(string win, [WAVE/Z wv, DFREF dfr]) string traceList, trace, list variable numWaves, numTraces, i - ASSERT(ParamIsDefault(wv) + ParamIsDefault(dfr) == 1, "Expected exactly one parameter of wv and dfr") + ASSERT((ParamIsDefault(wv) + ParamIsDefault(dfr)) == 1, "Expected exactly one parameter of wv and dfr") if(!ParamIsDefault(wv)) if(!WaveExists(wv)) @@ -355,7 +355,7 @@ Function/S FormatTextWaveForLegend(WAVE/T input) for(j = 0; j < numCols; j += 1) length = maxColLength[j] - totalLength[i][j] - if(j < numCols - 1) + if(j < (numCols - 1)) length += spacing endif @@ -608,7 +608,7 @@ Function RemoveTracesFromGraph(string graph, [string trace, WAVE/Z wv, DFREF dfr numOptArgs = ParamIsDefault(trace) + ParamIsDefault(wv) + ParamIsDefault(dfr) ASSERT(numOptArgs == 3 || numOptArgs == 2, "Can only accept one of the trace/wv/dfr parameters") - if(!ParamIsDefault(wv) && !WaveExists(wv) || !ParamIsDefault(dfr) && !DataFolderExistsDFR(dfr)) + if(((!ParamIsDefault(wv) && !WaveExists(wv)) || !ParamIsDefault(dfr)) && !DataFolderExistsDFR(dfr)) return 0 endif diff --git a/Packages/MIES/MIES_Utilities_List.ipf b/Packages/MIES/MIES_Utilities_List.ipf index 190fe2a61d..1ea5c2c9a4 100644 --- a/Packages/MIES/MIES_Utilities_List.ipf +++ b/Packages/MIES/MIES_Utilities_List.ipf @@ -58,7 +58,7 @@ Function/S ListFromList(string list, variable itemBegin, variable itemEnd, [stri endfor stop = start - for(i = itemBegin; i < itemEnd + 1; i += 1) + for(i = itemBegin; i < (itemEnd + 1); i += 1) stop = strsearch(list, listSep, stop) + 1 endfor diff --git a/Packages/MIES/MIES_Utilities_Numeric.ipf b/Packages/MIES/MIES_Utilities_Numeric.ipf index bc2fe0b91e..74d5d5dfda 100644 --- a/Packages/MIES/MIES_Utilities_Numeric.ipf +++ b/Packages/MIES/MIES_Utilities_Numeric.ipf @@ -358,5 +358,5 @@ End threadsafe Function IndexAfterDecimation(variable sourceIndex, variable decimationFactor) ASSERT_TS(IsInteger(sourceIndex) && sourceIndex >= 0, "sourceIndex must be integer & >= 0") - return sourceIndex == 0 ? -1 : floor((sourceIndex - 0.5) / decimationFactor) + return (sourceIndex == 0) ? -1 : floor((sourceIndex - 0.5) / decimationFactor) End diff --git a/Packages/MIES/MIES_Utilities_ProgramFlow.ipf b/Packages/MIES/MIES_Utilities_ProgramFlow.ipf index 2708c712fa..b11cfa030e 100644 --- a/Packages/MIES/MIES_Utilities_ProgramFlow.ipf +++ b/Packages/MIES/MIES_Utilities_ProgramFlow.ipf @@ -108,7 +108,7 @@ threadsafe Function/S GetStackTrace([string prefix]) output = prefix + "\r" endif - for(i = 0; i < numCallers - 2; i += 1) + for(i = 0; i < (numCallers - 2); i += 1) entry = StringFromList(i, stacktrace) func = StringFromList(0, entry, ",") file = StringFromList(1, entry, ",") diff --git a/Packages/MIES/MIES_Utilities_System.ipf b/Packages/MIES/MIES_Utilities_System.ipf index bd5df83cc0..a169ed4d32 100644 --- a/Packages/MIES/MIES_Utilities_System.ipf +++ b/Packages/MIES/MIES_Utilities_System.ipf @@ -417,7 +417,7 @@ threadsafe Function ConvertXOPErrorCode(variable err) // for second+ loaded XOP -> xop error codes returned are offsetted by n x 0x10000 per XOP instead of 10000 // Therefore, returning the code through RTE and directly through V_flag (SetOperationReturnValue): - err = err < 0xFFFF ? err : (err & 0xFFFF) + 10000 + err = (err < 0xFFFF) ? err : ((err & 0xFFFF) + 10000) // Note: Getting the error message through GetRTErrMessage, // GetErrMessage(code) requires the original RTE code (does not work with directly return through V_flag). diff --git a/Packages/MIES/MIES_Utilities_WaveHandling.ipf b/Packages/MIES/MIES_Utilities_WaveHandling.ipf index c9e1377e5e..57a00bc791 100644 --- a/Packages/MIES/MIES_Utilities_WaveHandling.ipf +++ b/Packages/MIES/MIES_Utilities_WaveHandling.ipf @@ -70,7 +70,7 @@ threadsafe Function EnsureLargeEnoughWave(WAVE wv, [variable indexShouldExist, v indexShouldExist *= 2 if(checkFreeMemory) - if(GetWaveSize(wv) * (indexShouldExist / DimSize(wv, dimension)) / 1024 / 1024 / 1024 >= GetFreeMemory()) + if((GetWaveSize(wv) * (indexShouldExist / DimSize(wv, dimension)) / 1024 / 1024 / 1024) >= GetFreeMemory()) return 1 endif endif @@ -426,7 +426,7 @@ Function GetRowWithSameContent(WAVE/T refWave, WAVE/T sourceWave, variable row) for(i = 0; i < numRows; i += 1) for(j = 0; j < numCols; j += 1) if(!cmpstr(refWave[i][j], sourceWave[row][j])) - if(j == numCols - 1) + if(j == (numCols - 1)) return i endif @@ -499,7 +499,7 @@ threadsafe Function SetDimensionLabels(WAVE wv, string list, variable dim, [vari endif ASSERT_TS(startPos >= 0, "Illegal negative startPos") - ASSERT_TS(dimlabelCount <= DimSize(wv, dim) + startPos, "Dimension label count exceeds dimension size") + ASSERT_TS(dimlabelCount <= (DimSize(wv, dim) + startPos), "Dimension label count exceeds dimension size") for(i = 0; i < dimlabelCount; i += 1) labelName = StringFromList(i, list) SetDimLabel dim, i + startPos, $labelName, Wv @@ -526,7 +526,7 @@ threadsafe Function/WAVE DeepCopyWaveRefWave(WAVE/WAVE src, [variable dimension, if(!ParamIsDefault(dimension)) ASSERT_TS(dimension >= ROWS && dimension <= CHUNKS, "Invalid dimension") - ASSERT_TS(ParamIsDefault(index) + ParamIsDefault(indexWave) == 1, "Need exactly one of parameter of type index or indexWave") + ASSERT_TS((ParamIsDefault(index) + ParamIsDefault(indexWave)) == 1, "Need exactly one of parameter of type index or indexWave") endif if(!ParamIsDefault(indexWave) || !ParamIsDefault(index)) @@ -725,7 +725,7 @@ Function DeleteWavePoint(WAVE wv, variable dim, [variable index, WAVE indices]) variable size - ASSERT(ParamIsDefault(index) + ParamIsDefault(indices) == 1, "One of index or indices wave must be given as argument") + ASSERT((ParamIsDefault(index) + ParamIsDefault(indices)) == 1, "One of index or indices wave must be given as argument") ASSERT(WaveExists(wv), "wave does not exist") ASSERT(dim >= 0 && dim < 4, "dim must be 0, 1, 2 or 3") if(!ParamIsDefault(indices)) diff --git a/Packages/MIES/MIES_WaveBuilder.ipf b/Packages/MIES/MIES_WaveBuilder.ipf index f785924439..f4d6cfded1 100644 --- a/Packages/MIES/MIES_WaveBuilder.ipf +++ b/Packages/MIES/MIES_WaveBuilder.ipf @@ -436,7 +436,7 @@ static Function/WAVE WB_GetStimSet([string setName]) for(i = 0; i < numSweeps; i += 1) data[i] = WB_MakeWaveBuilderWave(WPCopy, WPT, SegWvTypeCopy, i, numEpochs, channelType, updateEpochIDWave, stimset = setName) lengthOf1DWaves = max(DimSize(data[i], ROWS), lengthOf1DWaves) - if(i + 1 < numSweeps) + if((i + 1) < numSweeps) if(WB_AddDelta(setName, WPCopy, WP, WPT, SegWvTypeCopy, SegWvType, i, numSweeps)) return $"" endif @@ -685,7 +685,7 @@ static Function WB_CalculateParameterWithDelta(variable operation, variable &val break case DELTA_OPERATION_LOG: // ignore a delta value of exactly zero - delta = delta == 0 ? 0 : log(delta) + delta = (delta == 0) ? 0 : log(delta) break case DELTA_OPERATION_SQUARED: delta = (delta)^2 @@ -1022,7 +1022,7 @@ static Function/WAVE WB_MakeWaveBuilderWave(WAVE WP, WAVE/T WPT, WAVE SegWvType, endif // add stimset entries at last step - if(stepCount + 1 == SegWvType[101]) + if((stepCount + 1) == SegWvType[101]) AddEntryIntoWaveNoteAsList(WaveBuilderWave, "Stimset") AddEntryIntoWaveNoteAsList(WaveBuilderWave, "Sweep Count", var = SegWvType[101]) AddEntryIntoWaveNoteAsList(WaveBuilderWave, "Epoch Count", var = numEpochs) @@ -1050,7 +1050,7 @@ static Function WB_AppendSweepMinMax(WAVE wv, variable sweep, variable numSweeps string entry first = (sweep == 0) - last = (sweep + 1 == numSweeps) + last = ((sweep + 1) == numSweeps) MatrixOP/FREE singleSweep = col(wv, sweep) @@ -1711,7 +1711,7 @@ static Function [WAVE/D pulseStartTimes, WAVE/D pulseStartIndices, WAVE/D pulseE pulseToPulseLength = NaN - ASSERT(pa.poisson + pa.mixedFreq <= 1, "Only one of Mixed Frequency or poisson can be checked") + ASSERT((pa.poisson + pa.mixedFreq) <= 1, "Only one of Mixed Frequency or poisson can be checked") if(!(pa.pulseDuration > 0)) printf "Resetting invalid pulse duration of %gms to 1ms\r", pa.pulseDuration @@ -1841,7 +1841,7 @@ static Function [WAVE/D pulseStartTimes, WAVE/D pulseStartIndices, WAVE/D pulseE Redimension/N=(idx) pulseStartTimes, pulseStartIndices, pulseEndIndices // remove the zero part at the end - amplitudeStartIndex = pa.pulseType == WB_PULSE_TRAIN_TYPE_SQUARE ? lastValidStartIndex : lastValidStartIndex + 1 + amplitudeStartIndex = (pa.pulseType == WB_PULSE_TRAIN_TYPE_SQUARE) ? lastValidStartIndex : (lastValidStartIndex + 1) if(amplitudeStartIndex < DimSize(segmentWave, ROWS)) FindValue/V=(0)/S=(amplitudeStartIndex) segmentWave if(V_Value != -1) @@ -2337,7 +2337,7 @@ Function/S WB_StimsetRecursion([string parent, string knownStimsets]) // check recently added stimsets. // @todo: moved parent stimsets should not be checked again and therefore moved between child and parent. stimsetQueue = knownStimsets - for(i = 0; i < numAfter - numBefore + numMoved; i += 1) + for(i = 0; i < (numAfter - numBefore + numMoved); i += 1) stimset = StringFromList(i, stimsetQueue) // avoid first order circular references. if(cmpstr(stimset, parent)) @@ -2475,7 +2475,7 @@ Function WB_AddAnalysisParameterIntoWPT(WAVE/T WPT, string name, [variable var, string params - ASSERT(ParamIsDefault(var) + ParamIsDefault(str) + ParamIsDefault(wv) == 2, "Expected one of var, str or wv") + ASSERT((ParamIsDefault(var) + ParamIsDefault(str) + ParamIsDefault(wv)) == 2, "Expected one of var, str or wv") params = WPT[%$"Analysis function params (encoded)"][%Set][INDEP_EPOCH_TYPE] diff --git a/Packages/MIES/MIES_WaveBuilderPanel.ipf b/Packages/MIES/MIES_WaveBuilderPanel.ipf index a1119d0734..5d445c7442 100644 --- a/Packages/MIES/MIES_WaveBuilderPanel.ipf +++ b/Packages/MIES/MIES_WaveBuilderPanel.ipf @@ -208,7 +208,7 @@ static Function WBP_AddEpochHLTraces(DFREF dfr, variable epochHLType, variable e WAVE/SDFR=dfr waveBegin = $nameBegin WAVE/SDFR=dfr waveEnd = $nameEnd - if(epoch == numEpochs - 1) + if(epoch == (numEpochs - 1)) // no epoch to highlight right of the current one return NaN endif @@ -667,7 +667,7 @@ Function WBP_UpdateControlAndWave(string control, [variable var, string str]) variable stimulusType, epoch, paramRow - ASSERT(ParamIsDefault(var) + ParamIsDefault(str) == 1, "Exactly one of var/str must be given") + ASSERT((ParamIsDefault(var) + ParamIsDefault(str)) == 1, "Exactly one of var/str must be given") if(!ParamIsDefault(var)) WBP_SetControl(panel, control, value = var) diff --git a/Packages/MIES/MIES_WaveDataFolderGetters.ipf b/Packages/MIES/MIES_WaveDataFolderGetters.ipf index df60aff51c..e309dbfa81 100644 --- a/Packages/MIES/MIES_WaveDataFolderGetters.ipf +++ b/Packages/MIES/MIES_WaveDataFolderGetters.ipf @@ -106,9 +106,9 @@ Function/WAVE GetChanAmpAssign(string device) // Use AD channels 0-3 and then 8-11 so that // they are all on the same rack wv[0][0, 7] = q - wv[2][0, 7] = q <= 3 ? q : q + 4 + wv[2][0, 7] = (q <= 3) ? q : (q + 4) wv[4][0, 7] = q - wv[6][0, 7] = q <= 3 ? q : q + 4 + wv[6][0, 7] = (q <= 3) ? q : (q + 4) else wv[0][0, 3] = q wv[2][0, 3] = q @@ -3998,7 +3998,7 @@ Function UpgradeWaveParam(WAVE wv) // upgrade to wave version 5 if(WaveVersionIsSmaller(wv, 5)) // 41: pink noise, 42: brown noise, none: white noise -> 54: noise type - wv[54][][EPOCH_TYPE_NOISE] = wv[41][q][EPOCH_TYPE_NOISE] == 0 && wv[42][q][EPOCH_TYPE_NOISE] == 0 ? 0 : (wv[41][q][EPOCH_TYPE_NOISE] == 1 ? 1 : 2) + wv[54][][EPOCH_TYPE_NOISE] = wv[41][q][EPOCH_TYPE_NOISE] == 0 && wv[42][q][EPOCH_TYPE_NOISE] == 0 ? 0 : ((wv[41][q][EPOCH_TYPE_NOISE] == 1) ? 1 : 2) // adapt to changed filter order definition wv[26][][EPOCH_TYPE_NOISE] = 6 wv[27][][EPOCH_TYPE_NOISE] = 0 diff --git a/Packages/tests/Basic/UTF_AnalysisFunctionHelpers.ipf b/Packages/tests/Basic/UTF_AnalysisFunctionHelpers.ipf index 3e6d0414c8..03cfb7320f 100644 --- a/Packages/tests/Basic/UTF_AnalysisFunctionHelpers.ipf +++ b/Packages/tests/Basic/UTF_AnalysisFunctionHelpers.ipf @@ -22,14 +22,14 @@ End Function/WAVE AE_GenerateValidNum_IGNORE() - Make/D/FREE/N=(LABNOTEBOOK_LAYER_COUNT) values = (p == 0 ? 0 : NaN) + Make/D/FREE/N=(LABNOTEBOOK_LAYER_COUNT) values = ((p == 0) ? 0 : NaN) return values End Function AE_ThrowsWithWrongWaveType() try - Make/I/FREE/N=(LABNOTEBOOK_LAYER_COUNT) values = (p == 0 ? 0 : NaN) + Make/I/FREE/N=(LABNOTEBOOK_LAYER_COUNT) values = ((p == 0) ? 0 : NaN) ED_AddEntryToLabnotebook(device, "a", values) FAIL() catch diff --git a/Packages/tests/Basic/UTF_AsynFrameworkTest.ipf b/Packages/tests/Basic/UTF_AsynFrameworkTest.ipf index 8cec00aa19..2ba39f2c1e 100644 --- a/Packages/tests/Basic/UTF_AsynFrameworkTest.ipf +++ b/Packages/tests/Basic/UTF_AsynFrameworkTest.ipf @@ -868,7 +868,7 @@ static Function TASYNC_InOrderDiffWL() timeout = 0 for(;;) ASYNC_ThreadReadOut() - if(numpnts(returnOrder) == workCnt / 2 && numpnts(returnOrder2) == workCnt / 2) + if(numpnts(returnOrder) == (workCnt / 2) && numpnts(returnOrder2) == (workCnt / 2)) break endif if(endtime < datetime) @@ -879,7 +879,7 @@ static Function TASYNC_InOrderDiffWL() CHECK(!timeout) if(!timeout) - for(i = 0; i < workCnt / 2; i += 1) + for(i = 0; i < (workCnt / 2); i += 1) CHECK_EQUAL_VAR(returnOrder[i], i) CHECK_EQUAL_VAR(returnOrder2[i], i) endfor @@ -1095,7 +1095,7 @@ static Function TASYNC_IODiffWLDirectStop() CHECK(!timeout) if(!timeout) - for(i = 0; i < workCnt / 2; i += 1) + for(i = 0; i < (workCnt / 2); i += 1) CHECK_EQUAL_VAR(returnOrder[i], i) CHECK_EQUAL_VAR(returnOrder2[i], i) endfor @@ -1188,15 +1188,15 @@ static Function TASYNC_RunClassDouble() timeout = 0 for(;;) ASYNC_ThreadReadOut() - if(numpnts(returnOrder) == workCnt / 2 && numpnts(returnOrder2) == workCnt / 2) + if(numpnts(returnOrder) == (workCnt / 2) && numpnts(returnOrder2) == (workCnt / 2)) CHECK(ASYNC_IsWorkloadClassDone("WorkLoadDoubleClass1")) CHECK(ASYNC_IsWorkloadClassDone("WorkLoadDoubleClass2")) break endif - if(numpnts(returnOrder) != workCnt / 2) + if(numpnts(returnOrder) != (workCnt / 2)) CHECK(!ASYNC_IsWorkloadClassDone("WorkLoadDoubleClass1")) endif - if(numpnts(returnOrder2) != workCnt / 2) + if(numpnts(returnOrder2) != (workCnt / 2)) CHECK(!ASYNC_IsWorkloadClassDone("WorkLoadDoubleClass2")) endif @@ -1354,7 +1354,7 @@ threadsafe Function/DF RunGenericWorker5(DFREF dfr) // reliable here on Win7/wine now = datetime for(;;) - if(datetime > now + 1) + if(datetime > (now + 1)) break endif endfor @@ -1371,7 +1371,7 @@ threadsafe Function/DF RunGenericWorkerAbortOnValue(DFREF dfr) // reliable here on Win7/wine now = datetime for(;;) - if(datetime > now + 1) + if(datetime > (now + 1)) break endif endfor @@ -1388,7 +1388,7 @@ threadsafe Function/DF RunGenericWorkerRTE(DFREF dfr) // reliable here on Win7/wine now = datetime for(;;) - if(datetime > now + 1) + if(datetime > (now + 1)) break endif endfor diff --git a/Packages/tests/Basic/UTF_SweepFormula_Operations.ipf b/Packages/tests/Basic/UTF_SweepFormula_Operations.ipf index a31d0c836b..e921464289 100644 --- a/Packages/tests/Basic/UTF_SweepFormula_Operations.ipf +++ b/Packages/tests/Basic/UTF_SweepFormula_Operations.ipf @@ -1631,7 +1631,7 @@ static Function TestOperationData() Make/FREE/N=0 sweepTemplate WAVE sweepRef = FakeSweepDataGeneratorDefault(sweepTemplate, numChannels) WAVE sweepRef3 = FakeSweepDataGeneratorDefault(sweepTemplate, 5) - sweepRef3[][4] = (sweepRef3[p][4] & 1 << 2) != 0 + sweepRef3[][4] = (sweepRef3[p][4] & (1 << 2)) != 0 sweepCnt = 1 str = "data(select(selrange(TestEpoch2),selchannels(TTL2),selsweeps(" + num2istr(3) + "),selvis(all)))" @@ -1773,8 +1773,8 @@ static Function TestOperationData() WAVE/WAVE dataWref = SF_ExecuteFormula(str, win, useVariables = 0) numResultsRef = sweepCnt * numChannels / 2 Make/FREE/N=(numResultsRef, 2) ranges - ranges[][0] = p >= 2 ? rangeStart1 : rangeStart0 - ranges[][1] = p >= 2 ? rangeEnd1 : rangeEnd0 + ranges[][0] = (p >= 2) ? rangeStart1 : rangeStart0 + ranges[][1] = (p >= 2) ? rangeEnd1 : rangeEnd0 CheckSweepsFromData(dataWref, sweepRef, numResultsref, {1, 3, 1, 3}, ranges = ranges) CheckSweepsMetaData(dataWref, {0, 0, 0, 0}, {6, 7, 6, 7}, {0, 0, 1, 1}, SF_DATATYPE_SWEEP) @@ -2194,7 +2194,7 @@ static Function TestOperationLabNotebook() CHECK_EQUAL_VAR(DimSize(dataRef, ROWS), 3) idx = 0 for(WAVE/D data : dataRef) - Make/D/FREE refData = {idx == 1 ? 1 : 0} + Make/D/FREE refData = {(idx == 1) ? 1 : 0} CHECK_EQUAL_WAVES(data, refData, mode = WAVE_DATA) CHECK_EQUAL_STR("", JWN_GetStringFromWaveNote(data, SF_META_TAG_TEXT)) CHECK_EQUAL_STR("USER_random QC", JWN_GetStringFromWaveNote(data, SF_META_LEGEND_LINE_PREFIX)) diff --git a/Packages/tests/Basic/UTF_SweepFormula_PSX.ipf b/Packages/tests/Basic/UTF_SweepFormula_PSX.ipf index 1431cbb447..3c802015e0 100644 --- a/Packages/tests/Basic/UTF_SweepFormula_PSX.ipf +++ b/Packages/tests/Basic/UTF_SweepFormula_PSX.ipf @@ -662,13 +662,13 @@ static Function FillEventWave_IGNORE(WAVE psxEvent, string id, string comboKey) psxEvent[][%peak_t] = 10 * p psxEvent[][%baseline] = NaN psxEvent[][%baseline_t] = NaN - psxEvent[][%amplitude] = p == 0 ? NaN : 10 * p + psxEvent[][%amplitude] = (p == 0) ? NaN : (10 * p) psxEvent[][%iei] = 1000 * p psxEvent[][%tau] = 1e-6 * p - psxEvent[][%$"Rise Time"] = p == 0 ? NaN : 0.1 * p - psxEvent[][%$"Onset Time"] = p == 0 ? NaN : 0.2 * p + psxEvent[][%$"Rise Time"] = (p == 0) ? NaN : (0.1 * p) + psxEvent[][%$"Onset Time"] = (p == 0) ? NaN : (0.2 * p) psxEvent[][%$"Slew Rate"] = NaN - psxEvent[][%$"Slew Rate Time"] = p == 0 ? NaN : 200 * p + psxEvent[][%$"Slew Rate Time"] = (p == 0) ? NaN : (200 * p) // PSX_ACCEPT:1 // PSX_REJECT:2 @@ -1561,10 +1561,10 @@ static Function CheckEventDataHelper(WAVE/Z/WAVE dataWref, variable index, varia variable numEvents - WAVE/Z psxEvent = dataWref[%$"psxEvent_" + num2str(index)] + WAVE/Z psxEvent = dataWref[%$("psxEvent_" + num2str(index))] CHECK_WAVE(psxEvent, NUMERIC_WAVE, minorType = DOUBLE_WAVE) - WAVE/Z/WAVE eventFit = dataWref[%$"eventFit_" + num2str(index)] + WAVE/Z/WAVE eventFit = dataWref[%$("eventFit_" + num2str(index))] CHECK_WAVE(eventFit, WAVE_WAVE) numEvents = DimSize(psxEvent, ROWS) diff --git a/Packages/tests/HardwareAnalysisFunctions/UTF_PatchSeqDAScale_Adapt.ipf b/Packages/tests/HardwareAnalysisFunctions/UTF_PatchSeqDAScale_Adapt.ipf index 0032aeb085..cffeb7581f 100644 --- a/Packages/tests/HardwareAnalysisFunctions/UTF_PatchSeqDAScale_Adapt.ipf +++ b/Packages/tests/HardwareAnalysisFunctions/UTF_PatchSeqDAScale_Adapt.ipf @@ -321,7 +321,7 @@ static Function [WAVE apFreqRef, WAVE apFreqFromRhSuAd, WAVE DAScalesFromRhSuAd, WAVE/Z sweepPassedFRomRhSuAd = JWN_GetNumericWaveFromWaveNote(overrideResults, "/PassingRhSuAdSweeps") if(!ParamIsDefault(baselineQC)) - apFreqRef[] = baselineQC[p] == 1 ? apFreqRef[p] : NaN + apFreqRef[] = (baselineQC[p] == 1) ? apFreqRef[p] : NaN if(!HasOneValidEntry(apFreqRef)) WaveClear apFreqRef diff --git a/Packages/tests/HardwareBasic/UTF_BasicHardwareTests.ipf b/Packages/tests/HardwareBasic/UTF_BasicHardwareTests.ipf index 7fcd0d48c2..351e40cb96 100644 --- a/Packages/tests/HardwareBasic/UTF_BasicHardwareTests.ipf +++ b/Packages/tests/HardwareBasic/UTF_BasicHardwareTests.ipf @@ -423,7 +423,7 @@ static Function UnassociatedChannelsAndTTLs_REENTRY([string str]) device = stringFromList(i, str) hardwareType = GetHardwareType(device) - numRacks = hardwareType == HARDWARE_ITC_DAC ? HW_ITC_GetNumberOfRacks(device) : NaN + numRacks = (hardwareType == HARDWARE_ITC_DAC) ? HW_ITC_GetNumberOfRacks(device) : NaN CHECK_EQUAL_VAR(GetSetVariable(device, "SetVar_Sweep"), numSweeps) sweeps = GetListOfObjects(GetDeviceDataPath(device), DATA_SWEEP_REGEXP, fullPath = 1) diff --git a/Packages/tests/HardwareBasic/UTF_Epochs.ipf b/Packages/tests/HardwareBasic/UTF_Epochs.ipf index c5b710aa7f..ba74fdcd56 100644 --- a/Packages/tests/HardwareBasic/UTF_Epochs.ipf +++ b/Packages/tests/HardwareBasic/UTF_Epochs.ipf @@ -312,13 +312,13 @@ static Function GetHWChannelNumber(WAVE config, variable channelType, variable i switch(channelType) case XOP_CHANNEL_TYPE_DAC: WAVE DACs = GetDACListFromConfig(config) - return index < DimSize(DACs, ROWS) ? DACs[index] : NaN + return (index < DimSize(DACs, ROWS)) ? DACs[index] : NaN case XOP_CHANNEL_TYPE_ADC: WAVE ADCs = GetDACListFromConfig(config) - return index < DimSize(ADCs, ROWS) ? ADCs[index] : NaN + return (index < DimSize(ADCs, ROWS)) ? ADCs[index] : NaN case XOP_CHANNEL_TYPE_TTL: WAVE TTLs = GetTTLListFromConfig(config) - return index < DimSize(TTLs, ROWS) ? TTLs[index] : NaN + return (index < DimSize(TTLs, ROWS)) ? TTLs[index] : NaN default: FAIL() endswitch diff --git a/Packages/tests/PAPlot/UTF_PA_Tests.ipf b/Packages/tests/PAPlot/UTF_PA_Tests.ipf index 47218018bb..c9ed4608f4 100644 --- a/Packages/tests/PAPlot/UTF_PA_Tests.ipf +++ b/Packages/tests/PAPlot/UTF_PA_Tests.ipf @@ -447,7 +447,7 @@ static Function TEST_CASE_BEGIN_OVERRIDE(string name) // monkey patch the labnotebook to claim it holds IC data instead of VC WAVE numericalValues = root:MIES:LabNoteBook:Dev1:numericalValues - MultiThread numericalValues[][%$CLAMPMODE_ENTRY_KEY][] = (numericalValues[p][%$CLAMPMODE_ENTRY_KEY][r] == V_CLAMP_MODE ? I_CLAMP_MODE : numericalValues[p][%$CLAMPMODE_ENTRY_KEY][r]) + MultiThread numericalValues[][%$CLAMPMODE_ENTRY_KEY][] = ((numericalValues[p][%$CLAMPMODE_ENTRY_KEY][r] == V_CLAMP_MODE) ? I_CLAMP_MODE : numericalValues[p][%$CLAMPMODE_ENTRY_KEY][r]) End static Function [string bspName, string graph] PAT_StartDataBrowser_IGNORE() @@ -604,8 +604,8 @@ static Function PAT_VerifyImageAxes(string graph, string traceName, variable ach CHECK_EQUAL_STR(yunits, ref_yunits) layoutSize = multiGraphMode ? 1 : patest.layoutSize - xLayoutCoord = multiGraphMode ? 0 : aregion - 1 - yLayoutCoord = multiGraphMode ? 0 : achan - 1 + xLayoutCoord = multiGraphMode ? 0 : (aregion - 1) + yLayoutCoord = multiGraphMode ? 0 : (achan - 1) ref_from = xLayoutCoord * ONE_TO_PERCENT / sqrt(layoutSize) ref_to = (xLayoutCoord + 1) * ONE_TO_PERCENT / sqrt(layoutSize) @@ -657,8 +657,8 @@ static Function PAT_VerifyTraceAxes(string graph, string traceName, variable ach CHECK_EQUAL_STR(yunits, ref_yunits) layoutSize = multiGraphMode ? 1 : patest.layoutSize - xLayoutCoord = multiGraphMode ? 0 : aregion - 1 - yLayoutCoord = multiGraphMode ? 0 : achan - 1 + xLayoutCoord = multiGraphMode ? 0 : (aregion - 1) + yLayoutCoord = multiGraphMode ? 0 : (achan - 1) ref_from = xLayoutCoord * ONE_TO_PERCENT / sqrt(layoutSize) ref_to = (xLayoutCoord + 1) * ONE_TO_PERCENT / sqrt(layoutSize) @@ -801,7 +801,7 @@ static Function PAT_CheckIfTracesAreFront(string allTraces, string frontTraces, for(i = 0; i < numFrontTraces; i += 1) pos = WhichListItem(StringFromList(i, frontTraces), tracesInBlock) - if(pos < numBlockTraces - numFrontTraces) + if(pos < (numBlockTraces - numFrontTraces)) return 0 endif endfor @@ -1869,7 +1869,7 @@ Function PAT_FailedPulseCheckVC() // now with VC data again WAVE numericalValues = root:MIES:LabNoteBook:Dev1:numericalValues - MultiThread numericalValues[][%$CLAMPMODE_ENTRY_KEY][] = (numericalValues[p][%$CLAMPMODE_ENTRY_KEY][r] == I_CLAMP_MODE ? V_CLAMP_MODE : numericalValues[p][%$CLAMPMODE_ENTRY_KEY][r]) + MultiThread numericalValues[][%$CLAMPMODE_ENTRY_KEY][] = ((numericalValues[p][%$CLAMPMODE_ENTRY_KEY][r] == I_CLAMP_MODE) ? V_CLAMP_MODE : numericalValues[p][%$CLAMPMODE_ENTRY_KEY][r]) [bspName, graph] = PAT_StartDataBrowser_IGNORE() PGC_SetAndActivateControl(bspName, "check_BrowserSettings_OVS", val = 1) diff --git a/Packages/tests/UTF_DataGenerators.ipf b/Packages/tests/UTF_DataGenerators.ipf index 941cf7042e..654cee901e 100644 --- a/Packages/tests/UTF_DataGenerators.ipf +++ b/Packages/tests/UTF_DataGenerators.ipf @@ -311,10 +311,10 @@ static Function/WAVE EpochTestSamplingFrequencyTTL_Gen() WAVE wTemp = ListToNumericWave(frequencies, ";", ignoreErr = 1) #ifdef TESTS_WITH_ITC18USB_HARDWARE - wTemp[] = wTemp[p] == 100 ? NaN : wTemp[p] + wTemp[] = (wTemp[p] == 100) ? NaN : wTemp[p] #else #ifdef TESTS_WITH_ITC1600_HARDWARE - wTemp[] = wTemp[p] == 100 ? NaN : wTemp[p] + wTemp[] = (wTemp[p] == 100) ? NaN : wTemp[p] #endif // TESTS_WITH_ITC1600_HARDWARE #endif // TESTS_WITH_ITC18USB_HARDWARE @@ -330,7 +330,7 @@ static Function/WAVE EpochTestSamplingMultiplier_Gen() string multipliers = DAP_GetSamplingMultiplier() WAVE wTemp = ListToNumericWave(multipliers, ";") - wTemp[] = wTemp[p] == 1 ? NaN : wTemp[p] + wTemp[] = (wTemp[p] == 1) ? NaN : wTemp[p] WAVE w = ZapNaNs(wTemp) SetDimensionLabelsFromWaveContents(w, suffix = "x") diff --git a/Packages/tests/UTF_HardwareHelperFunctions.ipf b/Packages/tests/UTF_HardwareHelperFunctions.ipf index c0956b1433..8154eef005 100644 --- a/Packages/tests/UTF_HardwareHelperFunctions.ipf +++ b/Packages/tests/UTF_HardwareHelperFunctions.ipf @@ -240,7 +240,7 @@ static Function CheckUserEpochChunkNoOverlap(WAVE/T epochInfo) variable s1, e1, s2, e2, overlap numEpochs = DimSize(epochInfo, ROWS) - for(i = 0; i < numEpochs - 1; i += 1) + for(i = 0; i < (numEpochs - 1); i += 1) s1 = str2num(epochInfo[i][EPOCH_COL_STARTTIME]) e1 = str2num(epochInfo[i][EPOCH_COL_ENDTIME]) for(j = i + 1; j < numEpochs; j += 1) @@ -1083,7 +1083,7 @@ Function CheckUserEpochs(string dev, WAVE times, string shortNameFormat, [variab startTime = str2num(userChunkEpochs[k][EPOCH_COL_STARTTIME]) endTime = str2num(userChunkEpochs[k][EPOCH_COL_ENDTIME]) startRef = times[k << 1] * MILLI_TO_ONE - endRef = times[k << 1 + 1] * MILLI_TO_ONE + endRef = times[(k << 1) + 1] * MILLI_TO_ONE if(CheckIfSmall(startRef, tol = 1e-12)) CHECK_SMALL_VAR(startTime) diff --git a/tools/run-ipt.sh b/tools/run-ipt.sh index b69b875cf5..b876ea789c 100755 --- a/tools/run-ipt.sh +++ b/tools/run-ipt.sh @@ -29,6 +29,5 @@ while read -r line; do done < <(git ls-files ':(attr:ipt)') echo "exclude = BugproneMissingSwitchDefaultCase" >> config.toml -echo "exclude = ReadabilityMissingParenthesis" >> config.toml (cd $top_level && $ipt --arg-file config.toml lint -i) From 45623c9890b4b36855fa72d94d15563636a314d9 Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Tue, 4 Feb 2025 21:06:08 +0100 Subject: [PATCH 6/8] treewide: Fix BugproneMissingSwitchDefaultCase for linter The to be fixed cases can fall in three categories: - GUI switch statements for controls and window hooks: We always want to not do anything in the default clause - Cases were we iterated over all possible values, this needs an assertion or a FAIL statement for the tests - Cases were we don't want to do anything for certain values. This is mostly done with a comment. --- Packages/MIES/MIES_AmplifierInteraction.ipf | 3 +- Packages/MIES/MIES_AnalysisBrowser.ipf | 33 +++++ .../MIES_AnalysisBrowser_SweepBrowser.ipf | 4 + ...ES_AnalysisBrowser_SweepBrowser_Export.ipf | 13 ++ .../MIES/MIES_AnalysisFunctionHelpers.ipf | 3 +- Packages/MIES/MIES_AnalysisFunctions.ipf | 3 + .../MIES/MIES_AnalysisFunctions_Dashboard.ipf | 8 ++ .../MIES_AnalysisFunctions_MultiPatchSeq.ipf | 12 +- ...isFunctions_MultiPatchSeq_SpikeControl.ipf | 3 + .../MIES/MIES_AnalysisFunctions_PatchSeq.ipf | 25 ++++ Packages/MIES/MIES_ArtefactRemoval.ipf | 8 ++ Packages/MIES/MIES_BackgroundWatchdog.ipf | 11 +- Packages/MIES/MIES_BrowserSettingsPanel.ipf | 40 ++++++ Packages/MIES/MIES_Browser_Plotter.ipf | 3 + Packages/MIES/MIES_DAC-Hardware.ipf | 48 +++++++ Packages/MIES/MIES_DAEphys.ipf | 120 +++++++++++++++++- Packages/MIES/MIES_DataAcquisition.ipf | 6 +- Packages/MIES/MIES_DataAcquisition_Multi.ipf | 3 + Packages/MIES/MIES_DataBrowser.ipf | 4 + Packages/MIES/MIES_DataConfigurator.ipf | 30 +++++ Packages/MIES/MIES_DebugPanel.ipf | 6 + Packages/MIES/MIES_Downsample.ipf | 16 +++ Packages/MIES/MIES_GuiPopupMenuExt.ipf | 2 + Packages/MIES/MIES_GuiUtilities.ipf | 7 +- Packages/MIES/MIES_IVSCC.ipf | 8 ++ Packages/MIES/MIES_IgorHooks.ipf | 2 + Packages/MIES/MIES_InputDialog.ipf | 6 + Packages/MIES/MIES_LogbookViewer.ipf | 12 ++ Packages/MIES/MIES_MiesUtilities_GUI.ipf | 4 + Packages/MIES/MIES_MiesUtilities_Getter.ipf | 4 +- Packages/MIES/MIES_MiesUtilities_Logbook.ipf | 5 +- .../MIES/MIES_MiesUtilities_Recreation.ipf | 3 + Packages/MIES/MIES_OverlaySweeps.ipf | 8 ++ Packages/MIES/MIES_PressureControl.ipf | 26 ++++ Packages/MIES/MIES_PulseAveraging.ipf | 12 ++ Packages/MIES/MIES_SamplingInterval.ipf | 3 + Packages/MIES/MIES_SweepFormula.ipf | 16 +++ Packages/MIES/MIES_SweepFormula_PSX.ipf | 33 +++++ Packages/MIES/MIES_SweepSaving.ipf | 3 + Packages/MIES/MIES_TestPulse_Multi.ipf | 6 + Packages/MIES/MIES_TraceUserData.ipf | 2 + Packages/MIES/MIES_Utilities_WaveHandling.ipf | 11 ++ Packages/MIES/MIES_WaveBuilderPanel.ipf | 49 +++++++ Packages/MIES/MIES_WaveDataFolderGetters.ipf | 6 + Packages/MIES_Include.ipf | 4 + Packages/tests/Basic/UTF_Configuration.ipf | 2 + .../Basic/UTF_PGCSetAndActivateControl.ipf | 12 ++ .../UTF_MultiPatchSeqDaScale.ipf | 3 + .../UTF_MultiPatchSeqFastRheoEstimate.ipf | 3 + .../UTF_MultiPatchSeqSpikeControl.ipf | 3 + .../HardwareBasic/UTF_BasicHardwareTests.ipf | 4 + Packages/tests/HardwareBasic/UTF_DAEphys.ipf | 5 + Packages/tests/UserAnalysisFunctions.ipf | 35 ++++- tools/run-ipt.sh | 2 - 54 files changed, 676 insertions(+), 27 deletions(-) diff --git a/Packages/MIES/MIES_AmplifierInteraction.ipf b/Packages/MIES/MIES_AmplifierInteraction.ipf index af1bf63591..e644256dd0 100644 --- a/Packages/MIES/MIES_AmplifierInteraction.ipf +++ b/Packages/MIES/MIES_AmplifierInteraction.ipf @@ -247,7 +247,8 @@ Function AI_UpdateAmpModel(string device, string ctrl, variable headStage, [vari case "button_DataAcq_AutoPipOffset_VC": runMode = TP_StopTestPulseFast(device) default: - // do nothing + // do nothing + break endswitch for(i = 0; i < NUM_HEADSTAGES; i += 1) diff --git a/Packages/MIES/MIES_AnalysisBrowser.ipf b/Packages/MIES/MIES_AnalysisBrowser.ipf index 1b61ed0f0b..2e95048e08 100644 --- a/Packages/MIES/MIES_AnalysisBrowser.ipf +++ b/Packages/MIES/MIES_AnalysisBrowser.ipf @@ -1008,6 +1008,9 @@ static Function/S AB_LoadLabNotebookFromFile(string discLocation) case ANALYSISBROWSER_FILE_TYPE_NWBv2: deviceList = AB_LoadLabNotebookFromNWB(map[%DiscLocation]) break + default: + ASSERT(0, "Unsupported file type") + break endswitch return deviceList @@ -2660,6 +2663,8 @@ Function AB_ButtonProc_ExpandAll(STRUCT WMButtonAction &ba) : ButtonControl AB_ExpandListColumn(EXPERIMENT_TREEVIEW_COLUMN) AB_ExpandListColumn(DEVICE_TREEVIEW_COLUMN) break + default: + break endswitch return 0 @@ -2674,6 +2679,8 @@ Function AB_ButtonProc_CollapseAll(STRUCT WMButtonAction &ba) : ButtonControl AB_CollapseListColumn(DEVICE_TREEVIEW_COLUMN) AB_CollapseListColumn(EXPERIMENT_TREEVIEW_COLUMN) break + default: + break endswitch return 0 @@ -2701,6 +2708,8 @@ Function AB_ButtonProc_LoadSweeps(STRUCT WMButtonAction &ba) : ButtonControl KillWindow $graph endif break + default: + break endswitch return 0 @@ -2713,6 +2722,8 @@ Function AB_ButtonProc_LoadBoth(STRUCT WMButtonAction &ba) : ButtonControl case 2: PGC_SetAndActivateControl(ba.win, "button_load_stimsets") PGC_SetAndActivateControl(ba.win, "button_load_sweeps") + default: + break endswitch return 0 @@ -2732,6 +2743,8 @@ Function AB_ButtonProc_LoadStimsets(STRUCT WMButtonAction &ba) : ButtonControl WBP_CreateWaveBuilderPanel() endif break + default: + break endswitch return 0 @@ -2783,6 +2796,8 @@ Function AB_ButtonProc_Refresh(STRUCT WMButtonAction &ba) : ButtonControl AB_UpdateColors() break + default: + break endswitch return 0 @@ -2817,6 +2832,8 @@ Function AB_ButtonProc_OpenFolders(STRUCT WMButtonAction &ba) : ButtonControl endfor KillPath/Z $symbPath break + default: + break endswitch return 0 @@ -2843,6 +2860,8 @@ Function AB_ButtonProc_Remove(STRUCT WMButtonAction &ba) : ButtonControl endfor AB_SaveSourceListInSettings() + break + default: break endswitch @@ -2882,6 +2901,8 @@ Function AB_ButtonProc_AddFolder(STRUCT WMButtonAction &ba) : ButtonControl Make/FREE/T wFolder = {folder} AB_AddExperimentEntries(ba.win, wFolder) break + default: + break endswitch return 0 @@ -2920,6 +2941,8 @@ Function AB_ButtonProc_AddFiles(STRUCT WMButtonAction &ba) : ButtonControl WAVE/T selFiles = ListToTextWave(fileList, "\r") AB_AddFiles(ba.win, selFiles) break + default: + break endswitch return 0 @@ -3008,6 +3031,8 @@ Function AB_ButtonProc_SelectStimSets(STRUCT WMButtonAction &ba) : ButtonControl expBrowserSel[indizes[i]][] = expBrowserSel[p][q] | LISTBOX_SELECT_OR_SHIFT_SELECTION endfor + break + default: break endswitch @@ -3056,6 +3081,8 @@ Function AB_ListBoxProc_ExpBrowser(STRUCT WMListboxAction &lba) : ListBoxControl endif AB_UpdateColors() + break + default: break endswitch @@ -3141,6 +3168,8 @@ Function AB_ButtonProc_OpenCommentNB(STRUCT WMButtonAction &ba) : ButtonControl NewNoteBook/K=1/F=0/OPTS=(2^2 + 2^3)/N=$commentNotebook/W=(0, 0, 300, 400) as titleString ReplaceNotebookText(commentNotebook, comment) break + default: + break endswitch return 0 @@ -3181,6 +3210,8 @@ Function AB_ButtonProc_ResaveAsNWB(STRUCT WMButtonAction &ba) : ButtonControl AB_ReExport(i, overwrite) endfor break + default: + break endswitch End @@ -3504,6 +3535,8 @@ Function AB_WindowHook(STRUCT WMWinHookStruct &s) AB_MemoryFreeMappedDF() AB_RemoveEmptyWorkingDF() + break + default: break endswitch diff --git a/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser.ipf b/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser.ipf index 0aa2a2912c..b17f3bbba6 100644 --- a/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser.ipf +++ b/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser.ipf @@ -647,6 +647,8 @@ Function SB_PopupMenuSelectSweep(STRUCT WMPopupAction &pa) : PopupMenuControl UpdateSweepPlot(win) endif + break + default: break endswitch End @@ -660,6 +662,8 @@ Function SB_ButtonProc_ExportTraces(STRUCT WMButtonAction &ba) : ButtonControl graph = GetMainWindow(ba.win) SBE_ShowExportPanel(graph) break + default: + break endswitch return 0 diff --git a/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser_Export.ipf b/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser_Export.ipf index f390602008..f2c5866b0e 100644 --- a/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser_Export.ipf +++ b/Packages/MIES/MIES_AnalysisBrowser_SweepBrowser_Export.ipf @@ -574,6 +574,9 @@ Function SBE_PopMenu_ExportTargetAxis(STRUCT WMPopupAction &pa) : PopupMenuContr case "popup_sweep_export_x_axis": list = "setvar_sweep_export_new_x_name" break + default: + ASSERT(0, "Unknown control name") + break endswitch if(!cmpstr(popStr, "New")) @@ -582,6 +585,8 @@ Function SBE_PopMenu_ExportTargetAxis(STRUCT WMPopupAction &pa) : PopupMenuContr DisableControls(win, list) endif + break + default: break endswitch @@ -603,6 +608,8 @@ Function SBE_PopMenu_ExportTargetGraph(STRUCT WMPopupAction &pa) : PopupMenuCont DisableControl(win, "setvar_sweep_export_datafolder") endif + break + default: break endswitch @@ -621,6 +628,8 @@ Function SBE_ButtonProc_PerformExport(STRUCT WMButtonAction &ba) : ButtonControl SBE_FillExportSettings(win, sett) SBE_ExportSweepBrowser(sett) break + default: + break endswitch return 0 @@ -646,6 +655,8 @@ Function SBE_CheckProc_UsePulseForXRange(STRUCT WMCheckboxAction &cba) : CheckBo DisableControls(win, listXPulses) endif break + default: + break endswitch return 0 @@ -666,6 +677,8 @@ Function SBE_PopMenuProc_PulsesADTrace(STRUCT WMPopupAction &pa) : PopupMenuCont numPulses = DimSize(pulseStartTimes, ROWS) SetVariable setvar_sweep_export_num_pulses, win=$pa.win, limits={1, numPulses, 1} + break + default: break endswitch diff --git a/Packages/MIES/MIES_AnalysisFunctionHelpers.ipf b/Packages/MIES/MIES_AnalysisFunctionHelpers.ipf index 0a28a4d89d..f1635e7ed3 100644 --- a/Packages/MIES/MIES_AnalysisFunctionHelpers.ipf +++ b/Packages/MIES/MIES_AnalysisFunctionHelpers.ipf @@ -1236,7 +1236,8 @@ Function AFH_LastSweepInSet(string device, variable sweepNo, variable headstage, sweepOffset = 1 break default: - // do nothing + // do nothing + break endswitch DAC = AFH_GetDACFromHeadstage(device, headstage) diff --git a/Packages/MIES/MIES_AnalysisFunctions.ipf b/Packages/MIES/MIES_AnalysisFunctions.ipf index 4905f60c9a..f0f3e821f4 100644 --- a/Packages/MIES/MIES_AnalysisFunctions.ipf +++ b/Packages/MIES/MIES_AnalysisFunctions.ipf @@ -278,6 +278,9 @@ Function MeasureMidSweepTiming_V3(string device, STRUCT AnalysisFunction_V3 &s) lastCall = GetReferenceTime() break + default: + // do nothing + break endswitch return 0 diff --git a/Packages/MIES/MIES_AnalysisFunctions_Dashboard.ipf b/Packages/MIES/MIES_AnalysisFunctions_Dashboard.ipf index 99e5ce05b9..b78085117a 100644 --- a/Packages/MIES/MIES_AnalysisFunctions_Dashboard.ipf +++ b/Packages/MIES/MIES_AnalysisFunctions_Dashboard.ipf @@ -1355,6 +1355,8 @@ Function AD_ListBoxProc(STRUCT WMListboxAction &lba) : ListBoxControl case 5: // cell selection plus Shift key AD_SelectResult(lba.win) break + default: + break endswitch return 0 @@ -1366,6 +1368,8 @@ Function AD_CheckProc_PassedSweeps(STRUCT WMCheckboxAction &cba) : CheckBoxContr case 2: // mouse up AD_SelectResult(cba.win) break + default: + break endswitch return 0 @@ -1377,6 +1381,8 @@ Function AD_CheckProc_FailedSweeps(STRUCT WMCheckboxAction &cba) : CheckBoxContr case 2: // mouse up AD_SelectResult(cba.win) break + default: + break endswitch return 0 @@ -1399,6 +1405,8 @@ Function AD_CheckProc_Toggle(STRUCT WMCheckboxAction &cba) : CheckBoxControl DisableControls(win, "check_BrowserSettings_DB_Failed;check_BrowserSettings_DB_Passed") endif + break + default: break endswitch diff --git a/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq.ipf b/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq.ipf index e64f483a5c..b30e1464df 100644 --- a/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq.ipf +++ b/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq.ipf @@ -528,10 +528,10 @@ Function/S MSQ_FastRheoEst_CheckParam(string name, STRUCT CheckParametersStruct return "Not valid." endif break + default: + // other parameters are not checked + return "" endswitch - - // other parameters are not checked - return "" End /// @brief Analysis function to find the smallest DAScale where the cell spikes @@ -1054,10 +1054,10 @@ Function/S MSQ_DAScale_CheckParam(string name, STRUCT CheckParametersStruct &s) return "Wave must neither have NaNs nor Infs" endif break + default: + // other parameters are not checked + return "" endswitch - - // other parameters are not checked - return "" End /// @brief Analysis function to apply a list of DAScale values to a range of sweeps diff --git a/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq_SpikeControl.ipf b/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq_SpikeControl.ipf index 9518112b27..01c037e171 100644 --- a/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq_SpikeControl.ipf +++ b/Packages/MIES/MIES_AnalysisFunctions_MultiPatchSeq_SpikeControl.ipf @@ -906,6 +906,9 @@ Function/S SC_SpikeControl_CheckParam(string name, STRUCT CheckParametersStruct return "Invalid value " + num2str(val) endif break + default: + // no checks for other parameters + break endswitch strswitch(name) diff --git a/Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf b/Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf index d95ccaa080..2e3432c4bf 100644 --- a/Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf +++ b/Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf @@ -2820,6 +2820,9 @@ static Function [WAVE data, variable emptySCI] PSQ_DS_GetLabnotebookData(WAVE nu // but actually only need if passing or not dataRhSuAd[] = !!dataRhSuAd[p] break + default: + // no fixup required + break endswitch if(filterPassing) @@ -3609,6 +3612,8 @@ Function/S PSQ_DAScale_CheckParam(string name, STRUCT CheckParametersStruct &s) return "The minimum/maximum spike counts are not ordered properly" endif break + default: + break endswitch // check that all three are present @@ -3622,6 +3627,8 @@ Function/S PSQ_DAScale_CheckParam(string name, STRUCT CheckParametersStruct &s) return "One of MinimumSpikeCount/MaximumSpikeCount/DAScaleModifier is not present" endif break + default: + break endswitch return "" @@ -3946,6 +3953,8 @@ Function PSQ_DAScale(string device, STRUCT AnalysisFunction_V3 &s) WAVE/ZZ DAScales = futureDAScales break + default: + ASSERT(0, "Invalid opMode") endswitch PGC_SetAndActivateControl(device, "check_Settings_ITITP", val = 1) @@ -4265,6 +4274,8 @@ Function PSQ_DAScale(string device, STRUCT AnalysisFunction_V3 &s) EnableControls(device, "Button_DataAcq_SkipBackwards;Button_DataAcq_SkipForward") AD_UpdateAllDatabrowser() break + default: + break endswitch if(s.eventType == PRE_SET_EVENT || s.eventType == POST_SWEEP_EVENT) @@ -5004,6 +5015,8 @@ Function PSQ_Rheobase(string device, STRUCT AnalysisFunction_V3 &s) EnableControls(device, "Button_DataAcq_SkipBackwards;Button_DataAcq_SkipForward") AD_UpdateAllDatabrowser() break + default: + break endswitch if(s.eventType != MID_SWEEP_EVENT) @@ -5266,6 +5279,8 @@ Function PSQ_Ramp(string device, STRUCT AnalysisFunction_V3 &s) EnableControls(device, "Button_DataAcq_SkipBackwards;Button_DataAcq_SkipForward") AD_UpdateAllDatabrowser() break + default: + break endswitch if(s.eventType != MID_SWEEP_EVENT) @@ -6405,6 +6420,8 @@ Function PSQ_Chirp(string device, STRUCT AnalysisFunction_V3 &s) EnableControls(device, "Button_DataAcq_SkipBackwards;Button_DataAcq_SkipForward") AD_UpdateAllDatabrowser() break + default: + break endswitch if(s.eventType != MID_SWEEP_EVENT) @@ -7043,6 +7060,8 @@ Function PSQ_PipetteInBath(string device, STRUCT AnalysisFunction_V3 &s) EnableControls(device, "Button_DataAcq_SkipBackwards;Button_DataAcq_SkipForward") AD_UpdateAllDatabrowser() break + default: + break endswitch if(s.eventType != MID_SWEEP_EVENT) @@ -7626,6 +7645,8 @@ Function PSQ_SealEvaluation(string device, STRUCT AnalysisFunction_V3 &s) EnableControls(device, "Button_DataAcq_SkipBackwards;Button_DataAcq_SkipForward") AD_UpdateAllDatabrowser() break + default: + break endswitch End @@ -8019,6 +8040,8 @@ Function PSQ_TrueRestingMembranePotential(string device, STRUCT AnalysisFunction EnableControls(device, "Button_DataAcq_SkipBackwards;Button_DataAcq_SkipForward") AD_UpdateAllDatabrowser() break + default: + break endswitch if(s.eventType != MID_SWEEP_EVENT) @@ -8708,6 +8731,8 @@ Function PSQ_AccessResistanceSmoke(string device, STRUCT AnalysisFunction_V3 &s) EnableControls(device, "Button_DataAcq_SkipBackwards;Button_DataAcq_SkipForward") AD_UpdateAllDatabrowser() break + default: + break endswitch if(s.eventType != MID_SWEEP_EVENT) diff --git a/Packages/MIES/MIES_ArtefactRemoval.ipf b/Packages/MIES/MIES_ArtefactRemoval.ipf index 740b685a17..7dcb0b3686 100644 --- a/Packages/MIES/MIES_ArtefactRemoval.ipf +++ b/Packages/MIES/MIES_ArtefactRemoval.ipf @@ -308,6 +308,8 @@ Function AR_MainListBoxProc(STRUCT WMListboxAction &lba) : ListBoxControl graph = GetMainWindow(lba.win) AR_HighlightArtefactsEntry(graph) break + default: + break endswitch return 0 @@ -326,6 +328,8 @@ Function AR_SetVarProcCutoffLength(STRUCT WMSetVariableAction &sva) : SetVariabl AR_UpdateListBoxWave(device) AR_HandleRanges(graph) break + default: + break endswitch return 0 @@ -343,6 +347,8 @@ Function AR_ButtonProc_RemoveRanges(STRUCT WMButtonAction &ba) : ButtonControl UpdateSweepPlot(graph) SetCheckBoxState(win, "check_auto_remove", CHECKBOX_UNSELECTED) break + default: + break endswitch return 0 @@ -373,6 +379,8 @@ Function AR_CheckProc_Update(STRUCT WMCheckboxAction &cba) : CheckBoxControl case 2: // mouse up UpdateSweepPlot(cba.win) break + default: + break endswitch return 0 diff --git a/Packages/MIES/MIES_BackgroundWatchdog.ipf b/Packages/MIES/MIES_BackgroundWatchdog.ipf index e0ff2b0fee..d21e13a6db 100644 --- a/Packages/MIES/MIES_BackgroundWatchdog.ipf +++ b/Packages/MIES/MIES_BackgroundWatchdog.ipf @@ -217,6 +217,8 @@ Function BW_ButtonProc_ShowTask(STRUCT WMButtonAction &ba) : ButtonControl endif DisplayProcedure taskname break + default: + break endswitch return 0 @@ -238,6 +240,8 @@ Function BW_ButtonProc_QuitTask(STRUCT WMButtonAction &ba) : ButtonControl CtrlNamedBackground $taskname, stop BW_PanelUpdate() break + default: + break endswitch return 0 @@ -257,6 +261,8 @@ Function BW_WindowHook(STRUCT WMWinHookStruct &s) BW_StopTask() hookResult = 1 break + default: + break endswitch return hookResult @@ -267,7 +273,8 @@ Function BW_ButtonProc_StartTask(STRUCT WMButtonAction &ba) : ButtonControl switch(ba.eventCode) case 2: // mouse up BW_StartTask() - // click code here + break + default: break endswitch @@ -280,6 +287,8 @@ Function BW_ButtonProc_StopTask(STRUCT WMButtonAction &ba) : ButtonControl case 2: // mouse up BW_StopTask() break + default: + break endswitch return 0 diff --git a/Packages/MIES/MIES_BrowserSettingsPanel.ipf b/Packages/MIES/MIES_BrowserSettingsPanel.ipf index 15ed7749a8..43d2cf1045 100644 --- a/Packages/MIES/MIES_BrowserSettingsPanel.ipf +++ b/Packages/MIES/MIES_BrowserSettingsPanel.ipf @@ -264,6 +264,8 @@ Function BSP_SweepFormulaHook(STRUCT WMWinHookStruct &s) endif endif + break + default: break endswitch @@ -649,6 +651,8 @@ Function BSP_ClosePanelHook(STRUCT WMWinHookStruct &s) BSP_HidePanel(s.winName) return 2 // don't kill window + default: + break endswitch return 0 @@ -681,6 +685,8 @@ Function BSP_SweepsAndMouseWheel(STRUCT WMWinHookStruct &s) PGC_SetAndActivateControl(scPanel, ctrl) break + default: + break endswitch return 0 @@ -697,6 +703,8 @@ Function BSP_CheckBoxProc_ArtRemoval(STRUCT WMCheckBoxAction &cba) : CheckBoxCon BSP_SetARControlStatus(mainPanel) UpdateSweepPlot(mainPanel) break + default: + break endswitch return 0 @@ -712,6 +720,8 @@ Function BSP_CheckBoxProc_PerPulseAver(STRUCT WMCheckBoxAction &cba) : CheckBoxC mainPanel = GetMainWindow(cba.win) PA_Update(mainPanel, POST_PLOT_FULL_UPDATE) break + default: + break endswitch return 0 @@ -727,6 +737,8 @@ Function BSP_CheckBoxProc_SweepFormula(STRUCT WMCheckBoxAction &cba) : CheckBoxC mainPanel = GetMainWindow(cba.win) BSP_SetSFControlStatus(mainPanel) break + default: + break endswitch return 0 @@ -742,6 +754,8 @@ Function BSP_ButtonProc_Panel(STRUCT WMButtonAction &ba) : ButtonControl win = GetMainWindow(ba.win) BSP_UnHidePanel(win) break + default: + break endswitch return 0 @@ -765,6 +779,8 @@ Function BSP_TimeAlignmentProc(STRUCT WMCheckBoxAction &cba) : CheckBoxControl case 2: // mouse up UpdateSettingsPanel(cba.win) break + default: + break endswitch End @@ -774,6 +790,8 @@ Function BSP_TimeAlignmentPopup(STRUCT WMPopupAction &pa) : PopupMenuControl case 2: // mouse up UpdateSettingsPanel(pa.win) break + default: + break endswitch return 0 @@ -787,6 +805,8 @@ Function BSP_TimeAlignmentLevel(STRUCT WMSetVariableAction &sva) : SetVariableCo case 3: // Live update UpdateSettingsPanel(sva.win) break + default: + break endswitch return 0 @@ -809,6 +829,8 @@ Function BSP_DoTimeAlignment(STRUCT WMButtonAction &ba) : ButtonControl PostPlotTransformations(graph, POST_PLOT_FULL_UPDATE) break + default: + break endswitch return 0 @@ -840,6 +862,8 @@ Function BSP_CheckProc_ScaleAxes(STRUCT WMCheckboxAction &cba) : CheckBoxControl BSP_ScaleAxes(graph) break + default: + break endswitch return 0 @@ -860,6 +884,8 @@ Function BSP_AxisScalingLevelCross(STRUCT WMSetVariableAction &sva) : SetVariabl BSP_ScaleAxes(graph) endif break + default: + break endswitch return 0 @@ -1189,6 +1215,8 @@ Function BSP_CheckProc_ChangedSetting(STRUCT WMCheckBoxAction &cba) : CheckBoxCo UpdateSweepPlot(graph) break + default: + break endswitch return 0 @@ -1241,6 +1269,8 @@ Function BSP_ButtonProc_RestoreData(STRUCT WMButtonAction &ba) : ButtonControl UpdateSweepPlot(graph) break + default: + break endswitch return 0 @@ -1258,6 +1288,8 @@ Function BSP_CheckProc_OverlaySweeps(STRUCT WMCheckBoxAction &cba) : CheckBoxCon BSP_SetOVSControlStatus(bsPanel) OVS_UpdatePanel(graph, fullUpdate = 1) + break + default: break endswitch @@ -1406,6 +1438,8 @@ Function BSP_ButtonProc_ChangeSweep(STRUCT WMButtonAction &ba) : ButtonControl UpdateSweepPlot(graph) endif break + default: + break endswitch return 0 @@ -1721,6 +1755,8 @@ Function BSP_SFHelpWindowHook(STRUCT WMWinHookStruct &s) SetWindow $mainWin, userData($BSP_USER_DATA_SF_CONTENT_CRC)=num2istr(contentCRC) endif break + default: + break endswitch // return zero so that other hooks are called as well @@ -1859,6 +1895,8 @@ Function BSP_WindowHook(STRUCT WMWinHookStruct &s) ClearRTError() endtry + break + default: break endswitch @@ -1893,6 +1931,8 @@ Function/S BSP_RenameAndSetTitle(string win, string newName) case BROWSER_MODE_AUTOMATION: modeSuffix = " (A*U*T*O*M*A*T*I*O*N)" break + default: + break endswitch numOtherBrowser += ItemsInList(WinList(SWEEPBROWSER_WINDOW_NAME + "*", ";", "WIN:1")) diff --git a/Packages/MIES/MIES_Browser_Plotter.ipf b/Packages/MIES/MIES_Browser_Plotter.ipf index 60457b4c51..5505414ccb 100644 --- a/Packages/MIES/MIES_Browser_Plotter.ipf +++ b/Packages/MIES/MIES_Browser_Plotter.ipf @@ -307,6 +307,9 @@ Function CreateTiledChannelGraph(string graph, WAVE config, variable sweepNo, WA numChannels = numTTLs break + default: + ASSERT(0, "Unsupported channel type") + break endswitch if(DimSize(channelList, ROWS) == 0) diff --git a/Packages/MIES/MIES_DAC-Hardware.ipf b/Packages/MIES/MIES_DAC-Hardware.ipf index 6f648af4f3..f5bcea457d 100644 --- a/Packages/MIES/MIES_DAC-Hardware.ipf +++ b/Packages/MIES/MIES_DAC-Hardware.ipf @@ -123,7 +123,10 @@ Function HW_PrepareAcq(variable hardwareType, variable deviceID, variable mode, break case HARDWARE_SUTTER_DAC: return HW_SU_PrepareAcq(deviceID, mode, flags = flags) + default: + ASSERT(0, "Unsupported hardware type") endswitch + return 0 End @@ -147,6 +150,9 @@ Function HW_SelectDevice(variable hardwareType, variable deviceID, [variable fla case HARDWARE_SUTTER_DAC: // nothing to do return 0 + default: + ASSERT(0, "Unsupported hardware type") + break endswitch End @@ -209,6 +215,9 @@ Function HW_CloseDevice(variable hardwareType, variable deviceID, [variable flag case HARDWARE_SUTTER_DAC: HW_SU_CloseDevice(deviceID, flags = flags) break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch End @@ -237,6 +246,9 @@ Function HW_WriteDAC(variable hardwareType, variable deviceID, variable channel, case HARDWARE_SUTTER_DAC: HW_SU_WriteDAC(deviceID, channel, value, flags = flags) break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch End @@ -266,6 +278,9 @@ Function HW_ReadADC(variable hardwareType, variable deviceID, variable channel, case HARDWARE_SUTTER_DAC: return HW_SU_ReadADC(deviceID, channel, flags = flags) break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch End @@ -307,6 +322,9 @@ Function HW_ReadDigital(variable hardwareType, variable deviceID, variable chann break case HARDWARE_SUTTER_DAC: ASSERT(0, "Not yet implemented") + default: + ASSERT(0, "Unsupported hardware type") + break endswitch End @@ -347,6 +365,9 @@ Function HW_WriteDigital(variable hardwareType, variable deviceID, variable chan break case HARDWARE_SUTTER_DAC: ASSERT(0, "Not yet implemented") + default: + ASSERT(0, "Unsupported hardware type") + break endswitch End @@ -367,6 +388,9 @@ Function HW_EnableYoking(variable hardwareType, variable deviceID, [variable fla case HARDWARE_SUTTER_DAC: ASSERT(0, "Not implemented") break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch End @@ -387,6 +411,9 @@ Function HW_DisableYoking(variable hardwareType, variable deviceID, [variable fl case HARDWARE_SUTTER_DAC: ASSERT(0, "Not implemented") break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch End @@ -412,6 +439,9 @@ Function HW_StopAcq(variable hardwareType, variable deviceID, [variable prepareF case HARDWARE_SUTTER_DAC: HW_SU_StopAcq(deviceID, zeroDAC = zeroDAC, flags = flags) break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch End @@ -437,6 +467,9 @@ Function HW_IsRunning(variable hardwareType, variable deviceID, [variable flags] case HARDWARE_SUTTER_DAC: device = HW_GetMainDeviceName(HARDWARE_SUTTER_DAC, deviceID, flags = flags) return HW_SU_IsRunning(device) + default: + ASSERT(0, "Unsupported hardware type") + break endswitch End @@ -464,6 +497,9 @@ Function/WAVE HW_GetDeviceInfo(variable hardwareType, variable deviceID, [variab case HARDWARE_SUTTER_DAC: return GetSUDeviceInfo() break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch End @@ -584,6 +620,9 @@ Function HW_WriteDeviceInfo(variable hardwareType, string device, WAVE deviceInf deviceInfo[%AuxAD] = str2num(devInfoHWText[%AI]) deviceInfo[%AuxDA] = str2num(devInfoHWText[%AO]) break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch End @@ -2318,6 +2357,9 @@ Function HW_NI_PrepareAcq(variable deviceID, variable mode, [WAVE/Z data, FUNCRE TTLWaves[ttlCnt] = NIDataWave[i] ttlCnt += 1 break + default: + ASSERT(0, "Unsupported channel type") + break endswitch endfor @@ -2370,6 +2412,9 @@ Function HW_NI_PrepareAcq(variable deviceID, variable mode, [WAVE/Z data, FUNCRE case 8: DAQmx_DIO_Config/DEV=realDeviceOrPressure/LGRP=1/CLK={clkStr, 0}/RPTC/DIR=1/WAVE={TTLWaves[0], TTLWaves[1], TTLWaves[2], TTLWaves[3], TTLWaves[4], TTLWaves[5], TTLWaves[6], TTLWaves[7]} TTLStr; AbortOnRTE break + default: + ASSERT(0, "Unsupported TTL count") + break endswitch NVAR taskIDTTL = $GetNI_TTLTaskID(device) taskIDTTL = ttlCnt ? V_DAQmx_DIO_TaskNumber : NaN @@ -3373,6 +3418,9 @@ Function HW_SU_PrepareAcq(variable deviceId, variable mode, [WAVE/Z data, FUNCRE endif MultiThread ttlComposite[] += SUChannel[p] * (1 << channelNumber) break + default: + ASSERT(0, "Unsupported channel type") + break endswitch endfor diff --git a/Packages/MIES/MIES_DAEphys.ipf b/Packages/MIES/MIES_DAEphys.ipf index e448c75c94..95566ca8e9 100644 --- a/Packages/MIES/MIES_DAEphys.ipf +++ b/Packages/MIES/MIES_DAEphys.ipf @@ -841,6 +841,8 @@ Function DAP_WindowHook(STRUCT WMWinHookStruct &s) endif endfor break + default: + break endswitch return 0 @@ -871,7 +873,8 @@ static Function DAP_UpdateDrawElements(string device, variable tab) break default: - // do nothing + // do nothing + break endswitch End @@ -958,6 +961,8 @@ Function DAP_SetVarProc_Channel_Search(STRUCT WMSetVariableAction &sva) : SetVar endfor endif break + default: + break endswitch return 0 @@ -983,6 +988,8 @@ Function DAP_DAorTTLCheckProc(STRUCT WMCheckboxAction &cba) : CheckBoxControl Abort endtry + break + default: break endswitch End @@ -1020,6 +1027,8 @@ Function DAP_CheckProc_Channel_All(STRUCT WMCheckboxAction &cba) : CheckBoxContr PGC_SetAndActivateControl(device, control, val = allChecked, mode = PGC_MODE_SKIP_ON_DISABLED) endfor break + default: + break endswitch return 0 @@ -1086,6 +1095,8 @@ Function DAP_CheckProc_AD(STRUCT WMCheckboxAction &cba) : CheckBoxControl Abort endtry + break + default: break endswitch @@ -1352,6 +1363,9 @@ Function DAP_OneTimeCallAfterDAQ(string device, variable stopReason, [variable f case HARDWARE_NI_DAC: HW_NI_ResetTaskIDs(device) break + default: + // do nothing + break endswitch NVAR count = $GetCount(device) @@ -1427,6 +1441,8 @@ Function DAP_CheckProc_IndexingState(STRUCT WMCheckboxAction &cba) : CheckBoxCon EqualizeCheckBoxes(device, "Check_DataAcq1_IndexingLocked", "check_Settings_Option_3", cba.checked) endif + break + default: break endswitch @@ -1449,6 +1465,8 @@ Function DAP_CheckProc_ShowScopeWin(STRUCT WMCheckboxAction &cba) : CheckBoxCont SCOPE_KillScopeWindowIfRequest(device) endif break + default: + break endswitch return 0 @@ -1485,6 +1503,8 @@ Function DAP_ButtonProc_AllChanOff(STRUCT WMButtonAction &ba) : ButtonControl DAP_TurnOffAllChannels(device, CHANNEL_TYPE_DAC) DAP_TurnOffAllChannels(device, CHANNEL_TYPE_TTL) break + default: + break endswitch End @@ -1563,6 +1583,8 @@ Function DAP_PopMenuChkProc_StimSetList(STRUCT WMPopupAction &pa) : PopupMenuCon DQ_RestartDAQ(device, dataAcqRunMode) endif + break + default: break endswitch return 0 @@ -1602,6 +1624,8 @@ Function DAP_SetVarProc_DA_Scale(STRUCT WMSetVariableAction &sva) : SetVariableC case 9: // mouse down ShowSetVariableLimitsSelectionPopup(sva) break + default: + break endswitch return 0 @@ -1717,6 +1741,8 @@ Function DAP_SetVarProc_TotSweepCount(STRUCT WMSetVariableAction &sva) : SetVari DAG_Update(sva.win, sva.ctrlName, val = sva.dval) DAP_UpdateSweepSetVariables(device) break + default: + break endswitch return 0 @@ -1728,6 +1754,8 @@ Function DAP_ButtonCtrlFindConnectedAmps(STRUCT WMButtonAction &ba) : ButtonCont case 2: // mouse up AI_FindConnectedAmps() break + default: + break endswitch End @@ -1802,6 +1830,8 @@ Function DAP_PopMenuProc_Headstage(STRUCT WMPopupAction &pa) : PopupMenuControl DAG_Update(pa.win, pa.ctrlName, val = pa.popNum - 1, str = pa.popStr) DAP_SyncDeviceAssocSettToGUI(device, headStage) + break + default: break endswitch @@ -1820,6 +1850,8 @@ Function DAP_PopMenuProc_CAA(STRUCT WMPopupAction &pa) : PopupMenuControl DAP_UpdateChanAmpAssignStorWv(device) P_UpdatePressureDataStorageWv(device) break + default: + break endswitch return 0 @@ -1841,6 +1873,9 @@ Function DAP_SetVarProc_CAA(STRUCT WMSetVariableAction &sva) : SetVariableContro case "setvar_DataAcq_PPDuration": DAG_Update(sva.win, sva.ctrlName, val = sva.dval) break + default: + // not stored in GUI state wave + break endswitch DAP_UpdateChanAmpAssignStorWv(device) @@ -1853,8 +1888,13 @@ Function DAP_SetVarProc_CAA(STRUCT WMSetVariableAction &sva) : SetVariableContro case "setvar_DataAcq_PPDuration": ShowSetVariableLimitsSelectionPopup(sva) break + default: + // not stored in GUI state wave + break endswitch break + default: + break endswitch return 0 @@ -1904,6 +1944,8 @@ Function DAP_ButtonProc_ClearChanCon(STRUCT WMButtonAction &ba) : ButtonControl DAP_UpdateChanAmpAssignPanel(device) break + default: + break endswitch return 0 @@ -3182,6 +3224,8 @@ Function DAP_CheckProc_ClampMode(STRUCT WMCheckboxAction &cba) : CheckBoxControl Abort endtry break + default: + break endswitch return 0 @@ -3208,6 +3252,8 @@ Function DAP_CheckProc_HedstgeChck(STRUCT WMCheckboxAction &cba) : CheckBoxContr DAG_Update(cba.win, cba.ctrlName, val = cba.checked) break + default: + break endswitch return 0 @@ -3504,6 +3550,8 @@ Function DAP_ButtonProc_AutoFillGain(STRUCT WMButtonAction &ba) : ButtonControl printf "(%s) Could not find any amplifiers connected with headstages.\r", device endif break + default: + break endswitch return 0 @@ -3552,6 +3600,8 @@ Function DAP_SetVarProc_AmpCntrls(STRUCT WMSetVariableAction &sva) : SetVariable headStage = DAG_GetNumericalValue(device, "slider_DataAcq_ActiveHeadstage") AI_UpdateAmpModel(device, ctrl, headStage) break + default: + break endswitch return 0 @@ -3570,6 +3620,8 @@ Function DAP_ButtonProc_AmpCntrls(STRUCT WMButtonAction &ba) : ButtonControl headStage = DAG_GetNumericalValue(device, "slider_DataAcq_ActiveHeadstage") AI_UpdateAmpModel(device, ctrl, headstage) break + default: + break endswitch return 0 @@ -3589,6 +3641,8 @@ Function DAP_CheckProc_AmpCntrls(STRUCT WMCheckboxAction &cba) : CheckBoxControl headStage = DAG_GetNumericalValue(device, "slider_DataAcq_ActiveHeadstage") AI_UpdateAmpModel(device, ctrl, headStage) break + default: + break endswitch return 0 @@ -3607,6 +3661,8 @@ Function DAP_CheckProc_MDEnable(STRUCT WMCheckboxAction &cba) : CheckBoxControl DAG_Update(device, cba.ctrlName, val = checked) AdaptDependentControls(device, "Check_Settings_BkgTP;Check_Settings_BackgrndDataAcq", CHECKBOX_UNSELECTED, checked, DEP_CTRLS_SAME) break + default: + break endswitch return 0 @@ -3638,6 +3694,8 @@ Function DAP_CheckProc_InsertTP(STRUCT WMCheckBoxAction &cba) : CheckBoxControl device = cba.win DAP_UpdateOnsetDelay(cba.win) break + default: + break endswitch return 0 @@ -3677,6 +3735,8 @@ Function DAP_SetVarProc_TestPulseSett(STRUCT WMSetVariableAction &sva) : SetVari DAP_TPGUISettingToWave(device, sva.ctrlName, sva.dval) break + default: + break endswitch return 0 @@ -3698,6 +3758,8 @@ Function DAP_CheckProc_TestPulseSett(STRUCT WMCheckboxAction &cba) : CheckBoxCon DAP_TPGUISettingToWave(device, ctrl, checked) break + default: + break endswitch return 0 @@ -3746,6 +3808,8 @@ Function DAP_CheckProc_RepeatedAcq(STRUCT WMCheckboxAction &cba) : CheckBoxContr DAG_Update(cba.win, cba.ctrlName, val = cba.checked) DAP_UpdateSweepSetVariables(cba.win) break + default: + break endswitch return 0 @@ -3780,6 +3844,8 @@ Function DAP_CheckProc_SyncCtrl(STRUCT WMCheckboxAction &cba) : CheckBoxControl DAG_Update(cba.win, cba.ctrlName, val = cba.checked) break + default: + break endswitch return 0 @@ -3793,6 +3859,8 @@ Function DAP_SetVarProc_SyncCtrl(STRUCT WMSetVariableAction &sva) : SetVariableC case 3: // Live update DAG_Update(sva.win, sva.ctrlName, val = sva.dval) break + default: + break endswitch return 0 @@ -3847,6 +3915,8 @@ Function DAP_ButtonProc_TPDAQ(STRUCT WMButtonAction &ba) : ButtonControl ASSERT(0, "invalid control") endif break + default: + break endswitch return 0 @@ -3898,6 +3968,8 @@ Function DAP_ButtonProc_OpenCommentNB(STRUCT WMButtonAction &ba) : ButtonControl DAP_OpenCommentPanel(device) DAP_AddUserComment(device) break + default: + break endswitch return 0 @@ -4051,6 +4123,8 @@ Function DAP_CommentPanelHook(STRUCT WMWinHookStruct &s) DAP_SerializeCommentNotebook(device) endif break + default: + break endswitch // return zero so that other hooks are called as well @@ -4102,6 +4176,8 @@ Function DAP_CheckProc_LockedLogic(STRUCT WMCheckboxAction &cba) : CheckBoxContr PGC_SetAndActivateControl(cba.win, "Check_DataAcq_Indexing", val = 1) endif break + default: + break endswitch return 0 @@ -4247,6 +4323,8 @@ Function DAP_CheckProc_UpdateGuiState(STRUCT WMCheckboxAction &cba) : CheckBoxCo case 2: // mouse up DAG_Update(cba.win, cba.ctrlName, val = cba.checked) break + default: + break endswitch return 0 @@ -4264,6 +4342,8 @@ Function DAP_SetVar_SetScale(STRUCT WMSetVariableAction &sva) : SetVariableContr case 9: // mouse down ShowSetVariableLimitsSelectionPopup(sva) break + default: + break endswitch return 0 @@ -4278,6 +4358,8 @@ Function DAP_SetVar_UpdateGuiState(STRUCT WMSetVariableAction &sva) : SetVariabl case 8: // end edit DAG_Update(sva.win, sva.ctrlName, val = sva.dval, str = sva.sval) break + default: + break endswitch return 0 @@ -4299,6 +4381,8 @@ Function DAP_CheckProc_Settings_PUser(STRUCT WMCheckboxAction &cba) : CheckBoxCo endif P_UpdatePressureType(cba.win) + break + default: break endswitch @@ -4312,6 +4396,8 @@ Function DAP_ButtonProc_LockDev(STRUCT WMButtonAction &ba) : ButtonControl ba.blockReentry = 1 DAP_LockDevice(ba.win) break + default: + break endswitch return 0 @@ -4324,6 +4410,8 @@ Function DAP_ButProc_Hrdwr_UnlckDev(STRUCT WMButtonAction &ba) : ButtonControl ba.blockReentry = 1 DAP_UnlockDevice(ba.win) break + default: + break endswitch return 0 @@ -4578,6 +4666,9 @@ static Function/S DAP_GetControlsForChannelIndex(variable channelIndex, variable controls = AddListItem(GetPanelControl(channelIndex, channelType, CHANNEL_CONTROL_ALARM_MIN), controls, ";", Inf) controls = AddListItem(GetPanelControl(channelIndex, channelType, CHANNEL_CONTROL_ALARM_MAX), controls, ";", Inf) break + default: + ASSERT(0, "Invalid channel type") + break endswitch return controls @@ -4915,6 +5006,8 @@ Function DAP_ButtonProc_skipSweep(STRUCT WMButtonAction &ba) : ButtonControl case 2: RA_SkipSweeps(ba.win, 1, SWEEP_SKIP_USER, limitToSetBorder = 1) break + default: + break endswitch return 0 @@ -4926,6 +5019,8 @@ Function DAP_ButtonProc_skipBack(STRUCT WMButtonAction &ba) : ButtonControl case 2: RA_SkipSweeps(ba.win, -1, SWEEP_SKIP_USER, limitToSetBorder = 1) break + default: + break endswitch return 0 @@ -4963,6 +5058,8 @@ Function DAP_SetVarProc_skipAhead(STRUCT WMSetVariableAction &sva) : SetVariable DAG_Update(sva.win, sva.ctrlName, val = sva.dval) DAP_setSkipAheadLimit(sva.win, IDX_MinNoOfSweeps(sva.win) - 1) break + default: + break endswitch return 0 @@ -4980,6 +5077,8 @@ Function DAP_CheckProc_RandomRA(STRUCT WMCheckboxAction &cba) : CheckBoxControl EnableControl(cba.win, "SetVar_DataAcq_skipAhead") endif break + default: + break endswitch return 0 @@ -5004,6 +5103,8 @@ Function DAP_PopMenuProc_UpdateGuiState(STRUCT WMPopupAction &pa) : PopupMenuCon case 2: // mouse up DAG_Update(pa.win, pa.ctrlName, val = pa.popNum - 1, str = pa.popStr) break + default: + break endswitch return 0 @@ -5030,6 +5131,8 @@ Function DAP_PopMenuProc_SampMult(STRUCT WMPopupAction &pa) : PopupMenuControl DisableControl(pa.win, "Popup_Settings_FixedFreq") endif break + default: + break endswitch return 0 @@ -5046,6 +5149,8 @@ Function DAP_CheckProc_RequireAmplifier(STRUCT WMCheckboxAction &cba) : CheckBox device = cba.win DAG_Update(device, cba.ctrlName, val = checked) break + default: + break endswitch return 0 @@ -5070,6 +5175,8 @@ Function DAP_PopMenuProc_FixedSampInt(STRUCT WMPopupAction &pa) : PopupMenuContr DisableControl(pa.win, "Popup_Settings_SampIntMult") endif break + default: + break endswitch return 0 @@ -5103,6 +5210,8 @@ Function DAP_PopMenuProc_OsciUpdMode(STRUCT WMPopupAction &pa) : PopupMenuContro SCOPE_CreateGraph(device, DATA_ACQUISITION_MODE) endif break + default: + break endswitch return 0 @@ -5146,6 +5255,8 @@ Function ButtonProc_Hardware_rescan(STRUCT WMButtonAction &ba) : ButtonControl DAP_GetITCDeviceList() DAP_GetSUDeviceList() break + default: + break endswitch return 0 @@ -5164,6 +5275,8 @@ Function DAP_CheckProc_PowerSpectrum(STRUCT WMCheckboxAction &cba) : CheckBoxCon testPulseMode = TP_StopTestPulse(device) TP_RestartTestPulse(device, testPulseMode) break + default: + break endswitch return 0 @@ -5359,9 +5472,10 @@ static Function/S DAP_TPControlToLabel(string ctrl) return "autoTPPercentage" case "setvar_Settings_autoTP_int": return "autoTPInterval" + default: + ASSERT(0, "invalid control") + break endswitch - - ASSERT(0, "invalid control") End /// @brief Write a new TP setting value to the wave diff --git a/Packages/MIES/MIES_DataAcquisition.ipf b/Packages/MIES/MIES_DataAcquisition.ipf index 97cb110c20..397ee1a838 100644 --- a/Packages/MIES/MIES_DataAcquisition.ipf +++ b/Packages/MIES/MIES_DataAcquisition.ipf @@ -186,9 +186,11 @@ Function DQ_StopDAQ(string device, variable stopReason, [variable startTPAfterDA case DAQ_BG_MULTI_DEVICE: DQ_StopOngoingDAQ(device, stopReason, startTPAfterDAQ = startTPAfterDAQ) return runMode + case DAQ_NOT_RUNNING: + return DAQ_NOT_RUNNING + default: + ASSERT(0, "Invalid run mode") endswitch - - return DAQ_NOT_RUNNING End Function DQ_RestartDAQ(string device, variable dataAcqRunMode) diff --git a/Packages/MIES/MIES_DataAcquisition_Multi.ipf b/Packages/MIES/MIES_DataAcquisition_Multi.ipf index fab2fbe0c1..dd4e66992b 100644 --- a/Packages/MIES/MIES_DataAcquisition_Multi.ipf +++ b/Packages/MIES/MIES_DataAcquisition_Multi.ipf @@ -138,6 +138,9 @@ Function DQM_FIFOMonitor(STRUCT BackgroundStruct &s) endif endif + break + default: + ASSERT(0, "Invalid hardware mode") break endswitch diff --git a/Packages/MIES/MIES_DataBrowser.ipf b/Packages/MIES/MIES_DataBrowser.ipf index e01f534b6c..65beef0b1c 100644 --- a/Packages/MIES/MIES_DataBrowser.ipf +++ b/Packages/MIES/MIES_DataBrowser.ipf @@ -558,6 +558,8 @@ Function DB_PopMenuProc_LockDBtoDevice(STRUCT WMPopupAction &pa) : PopupMenuCont mainPanel = GetMainWindow(pa.win) DB_LockToDevice(mainPanel, pa.popStr) break + default: + break endswitch return 0 @@ -581,6 +583,8 @@ Function DB_SetVarProc_SweepNo(STRUCT WMSetVariableAction &sva) : SetVariableCon UpdateSweepPlot(win) endif break + default: + break endswitch return 0 diff --git a/Packages/MIES/MIES_DataConfigurator.ipf b/Packages/MIES/MIES_DataConfigurator.ipf index bc1722a3bf..5627d98c53 100644 --- a/Packages/MIES/MIES_DataConfigurator.ipf +++ b/Packages/MIES/MIES_DataConfigurator.ipf @@ -193,6 +193,9 @@ static Function DC_ChannelCalcForDAQConfigWave(string device, variable dataAcqOr endif return numDACs + numADCs + numTTLs break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch return NaN @@ -313,6 +316,9 @@ Function DC_CalculateDAQDataWaveLengthImpl(variable dataLength, variable hardwar return dataLength break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch return NaN @@ -504,6 +510,9 @@ static Function DC_MakeHelperWaves(string device, variable dataAcqOrTP) WAVE/WAVE SUDataWave = GetDAQDataWave(device, dataAcqOrTP) sampleIntervalADC = DimDelta(SUDataWave[numDACs], ROWS) * ONE_TO_MILLI break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch tpLength = (dataAcqOrTP == DATA_ACQUISITION_MODE) ? TPSettingsCalc[%totalLengthPointsDAQ_ADC] : TPSettingsCalc[%totalLengthPointsTP_ADC] @@ -544,6 +553,9 @@ static Function DC_MakeHelperWaves(string device, variable dataAcqOrTP) numRows = DimSize(SUDataWave[numDACs], ROWS) pointsAcq = numRows break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch decMethod = DAG_GetNumericalValue(device, "Popup_Settings_DecMethod") @@ -886,6 +898,9 @@ static Function DC_PlaceDataInDAQConfigWave(string device, variable dataAcqOrTP) endif endfor break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch endif @@ -1082,6 +1097,9 @@ static Function DC_WriteTTLIntoDAQDataWave(string device, STRUCT DataConfigurati limit((TTLWaveITC[round(s.decimationFactor * (p - startOffset))] >> NUM_ITC_TTL_BITS_PER_RACK) & bitMask, minLimit, maxLimit); AbortOnRTE endif break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch End @@ -1340,6 +1358,9 @@ static Function DC_FillDAQDataWaveForTP(string device, STRUCT DataConfigurationR FastOp NIChannel = (NaN) endfor break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch else if(IsWaveRefWave(DAQDataWave)) @@ -1405,6 +1426,9 @@ static Function DC_FillDAQDataWaveForTP(string device, STRUCT DataConfigurationR SetStringInWaveNote(NISUDataWave, TP_PROPERTIES_HASH, key, recursive = 1) CA_StoreEntryIntoCache(key, NISUDataWave) break + default: + ASSERT(0, "Invalid hardware type") + break endswitch endif End @@ -1458,6 +1482,9 @@ static Function DC_FillDAQDataWaveForDAQ(string device, STRUCT DataConfiguration NIChannel[DimSize(NIChannel, ROWS) - cutOff, *] = 0 endif break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch elseif(config[i][%DAQChannelType] == DAQ_CHANNEL_TYPE_DAQ) DAScale = s.DACAmp[i][%DASCALE] * s.gains[i] @@ -1505,6 +1532,9 @@ static Function DC_FillDAQDataWaveForDAQ(string device, STRUCT DataConfiguration limit(tpAmp * s.testPulse[p], minLimit, maxLimit); AbortOnRTE endif break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch else ASSERT(0, "Unknown DAC channel type") diff --git a/Packages/MIES/MIES_DebugPanel.ipf b/Packages/MIES/MIES_DebugPanel.ipf index 3ecf258f2f..f4d2ed9a03 100644 --- a/Packages/MIES/MIES_DebugPanel.ipf +++ b/Packages/MIES/MIES_DebugPanel.ipf @@ -116,6 +116,8 @@ Function DP_WindowHook(STRUCT WMWinHookStruct &s) debugMode = QuerySetIgorOption("DEBUGGING_ENABLED", globalSymbol = 1) SetCheckBoxState(PANEL, "check_debug_mode", debugMode == 1) break + default: + break endswitch return 0 @@ -141,6 +143,8 @@ Function DP_CheckProc_Debug(STRUCT WMCheckboxAction &cba) : CheckBoxControl HW_ITC_DebugMode(checked) endif break + default: + break endswitch return 0 @@ -164,6 +168,8 @@ Function DP_PopMenuProc_Selection(STRUCT WMPopupAction &pa) : PopupMenuControl ASSERT(0, "unknown selection") endif break + default: + break endswitch return 0 diff --git a/Packages/MIES/MIES_Downsample.ipf b/Packages/MIES/MIES_Downsample.ipf index 3dbb212bb2..e8e7509b7d 100644 --- a/Packages/MIES/MIES_Downsample.ipf +++ b/Packages/MIES/MIES_Downsample.ipf @@ -441,6 +441,8 @@ Function DownsampleWindowHook(STRUCT WMWinHookStruct &s) KillOrMoveToTrash(wv = GetDownsampleRateWave()) KillOrMoveToTrash(dfr = $dataPath) break + default: + break endswitch // return zero so that other hooks are called as well @@ -456,6 +458,8 @@ Function CheckBoxInterpolation(STRUCT WMCheckboxAction &cba) : CheckBoxControl ControlUpdate/W=$win $popup_targetrate UpdateEstimatedSizeAfterwards(win) break + default: + break endswitch return 0 @@ -472,6 +476,8 @@ Function PopupMenuTargetRate(STRUCT WMPopupAction &pa) : PopupMenuControl case 6: UpdateEstimatedSizeAfterwards(pa.win) break + default: + break endswitch return 0 @@ -509,6 +515,8 @@ Function ButtonRestoreBackup(STRUCT WMButtonAction &ba) : ButtonControl UpdatePanel(win) break + default: + break endswitch return 0 @@ -571,6 +579,8 @@ Function ButtonDoIt(STRUCT WMButtonAction &ba) : ButtonControl endfor UpdatePanel(win) break + default: + break endswitch return 0 @@ -618,6 +628,8 @@ Function PopupMenuDeviceSelection(STRUCT WMPopupAction &pa) : PopupMenuControl popStr = pa.popStr UpdatePanel(win, deviceSelectionString = popStr) break + default: + break endswitch return 0 @@ -631,6 +643,8 @@ Function PopupMenuDecimationMethod(STRUCT WMPopupAction &pa) : PopupMenuControl win = pa.win UpdatePopupMenuWindowFunction(win, decimationMethod = 2^(pa.popNum - 1)) break + default: + break endswitch return 0 @@ -651,6 +665,8 @@ Function CheckBoxEqualizeDown(STRUCT WMCheckboxAction &cba) : CheckBoxControl control = cba.ctrlName UpdateCheckBoxes(win, control, checked) break + default: + break endswitch return 0 diff --git a/Packages/MIES/MIES_GuiPopupMenuExt.ipf b/Packages/MIES/MIES_GuiPopupMenuExt.ipf index 55a09cf62c..b4486b2f7c 100644 --- a/Packages/MIES/MIES_GuiPopupMenuExt.ipf +++ b/Packages/MIES/MIES_GuiPopupMenuExt.ipf @@ -532,6 +532,8 @@ Function PEXT_ButtonProc(STRUCT WMButtonAction &ba) : ButtonControl PopupContextualMenu/N/ASYN=PEXT_Callback "PopupExt" + num2str(DimSize(itemListWave, ROWS)) break + default: + break endswitch return 0 End diff --git a/Packages/MIES/MIES_GuiUtilities.ipf b/Packages/MIES/MIES_GuiUtilities.ipf index f650203157..00e64214ce 100644 --- a/Packages/MIES/MIES_GuiUtilities.ipf +++ b/Packages/MIES/MIES_GuiUtilities.ipf @@ -869,9 +869,10 @@ Function GetAxisOrientation(string graph, string axes) case "top": return AXIS_ORIENTATION_TOP break + default: + DoAbortNow("unknown axis type") + break endswitch - - DoAbortNow("unknown axis type") End /// @brief Return the recreation macro for an axis @@ -2430,6 +2431,8 @@ Function ResizeControlsSafe(STRUCT WMWinHookStruct &s) SetDataFolder dfr endif break + default: + break endswitch // return zero so that other hooks are called as well diff --git a/Packages/MIES/MIES_IVSCC.ipf b/Packages/MIES/MIES_IVSCC.ipf index 407d0bea62..d1793b0c29 100644 --- a/Packages/MIES/MIES_IVSCC.ipf +++ b/Packages/MIES/MIES_IVSCC.ipf @@ -295,6 +295,8 @@ Function IVS_ButtonProc_Setup(STRUCT WMButtonAction &ba) : ButtonControl case 2: // mouse up IVS_ConfigureMCC() break + default: + break endswitch return 0 @@ -306,6 +308,8 @@ Function IVS_ButtonProc_BaselineQC(STRUCT WMButtonAction &ba) : ButtonControl case 2: // mouse up IVS_runBaselineCheckQC() break + default: + break endswitch return 0 @@ -317,6 +321,8 @@ Function IVS_ButtonProc_AccessResist(STRUCT WMButtonAction &ba) : ButtonControl case 2: // mouse up IVS_runInitAccessResisQC() break + default: + break endswitch return 0 @@ -328,6 +334,8 @@ Function IVS_ButtonProc_GOhmSeal(STRUCT WMButtonAction &ba) : ButtonControl case 2: // mouse up IVS_RunGigOhmSealQC() break + default: + break endswitch return 0 diff --git a/Packages/MIES/MIES_IgorHooks.ipf b/Packages/MIES/MIES_IgorHooks.ipf index e14213621d..4142f444a1 100644 --- a/Packages/MIES/MIES_IgorHooks.ipf +++ b/Packages/MIES/MIES_IgorHooks.ipf @@ -381,6 +381,8 @@ Function IH_ResetScaling(STRUCT WMWinHookStruct &s) SetAxis/W=$win/A endfor break + default: + break endswitch // return zero so that other hooks are called as well diff --git a/Packages/MIES/MIES_InputDialog.ipf b/Packages/MIES/MIES_InputDialog.ipf index b2f6bd6f04..79fd4b1565 100644 --- a/Packages/MIES/MIES_InputDialog.ipf +++ b/Packages/MIES/MIES_InputDialog.ipf @@ -134,6 +134,8 @@ Function ID_ButtonProc(STRUCT WMButtonAction &ba) : ButtonControl endswitch KillWindow/Z $(ba.win) break + default: + break endswitch End @@ -151,6 +153,8 @@ Function ID_SetVarProc(STRUCT WMSetVariableAction &sva) : SetVariableControl WAVE data = ID_GetWave(sva.win) data[idx] = sva.dval break + default: + break endswitch End @@ -162,6 +166,8 @@ Function ID_PopMenuProc(STRUCT WMPopupAction &pa) : PopupMenuControl data[] = 0 data[%$pa.popStr] = 1 + break + default: break endswitch diff --git a/Packages/MIES/MIES_LogbookViewer.ipf b/Packages/MIES/MIES_LogbookViewer.ipf index cd4a59b841..f37a677190 100644 --- a/Packages/MIES/MIES_LogbookViewer.ipf +++ b/Packages/MIES/MIES_LogbookViewer.ipf @@ -204,6 +204,8 @@ Function LBV_ButtonProc_ClearGraph(STRUCT WMButtonAction &ba) : ButtonControl case 2: // mouse up LBV_ClearGraph(ba.win) break + default: + break endswitch return 0 @@ -218,6 +220,8 @@ Function LBV_ButtonProc_SwitchXAxis(STRUCT WMButtonAction &ba) : ButtonControl lbGraph = LBV_GetLabNoteBookGraph(ba.win) LBV_SwitchLBGraphXAxis(lbGraph) break + default: + break endswitch return 0 @@ -241,6 +245,8 @@ Function LBV_PopMenuProc_LabNotebookAndResults(STRUCT WMPopupAction &pa) : Popup lbGraph = LBV_GetLabNoteBookGraph(win) LBV_AddTraceToLBGraph(lbGraph, keys, values, key) break + default: + break endswitch return 0 @@ -311,6 +317,8 @@ Function LBV_PopMenuProc_TPStorage(STRUCT WMPopupAction &pa) : PopupMenuControl DFREF dfr = LBV_GetTPStorageLocation(win) LBV_AddTraceToLBGraphTPStorage(lbGraph, dfr, key) break + default: + break endswitch return 0 @@ -1111,6 +1119,8 @@ Function LBV_EntryDescription(STRUCT WMWinHookStruct &s) descNB = LBV_GetDescriptionNotebook(s.winName) ReflowNotebookText(descNB) break + default: + break endswitch return 0 @@ -1238,6 +1248,8 @@ Function LBV_CheckProc_XRangeSelected(STRUCT WMCheckboxAction &cba) : CheckBoxCo LBV_LimitXRangeToSelected(cba.win) endif break + default: + break endswitch return 0 diff --git a/Packages/MIES/MIES_MiesUtilities_GUI.ipf b/Packages/MIES/MIES_MiesUtilities_GUI.ipf index d3b2cafa60..fad8703f69 100644 --- a/Packages/MIES/MIES_MiesUtilities_GUI.ipf +++ b/Packages/MIES/MIES_MiesUtilities_GUI.ipf @@ -286,6 +286,8 @@ Function TimeAlignCursorMovedHook(STRUCT WMWinHookStruct &s) PGC_SetAndActivateControl(bsPanel, "popup_TimeAlignment_Master", str = graphtrace) break + default: + break endswitch return 0 @@ -836,6 +838,8 @@ Function StoreWindowCoordinatesHook(STRUCT WMWinHookStruct &s) NVAR JSONid = $GetSettingsJSONid() PS_StoreWindowCoordinate(JSONid, win) break + default: + break endswitch return 0 diff --git a/Packages/MIES/MIES_MiesUtilities_Getter.ipf b/Packages/MIES/MIES_MiesUtilities_Getter.ipf index 8095649da7..4e7c0ed251 100644 --- a/Packages/MIES/MIES_MiesUtilities_Getter.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Getter.ipf @@ -103,9 +103,11 @@ Function GetAnalysisFunctionVersion(variable type) return MSQ_DA_SCALE_VERSION case SC_SPIKE_CONTROL: return SC_SPIKE_CONTROL_VERSION + default: + ASSERT(0, "Invalid type") + break endswitch - ASSERT(0, "Invalid type") End Function [WAVE sweepWave, WAVE config] GetSweepAndConfigWaveFromDevice(string device, variable sweepNo) diff --git a/Packages/MIES/MIES_MiesUtilities_Logbook.ipf b/Packages/MIES/MIES_MiesUtilities_Logbook.ipf index 74e52a7aac..eface41aad 100644 --- a/Packages/MIES/MIES_MiesUtilities_Logbook.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Logbook.ipf @@ -1933,7 +1933,8 @@ Function ParseLogbookMode(string modeText) return TEST_PULSE_MODE case "NUMBER_OF_LBN_DAQ_MODES": return NUMBER_OF_LBN_DAQ_MODES + default: + ASSERT(0, "Unsupported labnotebook mode") + break endswitch - - ASSERT(0, "Unsupported labnotebook mode") End diff --git a/Packages/MIES/MIES_MiesUtilities_Recreation.ipf b/Packages/MIES/MIES_MiesUtilities_Recreation.ipf index 557861b5a7..8ab88c36a0 100644 --- a/Packages/MIES/MIES_MiesUtilities_Recreation.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Recreation.ipf @@ -359,6 +359,9 @@ static Function AddDAQChannelTypeFromLBN(WAVE numericalValues, WAVE textualValue case XOP_CHANNEL_TYPE_TTL: channelType = DAQ_CHANNEL_TYPE_DAQ break + default: + ASSERT(0, "Unsupported channel type") + break endswitch ASSERT(IsFinite(GetRowIndex(validChannelTypes, val = channelType)), "Invalid channel type") diff --git a/Packages/MIES/MIES_OverlaySweeps.ipf b/Packages/MIES/MIES_OverlaySweeps.ipf index 11828c3bac..3b0362dbad 100644 --- a/Packages/MIES/MIES_OverlaySweeps.ipf +++ b/Packages/MIES/MIES_OverlaySweeps.ipf @@ -633,6 +633,8 @@ Function OVS_CheckBoxProc_HS_Select(STRUCT WMCheckboxAction &cba) : CheckBoxCont OVS_EndIncrementalUpdate(win, updateHandle) break + default: + break endswitch return 0 @@ -969,6 +971,8 @@ Function OVS_MainListBoxProc(STRUCT WMListboxAction &lba) : ListBoxControl PostPlotTransformations(win, POST_PLOT_REMOVED_SWEEPS, additionalData = {index}) endif break + default: + break endswitch return 0 @@ -980,6 +984,8 @@ Function OVS_PopMenuProc_Select(STRUCT WMPopupAction &pa) : PopupMenuControl case 2: // mouse up OVS_ChangeSweepSelection(pa.win, pa.popStr) break + default: + break endswitch return 0 @@ -997,6 +1003,8 @@ Function OVS_SetVarProc_SelectionRange(STRUCT WMSetVariableAction &sva) : SetVar popStr = GetPopupMenuString(win, "popup_overlaySweeps_select") OVS_ChangeSweepSelection(win, popStr) break + default: + break endswitch return 0 diff --git a/Packages/MIES/MIES_PressureControl.ipf b/Packages/MIES/MIES_PressureControl.ipf index fc838ee4b4..d12e996a91 100644 --- a/Packages/MIES/MIES_PressureControl.ipf +++ b/Packages/MIES/MIES_PressureControl.ipf @@ -2131,6 +2131,8 @@ Function ButtonProc_Approach(STRUCT WMButtonAction &ba) : ButtonControl case 2: // mouse up P_SetApproach(ba.win, ba.ctrlName) break + default: + break endswitch return 0 @@ -2152,6 +2154,8 @@ Function ButtonProc_Seal(STRUCT WMButtonAction &ba) : ButtonControl case 2: // mouse up P_UpdatePressureMode(ba.win, PRESSURE_METHOD_SEAL, ba.ctrlName, 1) break + default: + break endswitch return 0 @@ -2164,6 +2168,8 @@ Function ButtonProc_BreakIn(STRUCT WMButtonAction &ba) : ButtonControl case 2: // mouse up P_UpdatePressureMode(ba.win, PRESSURE_METHOD_BREAKIN, ba.ctrlName, 1) break + default: + break endswitch return 0 @@ -2176,6 +2182,8 @@ Function ButtonProc_Clear(STRUCT WMButtonAction &ba) : ButtonControl case 2: // mouse up P_UpdatePressureMode(ba.win, PRESSURE_METHOD_CLEAR, ba.ctrlName, 0) break + default: + break endswitch return 0 @@ -2207,6 +2215,8 @@ Function CheckProc_ClearEnable(STRUCT WMCheckboxAction &cba) : CheckBoxControl DisableControl(cba.win, "button_DataAcq_Clear") endif break + default: + break endswitch return 0 @@ -2233,6 +2243,8 @@ Function ButtonProc_Hrdwr_P_UpdtDAClist(STRUCT WMButtonAction &ba) : ButtonContr SetPopupMenuVal(ba.win, "popup_Settings_Pressure_dev", list = filteredList) SetPopupMenuVal(ba.win, "popup_Settings_UserPressure", list = filteredList) break + default: + break endswitch return 0 @@ -2261,6 +2273,8 @@ Function P_ButtonProc_Enable(STRUCT WMButtonAction &ba) : ButtonControl P_Enable() P_UpdatePressureDataStorageWv(device) break + default: + break endswitch return 0 @@ -2273,6 +2287,8 @@ Function P_ButtonProc_Disable(STRUCT WMButtonAction &ba) : ButtonControl case 2: // mouse up P_Disable() break + default: + break endswitch return 0 @@ -2285,6 +2301,8 @@ Function ButtonProc_DataAcq_ManPressSet(STRUCT WMButtonAction &ba) : ButtonContr case 2: // mouse up P_SetManual(ba.win, ba.ctrlname) break + default: + break endswitch return 0 @@ -2298,6 +2316,8 @@ Function ButtonProc_ManPP(STRUCT WMButtonAction &ba) : ButtonControl variable headStage = DAG_GetNumericalValue(ba.win, "slider_DataAcq_ActiveHeadstage") P_ManPressurePulse(ba.win, headStage) break + default: + break endswitch return 0 @@ -2312,6 +2332,8 @@ Function P_Check_ApproachNear(STRUCT WMCheckboxAction &cba) : CheckBoxControl P_UpdatePressureDataStorageWv(cba.win) P_RunP_ControlIfTPOFF(cba.win) break + default: + break endswitch return 0 @@ -2325,6 +2347,8 @@ Function P_Check_SealAtm(STRUCT WMCheckboxAction &cba) : CheckBoxControl DAG_Update(cba.win, cba.ctrlName, val = cba.checked) P_UpdatePressureDataStorageWv(cba.win) break + default: + break endswitch return 0 @@ -2396,6 +2420,8 @@ Function P_ButtonProc_UserPressure(STRUCT WMButtonAction &ba) : ButtonControl ASSERT(0, "Invalid ctrl") endif break + default: + break endswitch return 0 diff --git a/Packages/MIES/MIES_PulseAveraging.ipf b/Packages/MIES/MIES_PulseAveraging.ipf index 45206f509b..d0cec7be1d 100644 --- a/Packages/MIES/MIES_PulseAveraging.ipf +++ b/Packages/MIES/MIES_PulseAveraging.ipf @@ -2703,6 +2703,8 @@ Function PA_CheckProc_Common(STRUCT WMCheckboxAction &cba) : CheckBoxControl case 2: // mouse up PA_Update(cba.win, POST_PLOT_CONSTANT_SWEEPS) break + default: + break endswitch return 0 @@ -2722,6 +2724,8 @@ Function PA_SetVarProc_Common(STRUCT WMSetVariableAction &sva) : SetVariableCont endif PA_Update(sva.win, POST_PLOT_CONSTANT_SWEEPS) break + default: + break endswitch return 0 @@ -2733,6 +2737,8 @@ Function PA_PopMenuProc_ColorScale(STRUCT WMPopupAction &pa) : PopupMenuControl case 2: // mouse up PA_SetColorScale(pa.win, pa.popStr) break + default: + break endswitch return 0 @@ -2744,6 +2750,8 @@ Function PA_PopMenuProc_Common(STRUCT WMPopupAction &pa) : PopupMenuControl case 2: // mouse up PA_Update(pa.win, POST_PLOT_CONSTANT_SWEEPS) break + default: + break endswitch return 0 @@ -3698,6 +3706,8 @@ Function PA_TraceWindowHook(STRUCT WMWinHookStruct &s) CleanupOperationQueueResult() endif break + default: + break endswitch return 0 @@ -3721,6 +3731,8 @@ Function PA_ImageWindowHook(STRUCT WMWinHookStruct &s) CleanupOperationQueueResult() endif break + default: + break endswitch return 0 diff --git a/Packages/MIES/MIES_SamplingInterval.ipf b/Packages/MIES/MIES_SamplingInterval.ipf index 560df9d456..2c445e3b66 100644 --- a/Packages/MIES/MIES_SamplingInterval.ipf +++ b/Packages/MIES/MIES_SamplingInterval.ipf @@ -500,6 +500,9 @@ Function SI_CalculateMinSampInterval(string device, variable dataAcqOrTP, variab case HARDWARE_SUTTER_DAC: return (channelType == XOP_CHANNEL_TYPE_ADC) ? (HARDWARE_SU_MIN_SAMPINT_ADC * MILLI_TO_MICRO) : (HARDWARE_SU_MIN_SAMPINT_DAC * MILLI_TO_MICRO) break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch End diff --git a/Packages/MIES/MIES_SweepFormula.ipf b/Packages/MIES/MIES_SweepFormula.ipf index 9e5aa03746..6296e264e5 100644 --- a/Packages/MIES/MIES_SweepFormula.ipf +++ b/Packages/MIES/MIES_SweepFormula.ipf @@ -2864,6 +2864,8 @@ Function SF_button_sweepFormula_check(STRUCT WMButtonAction &ba) : ButtonControl ReplaceNotebookText(json_nb, "") endif + break + default: break endswitch @@ -3006,6 +3008,8 @@ Function SF_button_sweepFormula_display(STRUCT WMButtonAction &ba) : ButtonContr SF_SetStatusDisplay(bsPanel, result, SF_MSG_ERROR) endtry + break + default: break endswitch @@ -3033,6 +3037,8 @@ Function SF_TabProc_Formula(STRUCT WMTabControlAction &tca) : TabControl break endif + break + default: break endswitch @@ -4559,6 +4565,9 @@ static Function/WAVE SF_OperationSetScaleImpl(WAVE/Z input, string dim, variable SetScale/P t, offset, delta, unit, input ASSERT(DimDelta(input, CHUNKS) == delta, "Encountered Igor Bug.") break + default: + ASSERT(0, "Invalid dimension mode") + break endswitch return input @@ -6562,6 +6571,9 @@ static Function/WAVE SF_OperationApFrequencyImpl(WAVE/Z data, variable level, va Make/FREE/D outD = {numPeaks} SetScale/P y, DimOffset(outD, ROWS), DimDelta(outD, ROWS), "peaks [APCount]", outD break + default: + ASSERT(0, "Unsupported method") + break endswitch if(normalize) @@ -6717,6 +6729,8 @@ Function SF_button_sweepFormula_tofront(STRUCT WMButtonAction &ba) : ButtonContr DoIgorMenu "Control", "Retrieve Window" endfor + break + default: break endswitch @@ -6808,6 +6822,8 @@ Function SF_PopMenuProc_OldCode(STRUCT WMPopupAction &pa) : PopupMenuControl ReplaceNotebookText(sweepFormulaNB, code) PGC_SetAndActivateControl(bsPanel, "button_sweepFormula_display", val = CHECKBOX_SELECTED) break + default: + break endswitch return 0 diff --git a/Packages/MIES/MIES_SweepFormula_PSX.ipf b/Packages/MIES/MIES_SweepFormula_PSX.ipf index 85d82f429d..5bf87e0bb4 100644 --- a/Packages/MIES/MIES_SweepFormula_PSX.ipf +++ b/Packages/MIES/MIES_SweepFormula_PSX.ipf @@ -215,6 +215,9 @@ static Function/WAVE PSX_GetCheckboxStatesFromSpecialPanel(string win, string tr states[%all] = 0 last = DimSize(states, ROWS) - 2 break + default: + ASSERT(0, "Unknown trace type") + break endswitch specialEventPanel = PSX_GetSpecialPanel(win) @@ -4276,6 +4279,8 @@ Function PSX_PlotInteractionHook(STRUCT WMWinHookStruct &s) browser = SFH_GetBrowserForFormulaGraph(s.winName) PSX_StoreGuiState(win, browser) return 0 + default: + break endswitch return 0 @@ -4326,6 +4331,8 @@ Function PSX_AllEventGraphHook(STRUCT WMWinHookStruct &s) return 1 break + default: + break endswitch End @@ -5273,6 +5280,8 @@ Function PSX_ButtonProc_StoreEvents(STRUCT WMButtonAction &ba) : ButtonControl PSX_StoreIntoResultsWave(browser, SFH_RESULT_TYPE_PSX_EVENTS, eventContainer, id) break + default: + break endswitch End @@ -5314,6 +5323,8 @@ Function PSX_ButtonProc_LoadEvents(STRUCT WMButtonAction &ba) : ButtonControl PSX_UpdateEventWaves(graph, writeState = 0, comboIndex = i) endfor break + default: + break endswitch End @@ -5361,6 +5372,8 @@ Function PSX_ButtonProcJumpFirstUndet(STRUCT WMButtonAction &ba) : ButtonControl endif endfor + break + default: break endswitch End @@ -5384,6 +5397,8 @@ Function PSX_ListBoxSelectCombo(STRUCT WMListBoxAction &lba) : ListboxControl PSX_SetCombo(lba.win, row) break + default: + break endswitch End @@ -5393,6 +5408,8 @@ Function PSX_CopyHelpToClipboard(STRUCT WMButtonAction &ba) : ButtonControl case 2: // mouse down PutScrapText ba.userData break + default: + break endswitch End @@ -5404,6 +5421,8 @@ Function PSX_CheckboxProcSuppressUpdate(STRUCT WMCheckboxAction &cba) : Checkbox PSX_UpdateAllEventGraph(cba.win, forceAverageUpdate = 1, forceSingleEventUpdate = 1) endif break + default: + break endswitch End @@ -5416,6 +5435,8 @@ Function PSX_PopupMenuState(STRUCT WMPopupAction &cba) : PopupMenuControl forceSingleEventOffsetUpdate = !cmpstr(cba.ctrlName, "popupmenu_event_offset") PSX_UpdateAllEventGraph(cba.win, forceSingleEventUpdate = 1, forceAverageUpdate = 1, forceSingleEventOffsetUpdate = forceSingleEventOffsetUpdate) break + default: + break endswitch End @@ -5425,6 +5446,8 @@ Function PSX_CheckboxProcAllEventPlotUpdate(STRUCT WMCheckboxAction &cba) : Chec case 2: // mouse up PSX_UpdateAllEventGraph(cba.win, forceSingleEventUpdate = 1, forceAverageUpdate = 1) break + default: + break endswitch End @@ -5434,6 +5457,8 @@ Function PSX_CheckboxProcChangeRestrictCurrentCombo(STRUCT WMCheckboxAction &cba case 2: // mouse up PSX_UpdateAllEventGraph(cba.win, forceSingleEventUpdate = 1, forceAverageUpdate = 1, forceBlockIndexUpdate = 1) break + default: + break endswitch End @@ -5443,6 +5468,8 @@ Function PSX_CheckboxProcFitAcceptAverage(STRUCT WMCheckboxAction &cba) : Checkb case 2: // mouse up PSX_UpdateAllEventGraph(cba.win, forceSingleEventUpdate = 1, forceAverageUpdate = 1) break + default: + break endswitch End @@ -5452,6 +5479,8 @@ Function PSX_PopupMenuBlockNumber(STRUCT WMPopupAction &cba) : PopupMenuControl case 2: // mouse up PSX_UpdateAllEventGraph(cba.win, forceAverageUpdate = 1) break + default: + break endswitch End @@ -5463,6 +5492,8 @@ Function PSX_SetVarBlockSize(STRUCT WMSetVariableAction &sva) : SetVariableContr case 3: // Live update PSX_UpdateAllEventGraph(sva.win, forceAverageUpdate = 1, forceBlockIndexUpdate = 1) break + default: + break endswitch End @@ -5472,6 +5503,8 @@ Function PSX_PopupFitAcceptAverageFunc(STRUCT WMPopupAction &cba) : PopupMenuCon case 2: // mouse up PSX_UpdateAllEventGraph(cba.win, forceAverageUpdate = 1) break + default: + break endswitch End diff --git a/Packages/MIES/MIES_SweepSaving.ipf b/Packages/MIES/MIES_SweepSaving.ipf index 19caaafe3c..f8cd86dd41 100644 --- a/Packages/MIES/MIES_SweepSaving.ipf +++ b/Packages/MIES/MIES_SweepSaving.ipf @@ -282,6 +282,9 @@ Function/WAVE SWS_GetChannelGains(string device, [variable timing]) gain[numDACs + numADCs, *] = 1 endif break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch return gain diff --git a/Packages/MIES/MIES_TestPulse_Multi.ipf b/Packages/MIES/MIES_TestPulse_Multi.ipf index 3070693dec..d398b4b218 100644 --- a/Packages/MIES/MIES_TestPulse_Multi.ipf +++ b/Packages/MIES/MIES_TestPulse_Multi.ipf @@ -92,6 +92,9 @@ static Function TPM_BkrdTPMD(string device) case HARDWARE_SUTTER_DAC: HW_StartAcq(HARDWARE_SUTTER_DAC, deviceID, flags = HARDWARE_ABORT_ON_ERROR) break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch if(!IsBackgroundTaskRunning(TASKNAME_TPMD)) CtrlNamedBackground $TASKNAME_TPMD, start @@ -244,6 +247,9 @@ Function TPM_BkrdTPFuncMD(STRUCT BackgroundStruct &s) ActiveDeviceList[i][%ActiveChunk] = lastTP endif + break + default: + ASSERT(0, "Unsupported hardware type") break endswitch diff --git a/Packages/MIES/MIES_TraceUserData.ipf b/Packages/MIES/MIES_TraceUserData.ipf index acfdaf400d..b25c896611 100644 --- a/Packages/MIES/MIES_TraceUserData.ipf +++ b/Packages/MIES/MIES_TraceUserData.ipf @@ -20,6 +20,8 @@ Function TUD_RemoveUserDataWave(STRUCT WMWinHookStruct &s) case EVENT_WINDOW_HOOK_KILL: TUD_Clear(s.winName) break + default: + break endswitch // we always return zero here as other window hooks diff --git a/Packages/MIES/MIES_Utilities_WaveHandling.ipf b/Packages/MIES/MIES_Utilities_WaveHandling.ipf index 57a00bc791..07170a2f43 100644 --- a/Packages/MIES/MIES_Utilities_WaveHandling.ipf +++ b/Packages/MIES/MIES_Utilities_WaveHandling.ipf @@ -97,6 +97,9 @@ threadsafe Function EnsureLargeEnoughWave(WAVE wv, [variable indexShouldExist, v case CHUNKS: wv[][][][oldSizes[CHUNKS],] = initialValue break + default: + ASSERT_TS(0, "Unsupported dimension") + break endswitch endif @@ -569,6 +572,8 @@ threadsafe Function/WAVE DeepCopyWaveRefWave(WAVE/WAVE src, [variable dimension, case CHUNKS: Duplicate/FREE/R=[][][][index] srcWave, dstWave break + default: + break endswitch ReduceWaveDimensionality(dstWave, minDimension = dimension) @@ -756,6 +761,9 @@ Function DeleteWavePoint(WAVE wv, variable dim, [variable index, WAVE indices]) case 3: Redimension/N=(-1, -1, -1, 0) wv break + default: + ASSERT(0, "Invalid dimension") + break endswitch endif else @@ -1206,6 +1214,9 @@ Function DuplicateWaveAndKeepTargetRef(WAVE/Z source, WAVE/Z target) case 4: Redimension/N=(DimSize(source, ROWS), DimSize(source, COLS), DimSize(source, LAYERS), DimSize(source, CHUNKS)) target break + default: + ASSERT(0, "Invalid wave dimension") + break endswitch switch(wTypeSrc) diff --git a/Packages/MIES/MIES_WaveBuilderPanel.ipf b/Packages/MIES/MIES_WaveBuilderPanel.ipf index 5d445c7442..dbda60f54f 100644 --- a/Packages/MIES/MIES_WaveBuilderPanel.ipf +++ b/Packages/MIES/MIES_WaveBuilderPanel.ipf @@ -511,6 +511,8 @@ Function WBP_ButtonProc_DeleteSet(STRUCT WMButtonAction &ba) : ButtonControl ControlUpdate/W=$panel popup_WaveBuilder_SetList PopupMenu popup_WaveBuilder_SetList, win=$panel, mode=1 break + default: + break endswitch return 0 @@ -525,6 +527,8 @@ Function WBP_CheckProc(STRUCT WMCheckboxAction &cba) : CheckBoxControl WBP_UpdateControlAndWave(cba.ctrlName, var = cba.checked) WBP_UpdatePanelIfAllowed() break + default: + break endswitch return 0 @@ -574,6 +578,8 @@ Function WBP_FinalTabHook(STRUCT WMTabControlAction &tca) case EPOCH_TYPE_SQUARE_PULSE: HideControls(tca.win, HIDDEN_CONTROLS_SQUARE_PULSE) break + default: + break endswitch CallFunctionForEachListItem(WBP_AdjustDeltaControls, ControlNameList(panel, ";", "popup_WaveBuilder_op_*")) @@ -606,6 +612,8 @@ Function WBP_ButtonProc_SaveSet(STRUCT WMButtonAction &ba) : ButtonControl SetSetVariableString(panel, "setvar_WaveBuilder_baseName", DEFAULT_SET_PREFIX) WBP_LoadSet(NONE) break + default: + break endswitch End @@ -699,6 +707,9 @@ Function WBP_UpdateControlAndWave(string control, [variable var, string str]) WAVE SegWvType = GetSegmentTypeWave() SegWvType[paramRow] = var break + default: + ASSERT(0, "Invalid wavebuilder wave type") + break endswitch End @@ -721,6 +732,8 @@ Function WBP_SetVarProc_UpdateParam(STRUCT WMSetVariableAction &sva) : SetVariab WBP_UpdatePanelIfAllowed() break + default: + break endswitch return 0 @@ -831,6 +844,8 @@ Function WBP_PopMenuProc_WaveType(STRUCT WMPopupAction &pa) : PopupMenuControl case 2: WBP_ChangeWaveType() break + default: + break endswitch return 0 @@ -862,6 +877,8 @@ Function WBP_SetVarProc_SetSearchString(STRUCT WMSetVariableAction &sva) : SetVa case 2: // Enter key case 3: // Live update break + default: + break endswitch return 0 @@ -891,6 +908,8 @@ Function WBP_PopMenuProc_WaveToLoad(STRUCT WMPopupAction &pa) : PopupMenuControl WBP_UpdatePanelIfAllowed() break + default: + break endswitch End @@ -1033,6 +1052,8 @@ Function WBP_SetVarProc_EpochToEdit(STRUCT WMSetVariableAction &sva) : SetVariab WAVE SegWvType = GetSegmentTypeWave() PGC_SetAndActivateControl(panel, "WBP_WaveType", val = SegWvType[sva.dval]) break + default: + break endswitch End @@ -1045,6 +1066,8 @@ Function WBP_PopupMenu_LoadSet(STRUCT WMPopupAction &pa) : PopupMenuControl setName = GetPopupMenuString(panel, "popup_WaveBuilder_SetList") WBP_LoadSet(setName) break + default: + break endswitch return 0 @@ -1129,6 +1152,8 @@ Function WBP_PopMenuProc_FolderSelect(STRUCT WMPopupAction &pa) : PopupMenuContr PopupMenu popup_WaveBuilder_ListOfWaves, win=$panel, mode=1 ControlUpdate/W=$panel popup_WaveBuilder_ListOfWaves break + default: + break endswitch return 0 @@ -1140,6 +1165,8 @@ Function WBP_CheckProc_PreventUpdate(STRUCT WMCheckboxAction &cba) : CheckBoxCon case 2: // mouse up WBP_UpdatePanelIfAllowed() break + default: + break endswitch End @@ -1153,6 +1180,8 @@ Function WBP_PopupMenu(STRUCT WMPopupAction &pa) : PopupMenuControl WBP_AdjustDeltaControls(pa.ctrlName) endif break + default: + break endswitch return 0 @@ -1277,6 +1306,8 @@ Function WBP_ButtonProc_NewSeed(STRUCT WMButtonAction &ba) : ButtonControl WBP_UpgradePRNG() WBP_UpdatePanelIfAllowed() break + default: + break endswitch return 0 @@ -1288,6 +1319,8 @@ Function WBP_PopupMenu_AnalysisFunctions(STRUCT WMPopupAction &pa) : PopupMenuCo case 2: // mouse up WBP_AnaFuncsToWPT() break + default: + break endswitch return 0 @@ -1387,6 +1420,8 @@ Function WBP_ButtonProc_OpenAnaFuncs(STRUCT WMButtonAction &ba) : ButtonControl Execute/P/Q/Z "DisplayProcedure/W=$\"" + fileName + "\"" CleanupOperationQueueResult() break + default: + break endswitch return 0 @@ -1421,6 +1456,8 @@ Function WBP_SetVarCombineEpochFormula(STRUCT WMSetVariableAction &sva) : SetVar WBP_UpdatePanelIfAllowed() break + default: + break endswitch return 0 @@ -1560,6 +1597,8 @@ Function WBP_MainWindowHook(STRUCT WMWinHookStruct &s) endif endfor break + default: + break endswitch return 0 @@ -1879,6 +1918,8 @@ Function WBP_ButtonProc_DeleteParam(STRUCT WMButtonAction &ba) : ButtonControl WBP_UpdateParameterWave() break + default: + break endswitch return 0 @@ -1931,6 +1972,8 @@ Function WBP_ButtonProc_AddParam(STRUCT WMButtonAction &ba) : ButtonControl SetSetVariableString(win, "setvar_param_name", "") ReplaceNoteBookText(win + "#nb_param_value", "") break + default: + break endswitch return 0 @@ -1946,6 +1989,8 @@ Function WBP_ButtonProc_OpenAnaParamGUI(STRUCT WMButtonAction &ba) : ButtonContr SetControlTitle(panel, "button_toggle_params", "Close parameters panel") endif break + default: + break endswitch return 0 @@ -1987,6 +2032,8 @@ Function WBP_ListBoxProc_AnalysisParams(STRUCT WMListboxAction &lba) : ListBoxCo SetSetVariableString(win, "setvar_param_name", name) ReplaceNoteBookText(win + "#nb_param_value", value) break + default: + break endswitch return 0 @@ -2001,6 +2048,8 @@ Function WBP_ButtonProc_LoadSet(STRUCT WMButtonAction &ba) : ButtonControl setName = GetPopupMenuString(panel, "popup_WaveBuilder_SetList") WBP_LoadSet(setName) break + default: + break endswitch return 0 diff --git a/Packages/MIES/MIES_WaveDataFolderGetters.ipf b/Packages/MIES/MIES_WaveDataFolderGetters.ipf index e309dbfa81..30d6dc45ca 100644 --- a/Packages/MIES/MIES_WaveDataFolderGetters.ipf +++ b/Packages/MIES/MIES_WaveDataFolderGetters.ipf @@ -841,6 +841,9 @@ Function/WAVE GetDAQDataWave(string device, variable mode) Make/WAVE/N=(NUM_DA_TTL_CHANNELS) dfr:$name/WAVE=wv_ni WAVE wv = wv_ni break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch SetStringInWaveNote(wv, TP_PROPERTIES_HASH, "n. a.") @@ -1312,6 +1315,9 @@ Function/S GetDevSpecLabNBFolderAsString(string device) case HARDWARE_ITC_DAC: return GetLabNotebookFolderAsString() + ":" + deviceType + ":Device" + deviceNumber break + default: + ASSERT(0, "Unsupported hardware type") + break endswitch End diff --git a/Packages/MIES_Include.ipf b/Packages/MIES_Include.ipf index 4a072b5b86..d64cb4e480 100644 --- a/Packages/MIES_Include.ipf +++ b/Packages/MIES_Include.ipf @@ -51,6 +51,8 @@ Function ButtonProc_OpenMiesDocuUpdateNightly(STRUCT WMButtonAction &ba) : Butto case 2: // mouse up BrowseURL IP_DOCU_UPDATE_URL break + default: + break endswitch return 0 @@ -111,6 +113,8 @@ Function ButtonProc_DownloadNightly(STRUCT WMButtonAction &ba) : ButtonControl URLRequest/O/P=$path/FILE=filename url=url PathInfo/SHOW $path break + default: + break endswitch return 0 diff --git a/Packages/tests/Basic/UTF_Configuration.ipf b/Packages/tests/Basic/UTF_Configuration.ipf index 6ac396ca9d..0626464a7c 100644 --- a/Packages/tests/Basic/UTF_Configuration.ipf +++ b/Packages/tests/Basic/UTF_Configuration.ipf @@ -127,6 +127,8 @@ Function TCONF_CheckProc(STRUCT WMCheckboxAction &cba) : CheckBoxControl priorityFlag = RADIO3_CLICKED endif break + default: + break endswitch return 0 diff --git a/Packages/tests/Basic/UTF_PGCSetAndActivateControl.ipf b/Packages/tests/Basic/UTF_PGCSetAndActivateControl.ipf index 5a8bef8b1f..597571ce4a 100644 --- a/Packages/tests/Basic/UTF_PGCSetAndActivateControl.ipf +++ b/Packages/tests/Basic/UTF_PGCSetAndActivateControl.ipf @@ -72,6 +72,8 @@ Function PGCT_PopMenuProc(STRUCT WMPopupAction &pa) : PopupMenuControl string/G popStr = pa.popStr variable/G called = 1 break + default: + break endswitch return 0 @@ -84,6 +86,8 @@ Function PGCT_CheckProc(STRUCT WMCheckboxAction &cba) : CheckBoxControl variable/G checked = cba.checked variable/G called = 1 break + default: + break endswitch return 0 @@ -113,6 +117,8 @@ Function PGCT_SetVarProc(STRUCT WMSetVariableAction &sva) : SetVariableControl string/G sval = sva.sval variable/G called = 1 break + default: + break endswitch return 0 @@ -124,6 +130,8 @@ Function PGCT_ButtonProc(STRUCT WMButtonAction &ba) : ButtonControl case 2: // mouse up variable/G called = 1 break + default: + break endswitch return 0 @@ -136,6 +144,8 @@ Function PGCT_TabProc(STRUCT WMTabControlAction &tca) : TabControl variable/G tab = tca.tab variable/G called = 1 break + default: + break endswitch return 0 @@ -155,6 +165,8 @@ Function PGCT_ListBoxProc(STRUCT WMListboxAction &lba) : ListBoxControl CHECK_WAVE(lba.colorWave, NUMERIC_WAVE) CHECK_WAVE(lba.titleWave, TEXT_WAVE) break + default: + break endswitch return 0 diff --git a/Packages/tests/HardwareAnalysisFunctions/UTF_MultiPatchSeqDaScale.ipf b/Packages/tests/HardwareAnalysisFunctions/UTF_MultiPatchSeqDaScale.ipf index 0be3e454c7..575bb81a48 100644 --- a/Packages/tests/HardwareAnalysisFunctions/UTF_MultiPatchSeqDaScale.ipf +++ b/Packages/tests/HardwareAnalysisFunctions/UTF_MultiPatchSeqDaScale.ipf @@ -52,6 +52,9 @@ static Function/WAVE GetLBNSingleEntry_IGNORE(variable sweepNo, string device, s return val case SINGLE_SCI: return GetLastSettingSCI(numericalValues, sweepNo, key, headstage, UNKNOWN_MODE) + default: + INFO("Invalid mode %g", n0 = mode) + FAIL() endswitch End diff --git a/Packages/tests/HardwareAnalysisFunctions/UTF_MultiPatchSeqFastRheoEstimate.ipf b/Packages/tests/HardwareAnalysisFunctions/UTF_MultiPatchSeqFastRheoEstimate.ipf index 699772493e..3714cc8aca 100644 --- a/Packages/tests/HardwareAnalysisFunctions/UTF_MultiPatchSeqFastRheoEstimate.ipf +++ b/Packages/tests/HardwareAnalysisFunctions/UTF_MultiPatchSeqFastRheoEstimate.ipf @@ -48,6 +48,9 @@ static Function/WAVE GetLBNSingleEntry_IGNORE(string device, variable sweepNo, s return val case SINGLE_SCI: return GetLastSettingSCI(numericalValues, sweepNo, key, headstage, UNKNOWN_MODE) + default: + INFO("Invalid mode %g", n0 = mode) + FAIL() endswitch End diff --git a/Packages/tests/HardwareAnalysisFunctions/UTF_MultiPatchSeqSpikeControl.ipf b/Packages/tests/HardwareAnalysisFunctions/UTF_MultiPatchSeqSpikeControl.ipf index 99433c4930..945bf803b1 100644 --- a/Packages/tests/HardwareAnalysisFunctions/UTF_MultiPatchSeqSpikeControl.ipf +++ b/Packages/tests/HardwareAnalysisFunctions/UTF_MultiPatchSeqSpikeControl.ipf @@ -70,6 +70,9 @@ static Function/WAVE GetLBNSingleEntry_IGNORE(string device, variable sweepNo, s case INDEP_SINGLE_SCI: Make/D/N=1/FREE val = GetLastSettingIndepSCI(numericalValues, sweepNo, key, headstage, UNKNOWN_MODE) return val + default: + INFO("Invalid mode %g", n0 = mode) + FAIL() endswitch End diff --git a/Packages/tests/HardwareBasic/UTF_BasicHardwareTests.ipf b/Packages/tests/HardwareBasic/UTF_BasicHardwareTests.ipf index 351e40cb96..b54ea42a0c 100644 --- a/Packages/tests/HardwareBasic/UTF_BasicHardwareTests.ipf +++ b/Packages/tests/HardwareBasic/UTF_BasicHardwareTests.ipf @@ -457,6 +457,8 @@ static Function UnassociatedChannelsAndTTLs_REENTRY([string str]) case HARDWARE_NI_DAC: CHECK_EQUAL_VAR(DimSize(config, ROWS), 3 + 3 + 4) break + default: + FAIL() endswitch // check channel types @@ -656,6 +658,8 @@ static Function UnassociatedChannelsAndTTLs_REENTRY([string str]) CHECK(GrepString(stimWaveChecksums[INDEP_HEADSTAGE], ";[[:digit:]]+;;[[:digit:]]+;;[[:digit:]]+;[[:digit:]]+;;")) CHECK_EQUAL_TEXTWAVES(stimSetLengths, {"", "", "", "", "", "", "", "", ";158333;;154166;;168749;217499;;"}) break + default: + FAIL() endswitch // hardware agnostic TTL entries diff --git a/Packages/tests/HardwareBasic/UTF_DAEphys.ipf b/Packages/tests/HardwareBasic/UTF_DAEphys.ipf index f1dab1375a..702f675a75 100644 --- a/Packages/tests/HardwareBasic/UTF_DAEphys.ipf +++ b/Packages/tests/HardwareBasic/UTF_DAEphys.ipf @@ -161,6 +161,9 @@ Function CheckIfAllControlsReferStateWv([string str]) // undo PGC_SetAndActivateControl(str, ctrl, val = oldVal) break + default: + INFO("Control type = %d", n0 = V_Flag) + FAIL() endswitch endfor End @@ -220,6 +223,8 @@ Function CheckStartupSettings([string str]) SetPopupMenuIndex(unlockedDevice, ctrl, 1 + enoise(2, 2)) break + default: + FAIL() endswitch endfor diff --git a/Packages/tests/UserAnalysisFunctions.ipf b/Packages/tests/UserAnalysisFunctions.ipf index e9b1f5577c..491eca1d21 100644 --- a/Packages/tests/UserAnalysisFunctions.ipf +++ b/Packages/tests/UserAnalysisFunctions.ipf @@ -45,6 +45,8 @@ Function ValidFunc_V1(string device, variable eventType, WAVE DAQDataWave, varia case HARDWARE_NI_DAC: CHECK_WAVE(DAQDataWave, WAVE_WAVE) break + default: + ASSERT(0, "Unsupported hardware type") endswitch #ifdef TESTS_WITH_SUTTER_HARDWARE @@ -75,6 +77,8 @@ Function ValidFunc_V2(string device, variable eventType, WAVE DAQDataWave, varia case HARDWARE_NI_DAC: CHECK_WAVE(DAQDataWave, WAVE_WAVE) break + default: + ASSERT(0, "Unsupported hardware type") endswitch #ifdef TESTS_WITH_SUTTER_HARDWARE @@ -119,6 +123,8 @@ Function ValidMultHS_V1(string device, variable eventType, WAVE DAQDataWave, var case HARDWARE_SUTTER_DAC: CHECK_WAVE(DAQDataWave, WAVE_WAVE) break + default: + ASSERT(0, "Unsupported hardware type") endswitch #ifdef TESTS_WITH_SUTTER_HARDWARE @@ -400,6 +406,8 @@ Function ValidFunc_V3(string device, STRUCT AnalysisFunction_V3 &s) CHECK_EQUAL_VAR(s.sweepNo, anaFuncTracker[POST_SWEEP_EVENT] - 1) CHECK_WAVE(GetSweepWave(device, s.sweepNo), TEXT_WAVE) break + default: + ASSERT(0, "Unsupported hardware type") endswitch // the next sweep can not exist @@ -517,9 +525,9 @@ Function/S Params5_V3_GetHelp(string name) case "MyNum": ASSERT(0, "trying to bug out") break + default: + return "" endswitch - - return "" End Function/S Params5_V3_GetParams() @@ -857,6 +865,8 @@ Function ModifyStimSet(string device, STRUCT AnalysisFunction_V3 &s) ST_SetStimsetParameter("AnaFuncModStim_DA_0", "Duration", epochIndex = 0, var = var + 1) endif break + default: + break endswitch return 0 @@ -874,6 +884,8 @@ Function StopMidSweep_V3(string device, STRUCT AnalysisFunction_V3 &s) EP_AddUserEpoch(epochWave, XOP_CHANNEL_TYPE_DAC, DAC, 0, 1e9, "key=value") return ANALYSIS_FUNC_RET_EARLY_STOP + default: + break endswitch return 0 @@ -889,6 +901,8 @@ Function AddTooLargeUserEpoch_V3(string device, STRUCT AnalysisFunction_V3 &s) WAVE/T epochWave = GetEpochsWave(device) EP_AddUserEpoch(epochWave, XOP_CHANNEL_TYPE_DAC, DAC, 0, 1e9, "key=value") break + default: + break endswitch End @@ -925,7 +939,8 @@ Function ChangeTPSettings(string device, STRUCT AnalysisFunction_V3 &s) endif break default: - // do nothing + // do nothing + break endswitch End @@ -946,7 +961,8 @@ Function SetSweepFormula(string device, STRUCT AnalysisFunction_V3 &s) ReplaceNotebookText(sweepFormulaNB, code) break default: - // do nothing + // do nothing + break endswitch End @@ -966,6 +982,8 @@ Function BreakConfigWave(string device, STRUCT AnalysisFunction_V3 &s) return ANALYSIS_FUNC_RET_EARLY_STOP endif break + default: + break endswitch End @@ -1008,7 +1026,8 @@ Function EnableIndexing(string device, STRUCT AnalysisFunction_V3 &s) PGC_SetAndActivateControl(device, "Check_DataAcq_Indexing", val = CHECKBOX_SELECTED) break default: - // do nothing + // do nothing + break endswitch End @@ -1022,6 +1041,9 @@ Function AddUserEpochsForTPLike(string device, STRUCT AnalysisFunction_V3 &s) if(ret) return 1 endif + default: + // do nothing + break endswitch End @@ -1053,7 +1075,8 @@ Function DashboardAnaFunc(string device, STRUCT AnalysisFunction_V3 &s) ED_AddEntryToLabnotebook(device, key, setPassed, unit = LABNOTEBOOK_BINARY_UNIT, overrideSweepNo = s.sweepNo) break default: - // do nothing + // do nothing + break endswitch End diff --git a/tools/run-ipt.sh b/tools/run-ipt.sh index b876ea789c..35ccb09db7 100755 --- a/tools/run-ipt.sh +++ b/tools/run-ipt.sh @@ -28,6 +28,4 @@ while read -r line; do echo "files = \"$line\"" >> config.toml done < <(git ls-files ':(attr:ipt)') -echo "exclude = BugproneMissingSwitchDefaultCase" >> config.toml - (cd $top_level && $ipt --arg-file config.toml lint -i) From 72e1a1ae584708a8508bb33b2f92c3ac952102d5 Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Tue, 4 Feb 2025 21:25:16 +0100 Subject: [PATCH 7/8] tools/check-code.sh: Tighten function call in for loop check The new ipt linting rule ReadabilityMissingParenthesis creates code like for(i = oldSize; i < (arrayIndex + 1); i += 1) which is without the fix being complained at. --- tools/check-code.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/check-code.sh b/tools/check-code.sh index ce11e5e558..d91d150e61 100755 --- a/tools/check-code.sh +++ b/tools/check-code.sh @@ -151,7 +151,7 @@ then fi # U means non-greedy matching -matches=$(git grep $opts -e '^(?U)[[:space:]]*for\(.*\(.*\).*\)' --and -e ';' --and --not -e ':' --and --not -e '//[[:space:]]*NOLINT$' '*/MIES_*.ipf') +matches=$(git grep $opts -e '^(?U)[[:space:]]*for\(.*[a-z]+\(.*\).*\)' --and -e ';' --and --not -e ':' --and --not -e '//[[:space:]]*NOLINT$' '*/MIES_*.ipf') if [[ -n "$matches" ]] then From d9733d42a89b39a30c5c166f0903b0d0d652f72f Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Thu, 13 Feb 2025 19:07:51 +0100 Subject: [PATCH 8/8] Tests: Handle more control types explicitly The tests CheckIfAllControlsReferStateWv and CheckStartupSettings needed to learn that there is nothing to do for the group and the title box. --- Packages/tests/HardwareBasic/UTF_DAEphys.ipf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Packages/tests/HardwareBasic/UTF_DAEphys.ipf b/Packages/tests/HardwareBasic/UTF_DAEphys.ipf index 702f675a75..eecf9b836d 100644 --- a/Packages/tests/HardwareBasic/UTF_DAEphys.ipf +++ b/Packages/tests/HardwareBasic/UTF_DAEphys.ipf @@ -55,6 +55,8 @@ Function CheckIfAllControlsReferStateWv([string str]) case CONTROL_TYPE_LISTBOX: case CONTROL_TYPE_TAB: case CONTROL_TYPE_VALDISPLAY: + case CONTROL_TYPE_GROUPBOX: + case CONTROL_TYPE_TITLEBOX: // nothing to do break case CONTROL_TYPE_CHECKBOX: @@ -199,6 +201,8 @@ Function CheckStartupSettings([string str]) case CONTROL_TYPE_LISTBOX: case CONTROL_TYPE_TAB: case CONTROL_TYPE_VALDISPLAY: + case CONTROL_TYPE_GROUPBOX: + case CONTROL_TYPE_TITLEBOX: // nothing to do break case CONTROL_TYPE_CHECKBOX: