Skip to content

Commit

Permalink
Fixed conflicting function names.
Browse files Browse the repository at this point in the history
  • Loading branch information
drewsloan committed Jun 13, 2023
1 parent 86fe914 commit 59452da
Show file tree
Hide file tree
Showing 11 changed files with 30,155 additions and 185 deletions.
197 changes: 64 additions & 133 deletions MotoTrak_v1_27.m

Large diffs are not rendered by default.

10,034 changes: 10,034 additions & 0 deletions collated m-files/MotoTrak_v1_27_20221209_123740.m

Large diffs are not rendered by default.

10,036 changes: 10,036 additions & 0 deletions collated m-files/MotoTrak_v1_27_20221209_125108.m

Large diffs are not rendered by default.

9,943 changes: 9,943 additions & 0 deletions collated m-files/MotoTrak_v1_27_20221209_125838.m

Large diffs are not rendered by default.

Binary file not shown.
28 changes: 15 additions & 13 deletions compiled/MotoTrak_V1_Application_Compiler.prj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<deployment-project plugin="plugin.ezdeploy" plugin-version="1.0">
<configuration build-checksum="3555433941" file="G:\My Drive\Vulintus Software (Drew)\MotoTrak\MotoTrak Software\MotoTrak V1\compiled\MotoTrak_V1_Application_Compiler.prj" location="G:\My Drive\Vulintus Software (Drew)\MotoTrak\MotoTrak Software\MotoTrak V1\compiled" name="MotoTrak_V1_Application_Compiler" preferred-package-location="G:\My Drive\Vulintus Software (Drew)\MotoTrak\MotoTrak Software\MotoTrak V1\compiled\web_installer" preferred-package-type="package.type.exe" target="target.ezdeploy.standalone" target-name="Application Compiler">
<configuration build-checksum="3555433941" file="H:\My Drive\Vulintus Software (Drew)\MotoTrak\MotoTrak Software\MotoTrak V1\compiled\MotoTrak_V1_Application_Compiler.prj" location="H:\My Drive\Vulintus Software (Drew)\MotoTrak\MotoTrak Software\MotoTrak V1\compiled" name="MotoTrak_V1_Application_Compiler" preferred-package-location="G:\My Drive\Vulintus Software (Drew)\MotoTrak\MotoTrak Software\MotoTrak V1\compiled\web_installer" preferred-package-type="package.type.exe" target="target.ezdeploy.standalone" target-name="Application Compiler">
<param.appname>MotoTrak_V1</param.appname>
<param.icon>${PROJECT_ROOT}\MotoTrak_V1_Application_Compiler_resources\icon.ico</param.icon>
<param.icons>
Expand All @@ -15,12 +15,12 @@
<param.summary />
<param.description>Vulintus' MotoTrak is a complete, modular system designed for computer-supervised training and testing of forelimb movements in rodent models.

Updated 2022-04-29, 09:42 MST.</param.description>
<param.screenshot>G:\My Drive\Vulintus Software (Drew)\Vulintus Icons and Splash Screens\images\MotoTrak\mototrak_main_splash_screen.png</param.screenshot>
Updated 2022-12-09, 12:56 MST.</param.description>
<param.screenshot />
<param.guid />
<param.installpath.string>\Vulintus\MotoTrak\</param.installpath.string>
<param.installpath.combo>option.installpath.programfiles</param.installpath.combo>
<param.logo>G:\My Drive\Vulintus Software (Drew)\Vulintus Icons and Splash Screens\images\MotoTrak\mototrak_install_splash_screen.png</param.logo>
<param.logo />
<param.install.notes />
<param.target.install.notes />
<param.intermediate>${PROJECT_ROOT}\for_testing</param.intermediate>
Expand All @@ -34,7 +34,7 @@ Updated 2022-04-29, 09:42 MST.</param.description>
<param.web.mcr>true</param.web.mcr>
<param.package.mcr>false</param.package.mcr>
<param.no.mcr>false</param.no.mcr>
<param.web.mcr.name>MotoTrak_v1_27_Installer_win64_20220429</param.web.mcr.name>
<param.web.mcr.name>MotoTrak_v1_27_Installer_win64_20221209</param.web.mcr.name>
<param.package.mcr.name>MyAppInstaller_mcr</param.package.mcr.name>
<param.no.mcr.name>MyAppInstaller_app</param.no.mcr.name>
<param.windows.command.prompt>true</param.windows.command.prompt>
Expand All @@ -44,20 +44,22 @@ Updated 2022-04-29, 09:42 MST.</param.description>
<param.checkbox>false</param.checkbox>
<param.example />
<param.help.text>Syntax
MotoTrak_Startup -?
MotoTrak_Startup varargin
-?

Input Arguments
-? print help on how to use the application
varargin input arguments
input arguments
Description
Vulintus' MotoTrak is a complete, modular system designed for computer-supervised training and testing of forelimb movements in rodent models.

Updated 2022-04-29, 09:42 MST.</param.help.text>
Updated 2022-12-09, 12:56 MST.</param.help.text>
<unset>
<param.authnamewatermark />
<param.summary />
<param.screenshot />
<param.guid />
<param.installpath.combo />
<param.logo />
<param.install.notes />
<param.target.install.notes />
<param.enable.clean.build />
Expand Down Expand Up @@ -164,13 +166,13 @@ Updated 2022-04-29, 09:42 MST.</param.help.text>
<file>G:\My Drive\Vulintus Software (Drew)\Vulintus Common MATLAB Scripts\Vulintus Common Toolbox\Vulintus_Write_TSV_File.m</file>
</fileset.depfun>
<build-deliverables>
<file location="${PROJECT_ROOT}\for_testing" name="MotoTrak_V1.exe" optional="false">G:\My Drive\Vulintus Software (Drew)\MotoTrak\MotoTrak Software\MotoTrak V1\compiled\for_testing\MotoTrak_V1.exe</file>
<file location="${PROJECT_ROOT}\for_testing" name="splash.png" optional="false">G:\My Drive\Vulintus Software (Drew)\MotoTrak\MotoTrak Software\MotoTrak V1\compiled\for_testing\splash.png</file>
<file location="${PROJECT_ROOT}\for_testing" name="readme.txt" optional="true">G:\My Drive\Vulintus Software (Drew)\MotoTrak\MotoTrak Software\MotoTrak V1\compiled\for_testing\readme.txt</file>
<file location="${PROJECT_ROOT}\for_testing" name="splash.png" optional="false">H:\My Drive\Vulintus Software (Drew)\MotoTrak\MotoTrak Software\MotoTrak V1\compiled\for_testing\splash.png</file>
<file location="${PROJECT_ROOT}\for_testing" name="MotoTrak_V1.exe" optional="false">H:\My Drive\Vulintus Software (Drew)\MotoTrak\MotoTrak Software\MotoTrak V1\compiled\for_testing\MotoTrak_V1.exe</file>
<file location="${PROJECT_ROOT}\for_testing" name="readme.txt" optional="true">H:\My Drive\Vulintus Software (Drew)\MotoTrak\MotoTrak Software\MotoTrak V1\compiled\for_testing\readme.txt</file>
</build-deliverables>
<workflow />
<matlab>
<root>C:\Program Files\MATLAB\R2021a</root>
<root>C:\Program Files\MATLAB\R2022b</root>
<toolboxes />
</matlab>
<platform>
Expand Down
12 changes: 11 additions & 1 deletion src/MotoTrak_Controller_V2pX_Serial_Functions_Deprecated.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
serialcon = moto.serialcon; %Grab the handle for the serial connection.
serialcon.Timeout = 2; %Set the timeout for serial read/write operations, in seconds.
serialcon.UserData = [2, 1, 2, 0, 0, 0, 0, 0]; %Set the default number of inputs and the default stream order.
serialcon.Userdata(end) = 1; %Use the last element of the UserData as a debugging flag.
serialcon.Userdata(end) = 0; %Use the last element of the UserData as a debugging flag.

if ~isfield(moto,'version') %If no version is yet specified...
pause(0.1); %Pause for 100 milliseconds.
Expand Down Expand Up @@ -62,6 +62,7 @@
@(int)v2p0_write_eeprom_uint16_deprecated(serialcon,...
s,s.EEPROM_BOOTH_NUM,int); %Set the function for setting the booth number saved on the controller.
moto.close_serialcon = @()v2p0_close_serialcon_deprecated(serialcon); %Set the function for closing and deleting the serial connection.
moto.debug_mode = @()v2p0_set_debug_mode(serialcon); %Set the function for enabling/disabling debug messages.

%Motor manipulandi functions.
moto.device = ...
Expand Down Expand Up @@ -686,6 +687,15 @@ function v2p0_close_serialcon_deprecated(serialcon)
% serialcon.UserData(2) = serialcon.UserData(2) + 1; %Increment the line counter.


%% This function enables/disables debugging messages.
function v2p0_set_debug_mode(serialcon,debug_val)
if debug_val == 0 %If debug messages are to be turned off...
serialcon.Userdata(end) = 0; %Set the debugging flag to 0.
else %Otherwise...
serialcon.Userdata(end) = 1; %Set the debugging flag to 1.
end


%% This function prints debug message when the debugging flag is true.
function Debug_Message(cmd,output)
fprintf(1,'%s: ',datestr(now,'HH:MM:SS.FFF')); %Print a timestamped to the command line.
Expand Down
27 changes: 16 additions & 11 deletions src/MotoTrak_Lever_Calibration.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ function MotoTrak_Lever_Calibration(varargin)
% UPDATE LOG:
% 01/04/2019 - Drew Sloan - Function first created, adapted from
% MotoTrak_Pull_Calibration.m.
% 12/09/2022 - Drew Sloan - Renamed the "Calibration_Loop" subfunction to
% "MotoTrak_Lever_Calibration_Loop" to avoid conflicts when collating
% MotoTrak scripts.
%

global run %Create a global run variable.
Expand Down Expand Up @@ -51,8 +54,10 @@ function MotoTrak_Lever_Calibration(varargin)
set(h.editbooth,'string',num2str(h.booth)); %Show the booth number on the GUI.

%Set the properties of various pushbuttons.
set(h.ratradio,'callback',{@RadioClick,h.mouseradio}); %Set the callback for the rat lever select radio button.
set(h.mouseradio,'callback',{@RadioClick,h.ratradio}); %Set the callback for the mouse lever select radio button.
set(h.ratradio,'callback',...
{@MotoTrak_Lever_Calibration_RadioClick,h.mouseradio}); %Set the callback for the rat lever select radio button.
set(h.mouseradio,'callback',...
{@MotoTrak_Lever_Calibration_RadioClick,h.ratradio}); %Set the callback for the mouse lever select radio button.
set(h.recordbutton,'callback','global run; run = 3.1;'); %Set the callback for the calibration measuring button.
set(h.savebutton,'callback','global run; run = 3.5;'); %Set the callback for the calibration save button.
set(h.mainfig,'CloseRequestFcn','global run; run = 1;'); %Set the close request function for the main figure.
Expand All @@ -76,9 +81,9 @@ function MotoTrak_Lever_Calibration(varargin)
h.slope = 1; %Set the slope to 1.
end
set(h.editslope,'string',num2str(h.slope,'%1.3f'),...
'callback',@EditSlope); %Show the slope in the slope editbox.
'callback',@MotoTrak_Lever_Calibration_EditSlope); %Show the slope in the slope editbox.
set(h.editbaseline,'string',num2str(h.baseline,'%1.0f'),...
'callback',@EditBaseline); %Show the baseline in the baseline editbox.
'callback',@MotoTrak_Lever_Calibration_EditBaseline); %Show the baseline in the baseline editbox.
if h.lever_range == 5 %If the lever range is 5 degrees...
set(h.ratradio,'value',0); %Set the rat radiobutton value to zero.
set(h.mouseradio,'value',1); %Set the mouse radiobutton value to one.
Expand All @@ -87,14 +92,14 @@ function MotoTrak_Lever_Calibration(varargin)
set(h.mouseradio,'value',0); %Set the mouse radiobutton value to zero.
end

Calibration_Loop(h); %Run the calibration testing/setting loop.
MotoTrak_Lever_Calibration_Loop(h); %Run the calibration testing/setting loop.


%% This subfunction loops to show the streaming lever press signal.
function Calibration_Loop(h)
function MotoTrak_Lever_Calibration_Loop(h)
global run %Create a global run variable.
signal = zeros(500,1); %Create a signal buffer.
h = MakePlot(h,signal); %Call the subfunction to create the plots.
h = MotoTrak_Lever_Calibration_MakePlot(h,signal); %Call the subfunction to create the plots.
temp = get(h.ratradio,'value'); %Grab the current value of the rat radio button.
if temp == 1 %If the rat radio button is selected...
minmax_y = [0, 11]; %Set the maximum value to 11 degrees.
Expand Down Expand Up @@ -312,7 +317,7 @@ function Calibration_Loop(h)


%% This subfunction creates the plots in the calibration and streaming axes.
function h = MakePlot(h,buffer)
function h = MotoTrak_Lever_Calibration_MakePlot(h,buffer)
h.stream_plot = area(1:length(buffer),buffer,'linewidth',2,...
'facecolor',[0.5 0.5 1],'parent',h.stream_ax); %Create an areaseries plot in the stream axes.
% set(h.stream_ax,'ylim',[0,800],'xlim',[1,length(buffer)]); %Set the x- and y-axis limits of the stream axes.
Expand All @@ -321,14 +326,14 @@ function Calibration_Loop(h)


%% This function executes when the user presses either of the rat/mouse lever radiobuttons.
function RadioClick(hObject,~,disable_h)
function MotoTrak_Lever_Calibration_RadioClick(~,~,disable_h)
global run %Create a global run variable.
set(disable_h,'value',0); %Uncheck the opposite radiobutton.
run = 3.3; %Set the run variable to 3.3 to reset the y-limits on the streaming plot.


%% This function executes when the user modifies the text in the slope editbox.
function EditSlope(hObject,~)
function MotoTrak_Lever_Calibration_EditSlope(hObject,~)
global run %Create a global run variable.
h = guidata(hObject); %Grab the handles structure from the GUI.
temp = get(hObject,'string'); %Grab the string from the slope editbox.
Expand All @@ -342,7 +347,7 @@ function EditSlope(hObject,~)


%% This function executes when the user modifies the text in the baseline editbox.
function EditBaseline(hObject,~)
function MotoTrak_Lever_Calibration_EditBaseline(hObject,~)
global run %Create a global run variable.
h = guidata(hObject); %Grab the handles structure from the GUI.
temp = get(hObject,'string'); %Grab the string from the baseline editbox.
Expand Down
Loading

0 comments on commit 59452da

Please sign in to comment.