Skip to content

Commit

Permalink
Pressure Control: Disable manual controls when user access is enabled
Browse files Browse the repository at this point in the history
Otherwise we can get an assertion as the manual pressure pulse interferes.

Close #2124
  • Loading branch information
t-b committed Jun 6, 2024
1 parent 1d8c20b commit f33927c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Packages/MIES/MIES_DAEphys.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -4452,11 +4452,23 @@ Function DAP_CheckProc_Settings_PUser(cba) : CheckBoxControl
STRUCT WMCheckboxAction &cba

variable headstage
string ctrls

switch(cba.eventCode)
case 2: // mouse up
DAP_AbortIfUnlocked(cba.win)
DAG_Update(cba.win, cba.ctrlName, val = cba.checked)

if(!cmpstr(cba.ctrlName, "check_DataACq_Pressure_User"))
ctrls = "button_DataAcq_SSSetPressureMan;setvar_DataAcq_SSPressure;button_DataAcq_PPSetPressureMan;setvar_DataAcq_PPPressure;setvar_DataAcq_PPDuration;check_DataAcq_ManPressureAll"

if(cba.checked)
DisableControls(cba.win, ctrls)
else
EnableControls(cba.win, ctrls)
endif
endif

WAVE pressureDataWv = P_GetPressureDataWaveRef(cba.win)
P_RunP_ControlIfTPOFF(cba.win)
headstage = PressureDataWv[0][%UserSelectedHeadStage]
Expand Down

0 comments on commit f33927c

Please sign in to comment.