Skip to content

Commit e0a7347

Browse files
committed
- Removed support for PhoneHome installation data collection program
- Liquid Calibration: Fixed UI buttons on MATLAB r2025a in dark and light modes - Suppressed datestamp on startup (to be re-enabled selectively under a user-enabled verbose mode in a future release)
1 parent 066c3e2 commit e0a7347

File tree

7 files changed

+12
-191
lines changed

7 files changed

+12
-191
lines changed

Functions/+BpodLib/+calibration/+liquid/LiquidCalibratorUI.m

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,11 @@
111111
'Tag', 'BpodLiquidCal-Main');
112112
ha = axes('units','normalized', 'position',[0 0 1 1]);
113113
uistack(ha,'bottom');
114-
BG = imread('RewardCalMain.bmp');
115-
image(BG); axis off;
114+
bgcolor = [0.2627 0.2627 0.2627];
115+
set(obj.GUIHandles.MainFig, 'Color', bgcolor);
116+
% BG = imread('RewardCalMain.bmp');
117+
% image(BG);
118+
axis off;
116119
obj.GUIHandles.ValveSelector = uicontrol('Style', 'listbox',...
117120
'String', ValveListboxString, 'Position', [20 55 100 210], 'FontWeight', 'bold',...
118121
'FontUnits', 'Pixels', 'FontSize', 20, 'Callback', @(src,event) obj.DisplayValve(src, event));
@@ -131,9 +134,12 @@
131134
obj.GUIHandles.nPulsesEdit = uicontrol('Style', 'edit',...
132135
'String', '100', 'Position', [360 15 80 30], 'FontSize', 14,...
133136
'TooltipString', 'Number of pulses per weight measurement (100-500)');
134-
137+
obj.GUIHandles.nPulsesLabel = uicontrol('Style', 'text',...
138+
'String', '#Pulses to measure', 'Position', [65 15 300 30], 'FontSize', 18,...
139+
'BackgroundColor', 'none', 'ForegroundColor', 'white', 'FontName', 'FixedWidth');
135140
% -- Top bar
136-
styleargs = {'BackgroundColor', 'none', 'ForegroundColor', 'white', 'FontName', 'FixedWidth', 'FontWeight', 'bold', 'FontSize', 17};
141+
styleargs = {'BackgroundColor', 'none', 'ForegroundColor', 'white',...
142+
'FontName', 'FixedWidth', 'FontWeight', 'bold', 'FontSize', 17};
137143
obj.GUIHandles.SuggestPointsButton = uicontrol('Style', 'pushbutton',...
138144
'String', 'Suggest Points', styleargs{:},...
139145
'Position', [20 300 200 50], 'Callback', @(src,event) obj.SuggestPoints(src,event));

Functions/+BpodLib/+utils/+log/startupMessage.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
%}
2424

25-
message = sprintf('** Starting Bpod Console v%s **\nInitialized: %s', BpodSoftwareVersion_Semantic, BpodLib.utils.isotime());
25+
%message = sprintf('** Starting Bpod Console v%s **\nInitialized: %s', BpodSoftwareVersion_Semantic, BpodLib.utils.isotime());
26+
message = sprintf('** Starting Bpod Console v%s **', BpodSoftwareVersion_Semantic);
2627
% todo: add datetime and git head

Functions/@BpodObject/BpodObject.m

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -565,33 +565,6 @@ function StopModuleRelay(obj, varargin)
565565
obj.FlexIOConfig = config;
566566
end
567567

568-
function PhoneHomeOpt_In_Out(obj)
569-
% Launches a GUI for registration with the Bpod Phone Home program
570-
obj.GUIHandles.BpodPhoneHomeFig = figure('Position', [550 180 400 350],...
571-
'name','Bpod Phone Home','numbertitle','off', 'MenuBar', 'none', 'Resize', 'off');
572-
ha = axes('units','normalized', 'position',[0 0 1 1]);
573-
uistack(ha,'bottom');
574-
bg = imread('PhoneHomeBG.bmp');
575-
image(bg); axis off; drawnow;
576-
text(20, 40,'Bpod PhoneHome Program', 'FontName', 'Courier New', 'FontSize', 16, 'Color', [1 1 1]);
577-
Pos = 80; Step = 25;
578-
text(20, Pos,'Bpod PhoneHome is an opt-in', 'FontName', 'Courier New', 'FontSize', 12, 'Color', [1 1 1]); Pos = Pos + Step;
579-
text(20, Pos,'program to send anonymous data', 'FontName', 'Courier New', 'FontSize', 12, 'Color', [1 1 1]); Pos = Pos + Step;
580-
text(20, Pos,'about your Bpod software setup', 'FontName', 'Courier New', 'FontSize', 12, 'Color', [1 1 1]); Pos = Pos + Step;
581-
text(20, Pos,'to Sanworks LLC on Bpod start.', 'FontName', 'Courier New', 'FontSize', 12, 'Color', [1 1 1]); Pos = Pos + Step;
582-
text(20, Pos,'This will help us understand', 'FontName', 'Courier New', 'FontSize', 12, 'Color', [1 1 1]); Pos = Pos + Step;
583-
text(20, Pos,'which MATLAB versions and OS', 'FontName', 'Courier New', 'FontSize', 12, 'Color', [1 1 1]); Pos = Pos + Step;
584-
text(20, Pos,'flavors typically run Bpod', 'FontName', 'Courier New', 'FontSize', 12, 'Color', [1 1 1]); Pos = Pos + Step;
585-
text(20, Pos,'+ how many rigs are out there.', 'FontName', 'Courier New', 'FontSize', 12, 'Color', [1 1 1]); Pos = Pos + Step+5;
586-
text(140, Pos,'See BpodPhoneHome.m', 'FontName', 'Courier New', 'FontSize', 12, 'Color', [1 1 1]); Pos = Pos + Step;
587-
BpodSystem.GUIHandles.PhoneHomeAcceptBtn = uicontrol('Style', 'pushbutton', 'String', 'Ok',...
588-
'Position', [130 15 120 40], 'Callback', @(h,e)obj.phoneHomeRegister(1),...
589-
'FontSize', 12,'Backgroundcolor',[0.29 0.29 0.43],'Foregroundcolor',[0.9 0.9 0.9], 'FontName', 'Courier New');
590-
BpodSystem.GUIHandles.PhoneHomeAcceptBtn = uicontrol('Style', 'pushbutton', 'String', 'Decline',...
591-
'Position', [260 15 120 40], 'Callback', @(h,e)obj.phoneHomeRegister(0),...
592-
'FontSize', 12,'Backgroundcolor',[0.29 0.29 0.43],'Foregroundcolor',[0.9 0.9 0.9], 'FontName', 'Courier New');
593-
end
594-
595568
function onlineStatus = check4Internet(obj)
596569
% Check for Internet connectivity
597570
% Returns: onlineStatus (double) = 1 if online, 0 if not
@@ -625,23 +598,6 @@ function delete(obj)
625598
end
626599

627600
methods (Access = private)
628-
function phoneHomeRegister(obj, state)
629-
% Callback from pushbutton of PhoneHomeOpt_In_Out() GUI
630-
% Registers user with the Bpod Phone Home program
631-
if ~isfield(obj.SystemSettings, 'PhoneHomeRigID')
632-
obj.SystemSettings.PhoneHomeRigID = char(floor(rand(1,16)*25)+65);
633-
end
634-
switch state
635-
case 0
636-
obj.SystemSettings.PhoneHome = 0;
637-
obj.BpodPhoneHome('Opt_Out');
638-
case 1
639-
obj.SystemSettings.PhoneHome = 1;
640-
obj.BpodPhoneHome(0);
641-
end
642-
obj.SaveSettings;
643-
close(obj.GUIHandles.BpodPhoneHomeFig);
644-
end
645601

646602
function SwitchPanels(obj, panel)
647603
% Callback triggered when switching between module tabs on the Bpod Console GUI

Functions/@BpodObject/BpodPhoneHome.m

Lines changed: 0 additions & 119 deletions
This file was deleted.

Functions/@BpodObject/InitializeGUI.m

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -302,16 +302,5 @@
302302
ver = BpodSoftwareVersion_Semantic;
303303
text(10, 376,['Console v' ver], 'FontName', fontName, 'FontSize', vsm, 'Color', [0.8 0.8 0.8]);
304304
drawnow;
305-
if obj.IsOnline == 1
306-
if isfield(obj.SystemSettings, 'PhoneHome')
307-
if obj.SystemSettings.PhoneHome == 1 % Note: You are opted out by default
308-
%obj.BpodPhoneHome(0);
309-
% Sends installation metadata to the Sanworks secure server on load (see comments in BpodPhoneHome fcn below)
310-
% Disabled until server migration. -JS July 2018
311-
end
312-
else
313-
obj.PhoneHomeOpt_In_Out();
314-
end
315-
end
316305
set(obj.GUIHandles.MainFig, 'HandleVisibility', 'callback');
317306
end

Functions/Launch manager/LaunchManager.m

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -821,12 +821,6 @@ function launch_protocol(a,b)
821821
addpath(protocolFolderPath);
822822
set(BpodSystem.GUIHandles.RunButton, 'cdata', BpodSystem.GUIData.PauseButton, 'TooltipString', 'Press to pause session');
823823

824-
% % Send metadata to Bpod Phone Home program (disabled pending a more stable server)
825-
% isOnline = BpodSystem.check4Internet();
826-
% if (isOnline == 1) && (BpodSystem.SystemSettings.PhoneHome == 1)
827-
% BpodSystem.BpodPhoneHome(1);
828-
% end
829-
830824
if BpodSystem.Status.AnalogViewer
831825
set(BpodSystem.GUIHandles.RecordButton, 'Enable', 'off')
832826
end

Functions/Launch manager/RunProtocol.m

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,6 @@ function RunProtocol(Opstring, varargin)
177177

178178
% Set console GUI run button
179179
set(BpodSystem.GUIHandles.RunButton, 'cdata', BpodSystem.GUIData.PauseButton, 'TooltipString', 'Press to pause session');
180-
181-
% Send metadata to Bpod Phone Home program (disabled pending a more stable server)
182-
% isOnline = BpodSystem.check4Internet();
183-
% if (isOnline == 1) && (BpodSystem.SystemSettings.PhoneHome == 1)
184-
%BpodSystem.BpodPhoneHome(1); % Disabled until server migration. -JS July 2018
185-
% end
186180

187181
% Disable analog viewer record button (fixed for session)
188182
if BpodSystem.Status.AnalogViewer

0 commit comments

Comments
 (0)