function varargout = Form_dispaly(varargin)
% FORM_DISPALY MATLAB code for Form_dispaly.fig
%      FORM_DISPALY, by itself, creates a new FORM_DISPALY or raises the existing
%      singleton*.
%
%      H = FORM_DISPALY returns the handle to a new FORM_DISPALY or the handle to
%      the existing singleton*.
%
%      FORM_DISPALY('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in FORM_DISPALY.M with the given input arguments.
%
%      FORM_DISPALY('Property','Value',...) creates a new FORM_DISPALY or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before Form_dispaly_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to Form_dispaly_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help Form_dispaly

% Last Modified by GUIDE v2.5 08-Apr-2013 02:36:52

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @Form_dispaly_OpeningFcn, ...
                   'gui_OutputFcn',  @Form_dispaly_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before Form_dispaly is made visible.
function Form_dispaly_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to Form_dispaly (see VARARGIN)

% Choose default command line output for Form_dispaly
handles.output = hObject;

handles.main_handles = varargin{1};
handles.dis = handles.main_handles.dis;
handles.main_handle = varargin{2};
% Update handles structure
guidata(hObject, handles);

% UIWAIT makes Form_dispaly wait for user response (see UIRESUME)
% uiwait(handles.figure1);
reload(handles);

% --- Outputs from this function are returned to the command line.
function varargout = Form_dispaly_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;


% --- Executes on button press in checkbox_ERR.
function checkbox_ERR_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_ERR (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_ERR
if(get(handles.checkbox_ERR, 'Value') == 0)
    handles.dis.ERR = false;
else
    handles.dis.ERR = true;
end

switch (get(handles.checkbox_ERR, 'Value'))
    case 0
        set(handles.checkbox_errCRC,'Enable', 'off');
        set(handles.checkbox_errBlokCRC,'Enable', 'off');
        set(handles.checkbox__err,'Enable', 'off');
        set(handles.checkbox_nErr,'Enable', 'off');
    case 1
        set(handles.checkbox_errCRC,'Enable', 'on');
        set(handles.checkbox_errBlokCRC,'Enable', 'on');
        set(handles.checkbox__err,'Enable', 'on');
        set(handles.checkbox_nErr,'Enable', 'on');
end

% --- Executes on button press in checkbox_errCRC.
function checkbox_errCRC_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_errCRC (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_errCRC
if(get(handles.checkbox_errCRC, 'Value') == 0)
    handles.dis.errCRC = false;
else
    handles.dis.errCRC = true;
end

% --- Executes on button press in checkbox__err.
function checkbox__err_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox__err (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox__err
if(get(handles.checkbox__err, 'Value') == 0)
    handles.dis.err = false;
else
    handles.dis.err = true;
end

% --- Executes on button press in checkbox_nErr.
function checkbox_nErr_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_nErr (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_nErr
if(get(handles.checkbox_nErr, 'Value') == 0)
    handles.dis.nErr = false;
else
    handles.dis.nErr = true;
end

% --- Executes on button press in checkbox_errBlokCRC.
function checkbox_errBlokCRC_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_errBlokCRC (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_errBlokCRC
if(get(handles.checkbox_errBlokCRC, 'Value') == 0)
    handles.dis.errBlokCRC = false;
else
    handles.dis.errBlokCRC = true;
end

% --- Executes on button press in checkbox_STATUS.
function checkbox_STATUS_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_STATUS (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_STATUS
if(get(handles.checkbox_STATUS, 'Value') == 0)
    handles.dis.STATUS = false;
else
    handles.dis.STATUS = true;
end

switch (get(handles.checkbox_STATUS, 'Value'))
    case 0
        set(handles.checkbox_dataMAC,'Enable', 'off');
        set(handles.checkbox_addCRC,'Enable', 'off');
        set(handles.checkbox_segment,'Enable', 'off');
        set(handles.checkbox_chCode,'Enable', 'off');
        set(handles.checkbox_rateMatch,'Enable', 'off');
        set(handles.checkbox_dscrambling,'Enable', 'off');
        set(handles.checkbox_dmodulace,'Enable', 'off');
        set(handles.checkbox_dmapper,'Enable', 'off');
        set(handles.checkbox_dOFDM,'Enable', 'off');
        set(handles.checkbox_rad,'Enable', 'off');
        set(handles.checkbox_ddeOFDM,'Enable', 'off');
        set(handles.checkbox_vyrk,'Enable', 'off');
        set(handles.checkbox_ddemapper,'Enable', 'off');
        set(handles.checkbox_ddemod,'Enable', 'off');
        set(handles.checkbox_ddescram,'Enable', 'off');
        set(handles.checkbox_chdeCode,'Enable', 'off');
        set(handles.checkbox_desegment,'Enable', 'off');
        set(handles.checkbox_remCRC,'Enable', 'off');
    case 1
        set(handles.checkbox_dataMAC,'Enable', 'on');
        set(handles.checkbox_addCRC,'Enable', 'on');
        set(handles.checkbox_segment,'Enable', 'on');
        set(handles.checkbox_chCode,'Enable', 'on');
        set(handles.checkbox_rateMatch,'Enable', 'on');
        set(handles.checkbox_dscrambling,'Enable', 'on');
        set(handles.checkbox_dmodulace,'Enable', 'on');
        set(handles.checkbox_dmapper,'Enable', 'on');
        set(handles.checkbox_dOFDM,'Enable', 'on');
        set(handles.checkbox_rad,'Enable', 'on');
        set(handles.checkbox_ddeOFDM,'Enable', 'on');
        set(handles.checkbox_vyrk,'Enable', 'on');
        set(handles.checkbox_ddemapper,'Enable', 'on');
        set(handles.checkbox_ddemod,'Enable', 'on');
        set(handles.checkbox_ddescram,'Enable', 'on');
        set(handles.checkbox_chdeCode,'Enable', 'on');
        set(handles.checkbox_desegment,'Enable', 'on');
        set(handles.checkbox_remCRC,'Enable', 'on');
end

% --- Executes on button press in checkbox_dataMAC.
function checkbox_dataMAC_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_dataMAC (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_dataMAC
if(get(handles.checkbox_dataMAC, 'Value') == 0)
    handles.dis.dataMAC = false;
else
    handles.dis.dataMAC = true;
end

% --- Executes on button press in checkbox_addCRC.
function checkbox_addCRC_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_addCRC (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_addCRC
if(get(handles.checkbox_addCRC, 'Value') == 0)
    handles.dis.addCRC = false;
else
    handles.dis.addCRC = true;
end

% --- Executes on button press in checkbox_segment.
function checkbox_segment_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_segment (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_segment
if(get(handles.checkbox_segment, 'Value') == 0)
    handles.dis.segment = false;
else
    handles.dis.segment = true;
end

% --- Executes on button press in checkbox_chCode.
function checkbox_chCode_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_chCode (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_chCode
if(get(handles.checkbox_chCode, 'Value') == 0)
    handles.dis.chCode = false;
else
    handles.dis.chCode = true;
end

% --- Executes on button press in checkbox_rateMatch.
function checkbox_rateMatch_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_rateMatch (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_rateMatch
if(get(handles.checkbox_rateMatch, 'Value') == 0)
    handles.dis.rateMatch = false;
else
    handles.dis.rateMatch = true;
end

% --- Executes on button press in checkbox_dscrambling.
function checkbox_dscrambling_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_dscrambling (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_dscrambling
if(get(handles.checkbox_dscrambling, 'Value') == 0)
    handles.dis.dscrambling = false;
else
    handles.dis.dscrambling = true;
end

% --- Executes on button press in checkbox_dmodulace.
function checkbox_dmodulace_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_dmodulace (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_dmodulace
if(get(handles.checkbox_dmodulace, 'Value') == 0)
    handles.dis.dmodulace = false;
else
    handles.dis.dmodulace = true;
end

% --- Executes on button press in checkbox_dmapper.
function checkbox_dmapper_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_dmapper (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_dmapper
if(get(handles.checkbox_dmapper, 'Value') == 0)
    handles.dis.dmapper = false;
else
    handles.dis.dmapper = true;
end

% --- Executes on button press in checkbox_dOFDM.
function checkbox_dOFDM_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_dOFDM (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_dOFDM
if(get(handles.checkbox_dOFDM, 'Value') == 0)
    handles.dis.dOFDM = false;
else
    handles.dis.dOFDM = true;
end

% --- Executes on button press in checkbox_ddeOFDM.
function checkbox_ddeOFDM_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_ddeOFDM (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_ddeOFDM
if(get(handles.checkbox_ddeOFDM, 'Value') == 0)
    handles.dis.ddeOFDM = false;
else
    handles.dis.ddeOFDM = true;
end

% --- Executes on button press in checkbox_ddemapper.
function checkbox_ddemapper_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_ddemapper (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_ddemapper
if(get(handles.checkbox_ddemapper, 'Value') == 0)
    handles.dis.ddemapper = false;
else
    handles.dis.ddemapper = true;
end

% --- Executes on button press in checkbox_ddemod.
function checkbox_ddemod_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_ddemod (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_ddemod
if(get(handles.checkbox_ddemod, 'Value') == 0)
    handles.dis.ddemod = false;
else
    handles.dis.ddemod = true;
end

% --- Executes on button press in checkbox_ddescram.
function checkbox_ddescram_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_ddescram (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_ddescram
if(get(handles.checkbox_ddescram, 'Value') == 0)
    handles.dis.ddescram = false;
else
    handles.dis.ddescram = true;
end

% --- Executes on button press in checkbox_chdeCode.
function checkbox_chdeCode_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_chdeCode (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_chdeCode
if(get(handles.checkbox_chdeCode, 'Value') == 0)
    handles.dis.chdeCode = false;
else
    handles.dis.chdeCode = true;
end

% --- Executes on button press in checkbox_desegment.
function checkbox_desegment_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_desegment (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_desegment
if(get(handles.checkbox_desegment, 'Value') == 0)
    handles.dis.desegment = false;
else
    handles.dis.desegment = true;
end

% --- Executes on button press in checkbox_remCRC.
function checkbox_remCRC_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_remCRC (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_remCRC
if(get(handles.checkbox_remCRC, 'Value') == 0)
    handles.dis.remCRC = false;
else
    handles.dis.remCRC = true;
end

% --- Executes on button press in checkbox_DETAIL.
function checkbox_DETAIL_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_DETAIL (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_DETAIL
if(get(handles.checkbox_DETAIL, 'Value') == 0)
    handles.dis.DETAIL = false;
else
    handles.dis.DETAIL = true;
end

switch (get(handles.checkbox_DETAIL, 'Value'))
    case 0
        set(handles.checkbox_dataMACd,'Enable', 'off');
        set(handles.checkbox_addCRCd,'Enable', 'off');
        set(handles.checkbox_segmentd,'Enable', 'off');
        set(handles.checkbox_chCoded,'Enable', 'off');
        set(handles.checkbox_rateMatchd,'Enable', 'off');
        set(handles.checkbox_dscramblingd,'Enable', 'off');
        set(handles.checkbox_dmodulaced,'Enable', 'off');
        set(handles.checkbox_dmapperd,'Enable', 'off');
        set(handles.checkbox_dOFDMd,'Enable', 'off');
        set(handles.checkbox_radd,'Enable', 'off');
        set(handles.checkbox_ddeOFDMd,'Enable', 'off');
        set(handles.checkbox_vyrkd,'Enable', 'off');
        set(handles.checkbox_ddemapperd,'Enable', 'off');
        set(handles.checkbox_ddemodd,'Enable', 'off');
        set(handles.checkbox_ddescramd,'Enable', 'off');
        set(handles.checkbox_chdeCoded,'Enable', 'off');
        set(handles.checkbox_desegmentd,'Enable', 'off');
        set(handles.checkbox_remCRCd,'Enable', 'off');
    case 1
        set(handles.checkbox_dataMACd,'Enable', 'on');
        set(handles.checkbox_addCRCd,'Enable', 'on');
        set(handles.checkbox_segmentd,'Enable', 'on');
        set(handles.checkbox_chCoded,'Enable', 'on');
        set(handles.checkbox_rateMatchd,'Enable', 'on');
        set(handles.checkbox_dscramblingd,'Enable', 'on');
        set(handles.checkbox_dmodulaced,'Enable', 'on');
        set(handles.checkbox_dmapperd,'Enable', 'on');
        set(handles.checkbox_dOFDMd,'Enable', 'on');
        set(handles.checkbox_radd,'Enable', 'on');
        set(handles.checkbox_ddeOFDMd,'Enable', 'on');
        set(handles.checkbox_vyrkd,'Enable', 'on');
        set(handles.checkbox_ddemapperd,'Enable', 'on');
        set(handles.checkbox_ddemodd,'Enable', 'on');
        set(handles.checkbox_ddescramd,'Enable', 'on');
        set(handles.checkbox_chdeCoded,'Enable', 'on');
        set(handles.checkbox_desegmentd,'Enable', 'on');
        set(handles.checkbox_remCRCd,'Enable', 'on');
end

% --- Executes on button press in checkbox_dataMACd.
function checkbox_dataMACd_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_dataMACd (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_dataMACd
if(get(handles.checkbox_dataMACd, 'Value') == 0)
    handles.dis.dataMACd = false;
else
    handles.dis.dataMACd = true;
end

% --- Executes on button press in checkbox_addCRCd.
function checkbox_addCRCd_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_addCRCd (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_addCRCd
if(get(handles.checkbox_addCRCd, 'Value') == 0)
    handles.dis.addCRCd = false;
else
    handles.dis.addCRCd = true;
end

% --- Executes on button press in checkbox_segmentd.
function checkbox_segmentd_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_segmentd (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_segmentd
if(get(handles.checkbox_segmentd, 'Value') == 0)
    handles.dis.segmentd = false;
else
    handles.dis.segmentd = true;
end


% --- Executes on button press in checkbox_chCoded.
function checkbox_chCoded_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_chCoded (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_chCoded
if(get(handles.checkbox_chCoded, 'Value') == 0)
    handles.dis.chCoded = false;
else
    handles.dis.chCoded = true;
end


% --- Executes on button press in checkbox_rateMatchd.
function checkbox_rateMatchd_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_rateMatchd (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_rateMatchd
if(get(handles.checkbox_rateMatchd, 'Value') == 0)
    handles.dis.rateMatchd = false;
else
    handles.dis.rateMatchd = true;
end

% --- Executes on button press in checkbox_dscramblingd.
function checkbox_dscramblingd_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_dscramblingd (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_dscramblingd
if(get(handles.checkbox_dscramblingd, 'Value') == 0)
    handles.dis.dscramblingd = false;
else
    handles.dis.dscramblingd = true;
end

% --- Executes on button press in checkbox_dmodulaced.
function checkbox_dmodulaced_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_dmodulaced (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_dmodulaced
if(get(handles.checkbox_dmodulaced, 'Value') == 0)
    handles.dis.dmodulaced = false;
else
    handles.dis.dmodulaced = true;
end

% --- Executes on button press in checkbox_dmapperd.
function checkbox_dmapperd_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_dmapperd (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_dmapperd
if(get(handles.checkbox_dmapperd, 'Value') == 0)
    handles.dis.dmapperd = false;
else
    handles.dis.dmapperd = true;
end


% --- Executes on button press in checkbox_dOFDMd.
function checkbox_dOFDMd_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_dOFDMd (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_dOFDMd
if(get(handles.checkbox_dOFDMd, 'Value') == 0)
    handles.dis.dOFDMd = false;
else
    handles.dis.dOFDMd = true;
end

% --- Executes on button press in checkbox_ddeOFDMd.
function checkbox_ddeOFDMd_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_ddeOFDMd (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_ddeOFDMd
if(get(handles.checkbox_ddeOFDMd, 'Value') == 0)
    handles.dis.ddeOFDMd = false;
else
    handles.dis.ddeOFDMd = true;
end


% --- Executes on button press in checkbox_ddemapperd.
function checkbox_ddemapperd_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_ddemapperd (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_ddemapperd
if(get(handles.checkbox_ddemapperd, 'Value') == 0)
    handles.dis.ddemapperd = false;
else
    handles.dis.ddemapperd = true;
end

% --- Executes on button press in checkbox_ddemodd.
function checkbox_ddemodd_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_ddemodd (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_ddemodd
if(get(handles.checkbox_ddemodd, 'Value') == 0)
    handles.dis.ddemodd = false;
else
    handles.dis.ddemodd = true;
end


% --- Executes on button press in checkbox_ddescramd.
function checkbox_ddescramd_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_ddescramd (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_ddescramd
if(get(handles.checkbox_ddescramd, 'Value') == 0)
    handles.dis.ddescramd = false;
else
    handles.dis.ddescramd = true;
end

% --- Executes on button press in checkbox_chdeCoded.
function checkbox_chdeCoded_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_chdeCoded (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_chdeCoded
if(get(handles.checkbox_chdeCoded, 'Value') == 0)
    handles.dis.chdeCoded = false;
else
    handles.dis.chdeCoded = true;
end


% --- Executes on button press in checkbox_desegmentd.
function checkbox_desegmentd_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_desegmentd (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_desegmentd
if(get(handles.checkbox_desegmentd, 'Value') == 0)
    handles.dis.desegmentd = false;
else
    handles.dis.desegmentd = true;
end

% --- Executes on button press in checkbox_remCRCd.
function checkbox_remCRCd_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_remCRCd (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_remCRCd
if(get(handles.checkbox_remCRCd, 'Value') == 0)
    handles.dis.remCRCd = false;
else
    handles.dis.remCRCd = true;
end

% --- Executes on button press in checkbox_PAUSE.
function checkbox_PAUSE_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_PAUSE (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_PAUSE
if(get(handles.checkbox_PAUSE, 'Value') == 0)
    handles.dis.PAUSE = false;
else
    handles.dis.PAUSE = true;
end

% --- Executes on button press in checkbox_TIME.
function checkbox_TIME_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_TIME (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_TIME
if(get(handles.checkbox_TIME, 'Value') == 0)
    handles.dis.TIME = false;
else
    handles.dis.TIME = true;
end
switch (get(handles.checkbox_TIME, 'Value'))
    case 0
        set(handles.checkbox_dataMACt,'Enable', 'off');
        set(handles.checkbox_addCRCt,'Enable', 'off');
        set(handles.checkbox_segmentt,'Enable', 'off');
        set(handles.checkbox_chCodet,'Enable', 'off');
        set(handles.checkbox_rateMatcht,'Enable', 'off');
        set(handles.checkbox_dscramblingt,'Enable', 'off');
        set(handles.checkbox_dmodulacet,'Enable', 'off');
        set(handles.checkbox_dmappert,'Enable', 'off');
        set(handles.checkbox_dOFDMt,'Enable', 'off');
        set(handles.checkbox_radt,'Enable', 'off');
        set(handles.checkbox_ddeOFDMt,'Enable', 'off');
        set(handles.checkbox_vyrkt,'Enable', 'off');
        set(handles.checkbox_ddemappert,'Enable', 'off');
        set(handles.checkbox_ddemodt,'Enable', 'off');
        set(handles.checkbox_ddescramt,'Enable', 'off');
        set(handles.checkbox_chdeCodet,'Enable', 'off');
        set(handles.checkbox_desegmentt,'Enable', 'off');
        set(handles.checkbox_remCRCt,'Enable', 'off');
        set(handles.checkbox_errRest,'Enable', 'off');
    case 1
        set(handles.checkbox_dataMACt,'Enable', 'on');
        set(handles.checkbox_addCRCt,'Enable', 'on');
        set(handles.checkbox_segmentt,'Enable', 'on');
        set(handles.checkbox_chCodet,'Enable', 'on');
        set(handles.checkbox_rateMatcht,'Enable', 'on');
        set(handles.checkbox_dscramblingt,'Enable', 'on');
        set(handles.checkbox_dmodulacet,'Enable', 'on');
        set(handles.checkbox_dmappert,'Enable', 'on');
        set(handles.checkbox_dOFDMt,'Enable', 'on');
        set(handles.checkbox_radt,'Enable', 'on');
        set(handles.checkbox_ddeOFDMt,'Enable', 'on');
        set(handles.checkbox_vyrkt,'Enable', 'on');
        set(handles.checkbox_ddemappert,'Enable', 'on');
        set(handles.checkbox_ddemodt,'Enable', 'on');
        set(handles.checkbox_ddescramt,'Enable', 'on');
        set(handles.checkbox_chdeCodet,'Enable', 'on');
        set(handles.checkbox_desegmentt,'Enable', 'on');
        set(handles.checkbox_remCRCt,'Enable', 'on');
        set(handles.checkbox_errRest,'Enable', 'on');
end
% --- Executes on button press in checkbox_dataMACt.
function checkbox_dataMACt_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_dataMACt (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_dataMACt
if(get(handles.checkbox_dataMACt, 'Value') == 0)
    handles.dis.dataMACt = false;
else
    handles.dis.dataMACt = true;
end

% --- Executes on button press in checkbox_addCRCt.
function checkbox_addCRCt_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_addCRCt (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_addCRCt
if(get(handles.checkbox_addCRCt, 'Value') == 0)
    handles.dis.addCRCt = false;
else
    handles.dis.addCRCt = true;
end

% --- Executes on button press in checkbox_segmentt.
function checkbox_segmentt_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_segmentt (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_segmentt
if(get(handles.checkbox_segmentt, 'Value') == 0)
    handles.dis.segmentt = false;
else
    handles.dis.segmentt = true;
end

% --- Executes on button press in checkbox_chCodet.
function checkbox_chCodet_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_chCodet (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_chCodet
if(get(handles.checkbox_chCodet, 'Value') == 0)
    handles.dis.chCodet = false;
else
    handles.dis.chCodet = true;
end

% --- Executes on button press in checkbox_rateMatcht.
function checkbox_rateMatcht_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_rateMatcht (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_rateMatcht
if(get(handles.checkbox_rateMatcht, 'Value') == 0)
    handles.dis.rateMatcht = false;
else
    handles.dis.rateMatcht = true;
end

% --- Executes on button press in checkbox_dscramblingt.
function checkbox_dscramblingt_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_dscramblingt (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_dscramblingt
if(get(handles.checkbox_dscramblingt, 'Value') == 0)
    handles.dis.dscramblingt = false;
else
    handles.dis.dscramblingt = true;
end

% --- Executes on button press in checkbox_dmodulacet.
function checkbox_dmodulacet_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_dmodulacet (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_dmodulacet
if(get(handles.checkbox_dmodulacet, 'Value') == 0)
    handles.dis.dmodulacet = false;
else
    handles.dis.dmodulacet = true;
end

% --- Executes on button press in checkbox_dmappert.
function checkbox_dmappert_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_dmappert (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_dmappert
if(get(handles.checkbox_dmappert, 'Value') == 0)
    handles.dis.dmappert = false;
else
    handles.dis.dmappert = true;
end

% --- Executes on button press in checkbox_dOFDMt.
function checkbox_dOFDMt_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_dOFDMt (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_dOFDMt
if(get(handles.checkbox_dOFDMt, 'Value') == 0)
    handles.dis.dOFDMt = false;
else
    handles.dis.dOFDMt = true;
end

% --- Executes on button press in checkbox_ddeOFDMt.
function checkbox_ddeOFDMt_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_ddeOFDMt (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_ddeOFDMt
if(get(handles.checkbox_ddeOFDMt, 'Value') == 0)
    handles.dis.ddeOFDMt = false;
else
    handles.dis.ddeOFDMt = true;
end

% --- Executes on button press in checkbox_ddemappert.
function checkbox_ddemappert_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_ddemappert (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_ddemappert
if(get(handles.checkbox_ddemappert, 'Value') == 0)
    handles.dis.ddemappert = false;
else
    handles.dis.ddemappert = true;
end

% --- Executes on button press in checkbox_ddemodt.
function checkbox_ddemodt_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_ddemodt (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_ddemodt
if(get(handles.checkbox_ddemodt, 'Value') == 0)
    handles.dis.ddemodt = false;
else
    handles.dis.ddemodt = true;
end

% --- Executes on button press in checkbox_ddescramt.
function checkbox_ddescramt_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_ddescramt (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_ddescramt
if(get(handles.checkbox_ddescramt, 'Value') == 0)
    handles.dis.ddescramt = false;
else
    handles.dis.ddescramt = true;
end

% --- Executes on button press in checkbox_chdeCodet.
function checkbox_chdeCodet_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_chdeCodet (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_chdeCodet
if(get(handles.checkbox_chdeCodet, 'Value') == 0)
    handles.dis.chdeCodet = false;
else
    handles.dis.chdeCodet = true;
end

% --- Executes on button press in checkbox_desegmentt.
function checkbox_desegmentt_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_desegmentt (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_desegmentt
if(get(handles.checkbox_desegmentt, 'Value') == 0)
    handles.dis.desegmentt = false;
else
    handles.dis.desegmentt = true;
end

% --- Executes on button press in checkbox_remCRCt.
function checkbox_remCRCt_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_remCRCt (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_remCRCt
if(get(handles.checkbox_remCRCt, 'Value') == 0)
    handles.dis.remCRCt = false;
else
    handles.dis.remCRCt = true;
end

% --- Executes on button press in checkbox_SumErrt.
function checkbox_SumErrt_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_SumErrt (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_SumErrt
if(get(handles.checkbox_SumErrt, 'Value') == 0)
    handles.dis.SumErrt = false;
else
    handles.dis.SumErrt = true;
end

% --- Executes on button press in checkbox_errRest.
function checkbox_errRest_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_errRest (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
if(get(handles.checkbox_errRest, 'Value') == 0)
    handles.dis.errRest = false;
else
    handles.dis.errRest = true;
end
% Hint: get(hObject,'Value') returns toggle state of checkbox_errRest
function reload(handles)
%% kontola existence souboru nastaveni zobrazovani"display.mat"
if( min(exist('display.mat')) == 0)
    dis = init_disp('display');
else
    dis = handles.dis;
    % load('display.mat');
end
handles.dis = dis;

%% Výpisy o chybách
if(handles.dis.ERR)
    set(handles.checkbox_ERR,'Value', 1);
else
    set(handles.checkbox_ERR,'Value', 0);
end

if(handles.dis.errCRC)
    set(handles.checkbox_errCRC,'Value', 1);
else
    set(handles.checkbox_errCRC,'Value', 0);
end

if(handles.dis.errBlokCRC)
    set(handles.checkbox_errBlokCRC,'Value', 1);
else
    set(handles.checkbox_errBlokCRC,'Value', 0);
end

if(handles.dis.err)
    set(handles.checkbox__err,'Value', 1);
else
    set(handles.checkbox__err,'Value', 0);
end

if(handles.dis.nErr)
    set(handles.checkbox_nErr,'Value', 1);
else
    set(handles.checkbox_nErr,'Value', 0);
end

switch (get(handles.checkbox_ERR, 'Value'))
    case 0
        set(handles.checkbox_errCRC,'Enable', 'off');
        set(handles.checkbox_errBlokCRC,'Enable', 'off');
        set(handles.checkbox__err,'Enable', 'off');
        set(handles.checkbox_nErr,'Enable', 'off');
    case 1
        set(handles.checkbox_errCRC,'Enable', 'on');
        set(handles.checkbox_errBlokCRC,'Enable', 'on');
        set(handles.checkbox__err,'Enable', 'on');
        set(handles.checkbox_nErr,'Enable', 'on');
end
        
%% Informativní výpisy

if(handles.dis.STATUS)
    set(handles.checkbox_STATUS,'Value', 1);
else
    set(handles.checkbox_STATUS,'Value', 0);
end

if(handles.dis.dataMAC)
    set(handles.checkbox_dataMAC,'Value', 1);
else
    set(handles.checkbox_dataMAC,'Value', 0);
end

if(handles.dis.addCRC)
    set(handles.checkbox_addCRC,'Value', 1);
else
    set(handles.checkbox_addCRC,'Value', 0);
end
if(handles.dis.segment)
    set(handles.checkbox_segment,'Value', 1);
else
    set(handles.checkbox_segment,'Value', 0);
end
if(handles.dis.chCode)
    set(handles.checkbox_chCode,'Value', 1);
else
    set(handles.checkbox_chCode,'Value', 0);
end
if(handles.dis.rateMatch)
    set(handles.checkbox_rateMatch,'Value', 1);
else
    set(handles.checkbox_rateMatch,'Value', 0);
end
if(handles.dis.dscrambling)
    set(handles.checkbox_dscrambling,'Value', 1);
else
    set(handles.checkbox_dscrambling,'Value', 0);
end
if(handles.dis.dmodulace)
    set(handles.checkbox_dmodulace,'Value', 1);
else
    set(handles.checkbox_dmodulace,'Value', 0);
end
if(handles.dis.dmapper)
    set(handles.checkbox_dmapper,'Value', 1);
else
    set(handles.checkbox_dmapper,'Value', 0);
end
if(handles.dis.dOFDM)
    set(handles.checkbox_dOFDM,'Value', 1);
else
    set(handles.checkbox_dOFDM,'Value', 0);
end
if(handles.dis.rad)
    set(handles.checkbox_rad,'Value', 1);
else
    set(handles.checkbox_rad,'Value', 0);
end
if(handles.dis.ddeOFDM)
    set(handles.checkbox_ddeOFDM,'Value', 1);
else
    set(handles.checkbox_ddeOFDM,'Value', 0);
end
if(handles.dis.vyrk)
    set(handles.checkbox_vyrk,'Value', 1);
else
    set(handles.checkbox_vyrk,'Value', 0);
end
if(handles.dis.ddemapper)
    set(handles.checkbox_ddemapper,'Value', 1);
else
    set(handles.checkbox_ddemapper,'Value', 0);
end
if(handles.dis.ddemod)
    set(handles.checkbox_ddemod,'Value', 1);
else
    set(handles.checkbox_ddemod,'Value', 0);
end
if(handles.dis.ddescram)
    set(handles.checkbox_ddescram,'Value', 1);
else
    set(handles.checkbox_ddescram,'Value', 0);
end
if(handles.dis.chdeCode)
    set(handles.checkbox_chdeCode,'Value', 1);
else
    set(handles.checkbox_chdeCode,'Value', 0);
end
if(handles.dis.desegment)
    set(handles.checkbox_desegment,'Value', 1);
else
    set(handles.checkbox_desegment,'Value', 0);
end
if(handles.dis.remCRC)
    set(handles.checkbox_remCRC,'Value', 1);
else
    set(handles.checkbox_remCRC,'Value', 0);
end
switch (get(handles.checkbox_STATUS, 'Value'))
    case 0
        set(handles.checkbox_dataMAC,'Enable', 'off');
        set(handles.checkbox_addCRC,'Enable', 'off');
        set(handles.checkbox_segment,'Enable', 'off');
        set(handles.checkbox_chCode,'Enable', 'off');
        set(handles.checkbox_rateMatch,'Enable', 'off');
        set(handles.checkbox_dscrambling,'Enable', 'off');
        set(handles.checkbox_dmodulace,'Enable', 'off');
        set(handles.checkbox_dmapper,'Enable', 'off');
        set(handles.checkbox_dOFDM,'Enable', 'off');
        set(handles.checkbox_rad,'Enable', 'off');
        set(handles.checkbox_ddeOFDM,'Enable', 'off');
        set(handles.checkbox_vyrk,'Enable', 'off');
        set(handles.checkbox_ddemapper,'Enable', 'off');
        set(handles.checkbox_ddemod,'Enable', 'off');
        set(handles.checkbox_ddescram,'Enable', 'off');
        set(handles.checkbox_chdeCode,'Enable', 'off');
        set(handles.checkbox_desegment,'Enable', 'off');
        set(handles.checkbox_remCRC,'Enable', 'off');
    case 1
        set(handles.checkbox_dataMAC,'Enable', 'on');
        set(handles.checkbox_addCRC,'Enable', 'on');
        set(handles.checkbox_segment,'Enable', 'on');
        set(handles.checkbox_chCode,'Enable', 'on');
        set(handles.checkbox_rateMatch,'Enable', 'on');
        set(handles.checkbox_dscrambling,'Enable', 'on');
        set(handles.checkbox_dmodulace,'Enable', 'on');
        set(handles.checkbox_dmapper,'Enable', 'on');
        set(handles.checkbox_dOFDM,'Enable', 'on');
        set(handles.checkbox_rad,'Enable', 'on');
        set(handles.checkbox_ddeOFDM,'Enable', 'on');
        set(handles.checkbox_vyrk,'Enable', 'on');
        set(handles.checkbox_ddemapper,'Enable', 'on');
        set(handles.checkbox_ddemod,'Enable', 'on');
        set(handles.checkbox_ddescram,'Enable', 'on');
        set(handles.checkbox_chdeCode,'Enable', 'on');
        set(handles.checkbox_desegment,'Enable', 'on');
        set(handles.checkbox_remCRC,'Enable', 'on');
end

%% Detailní informativní výpisy

if(handles.dis.DETAIL)
    set(handles.checkbox_DETAIL,'Value', 1);
else
    set(handles.checkbox_DETAIL,'Value', 0);
end

if(handles.dis.PAUSE)
    set(handles.checkbox_PAUSE,'Value', 1);
else
    set(handles.checkbox_PAUSE,'Value', 0);
end

if(handles.dis.dataMACd)
    set(handles.checkbox_dataMACd,'Value', 1);
else
    set(handles.checkbox_dataMACd,'Value', 0);
end

if(handles.dis.addCRCd)
    set(handles.checkbox_addCRCd,'Value', 1);
else
    set(handles.checkbox_addCRCd,'Value', 0);
end
if(handles.dis.segmentd)
    set(handles.checkbox_segmentd,'Value', 1);
else
    set(handles.checkbox_segmentd,'Value', 0);
end
if(handles.dis.chCoded)
    set(handles.checkbox_chCoded,'Value', 1);
else
    set(handles.checkbox_chCoded,'Value', 0);
end
if(handles.dis.rateMatchd)
    set(handles.checkbox_rateMatchd,'Value', 1);
else
    set(handles.checkbox_rateMatchd,'Value', 0);
end
if(handles.dis.dscramblingd)
    set(handles.checkbox_dscramblingd,'Value', 1);
else
    set(handles.checkbox_dscramblingd,'Value', 0);
end
if(handles.dis.dmodulaced)
    set(handles.checkbox_dmodulaced,'Value', 1);
else
    set(handles.checkbox_dmodulaced,'Value', 0);
end
if(handles.dis.dmapperd)
    set(handles.checkbox_dmapperd,'Value', 1);
else
    set(handles.checkbox_dmapperd,'Value', 0);
end
if(handles.dis.dOFDMd)
    set(handles.checkbox_dOFDMd,'Value', 1);
else
    set(handles.checkbox_dOFDMd,'Value', 0);
end
if(handles.dis.ddeOFDMd)
    set(handles.checkbox_ddeOFDMd,'Value', 1);
else
    set(handles.checkbox_ddeOFDMd,'Value', 0);
end
if(handles.dis.radd)
    set(handles.checkbox_radd,'Value', 1);
else
    set(handles.checkbox_radd,'Value', 0);
end
if(handles.dis.ddemapperd)
    set(handles.checkbox_ddemapperd,'Value', 1);
else
    set(handles.checkbox_ddemapperd,'Value', 0);
end
if(handles.dis.vyrkd)
    set(handles.checkbox_vyrkd,'Value', 1);
else
    set(handles.checkbox_vyrkd,'Value', 0);
end
if(handles.dis.ddemodd)
    set(handles.checkbox_ddemodd,'Value', 1);
else
    set(handles.checkbox_ddemodd,'Value', 0);
end
if(handles.dis.ddescramd)
    set(handles.checkbox_ddescramd,'Value', 1);
else
    set(handles.checkbox_ddescramd,'Value', 0);
end
if(handles.dis.chdeCoded)
    set(handles.checkbox_chdeCoded,'Value', 1);
else
    set(handles.checkbox_chdeCoded,'Value', 0);
end
if(handles.dis.desegmentd)
    set(handles.checkbox_desegmentd,'Value', 1);
else
    set(handles.checkbox_desegmentd,'Value', 0);
end
if(handles.dis.remCRCd)
    set(handles.checkbox_remCRCd,'Value', 1);
else
    set(handles.checkbox_remCRCd,'Value', 0);
end
switch (get(handles.checkbox_DETAIL, 'Value'))
    case 0
        set(handles.checkbox_dataMACd,'Enable', 'off');
        set(handles.checkbox_addCRCd,'Enable', 'off');
        set(handles.checkbox_segmentd,'Enable', 'off');
        set(handles.checkbox_chCoded,'Enable', 'off');
        set(handles.checkbox_rateMatchd,'Enable', 'off');
        set(handles.checkbox_dscramblingd,'Enable', 'off');
        set(handles.checkbox_dmodulaced,'Enable', 'off');
        set(handles.checkbox_dmapperd,'Enable', 'off');
        set(handles.checkbox_dOFDMd,'Enable', 'off');
        set(handles.checkbox_radd,'Enable', 'off');
        set(handles.checkbox_ddeOFDMd,'Enable', 'off');
        set(handles.checkbox_vyrkd,'Enable', 'off');
        set(handles.checkbox_ddemapperd,'Enable', 'off');
        set(handles.checkbox_ddemodd,'Enable', 'off');
        set(handles.checkbox_ddescramd,'Enable', 'off');
        set(handles.checkbox_chdeCoded,'Enable', 'off');
        set(handles.checkbox_desegmentd,'Enable', 'off');
        set(handles.checkbox_remCRCd,'Enable', 'off');
    case 1
        set(handles.checkbox_dataMACd,'Enable', 'on');
        set(handles.checkbox_addCRCd,'Enable', 'on');
        set(handles.checkbox_segmentd,'Enable', 'on');
        set(handles.checkbox_chCoded,'Enable', 'on');
        set(handles.checkbox_rateMatchd,'Enable', 'on');
        set(handles.checkbox_dscramblingd,'Enable', 'on');
        set(handles.checkbox_dmodulaced,'Enable', 'on');
        set(handles.checkbox_dmapperd,'Enable', 'on');
        set(handles.checkbox_dOFDMd,'Enable', 'on');
        set(handles.checkbox_radd,'Enable', 'on');
        set(handles.checkbox_ddeOFDMd,'Enable', 'on');
        set(handles.checkbox_vyrkd,'Enable', 'on');
        set(handles.checkbox_ddemapperd,'Enable', 'on');
        set(handles.checkbox_ddemodd,'Enable', 'on');
        set(handles.checkbox_ddescramd,'Enable', 'on');
        set(handles.checkbox_chdeCoded,'Enable', 'on');
        set(handles.checkbox_desegmentd,'Enable', 'on');
        set(handles.checkbox_remCRCd,'Enable', 'on');
end

%% Časové výpisy

if(handles.dis.TIME)
    set(handles.checkbox_TIME,'Value', 1);
else
    set(handles.checkbox_TIME,'Value', 0);
end

if(handles.dis.timeplan)
    set(handles.checkbox_timeplan,'Value', 1);
else
    set(handles.checkbox_timeplan,'Value', 0);
end

if(handles.dis.oddel)
    set(handles.checkbox_oddel,'Value', 1);
else
    set(handles.checkbox_oddel,'Value', 0);
end

if(handles.dis.SumErrt)
    set(handles.checkbox_SumErrt,'Value', 1);
else
    set(handles.checkbox_SumErrt,'Value', 0);
end

if(handles.dis.dataMACt)
    set(handles.checkbox_dataMACt,'Value', 1);
else
    set(handles.checkbox_dataMACt,'Value', 0);
end

if(handles.dis.addCRCt)
    set(handles.checkbox_addCRCt,'Value', 1);
else
    set(handles.checkbox_addCRCt,'Value', 0);
end
if(handles.dis.segmentt)
    set(handles.checkbox_segmentt,'Value', 1);
else
    set(handles.checkbox_segmentt,'Value', 0);
end
if(handles.dis.chCodet)
    set(handles.checkbox_chCodet,'Value', 1);
else
    set(handles.checkbox_chCodet,'Value', 0);
end
if(handles.dis.rateMatcht)
    set(handles.checkbox_rateMatcht,'Value', 1);
else
    set(handles.checkbox_rateMatcht,'Value', 0);
end
if(handles.dis.dscramblingt)
    set(handles.checkbox_dscramblingt,'Value', 1);
else
    set(handles.checkbox_dscramblingt,'Value', 0);
end
if(handles.dis.dmodulacet)
    set(handles.checkbox_dmodulacet,'Value', 1);
else
    set(handles.checkbox_dmodulacet,'Value', 0);
end
if(handles.dis.dmappert)
    set(handles.checkbox_dmappert,'Value', 1);
else
    set(handles.checkbox_dmappert,'Value', 0);
end
if(handles.dis.dOFDMt)
    set(handles.checkbox_dOFDMt,'Value', 1);
else
    set(handles.checkbox_dOFDMt,'Value', 0);
end
if(handles.dis.radt)
    set(handles.checkbox_radt,'Value', 1);
else
    set(handles.checkbox_radt,'Value', 0);
end
if(handles.dis.ddeOFDMt)
    set(handles.checkbox_ddeOFDMt,'Value', 1);
else
    set(handles.checkbox_ddeOFDMt,'Value', 0);
end
if(handles.dis.vyrkt)
    set(handles.checkbox_vyrkt,'Value', 1);
else
    set(handles.checkbox_vyrkt,'Value', 0);
end
if(handles.dis.ddemappert)
    set(handles.checkbox_ddemappert,'Value', 1);
else
    set(handles.checkbox_ddemappert,'Value', 0);
end
if(handles.dis.ddemodt)
    set(handles.checkbox_ddemodt,'Value', 1);
else
    set(handles.checkbox_ddemodt,'Value', 0);
end
if(handles.dis.ddescramt)
    set(handles.checkbox_ddescramt,'Value', 1);
else
    set(handles.checkbox_ddescramt,'Value', 0);
end
if(handles.dis.chdeCodet)
    set(handles.checkbox_chdeCodet,'Value', 1);
else
    set(handles.checkbox_chdeCodet,'Value', 0);
end
if(handles.dis.desegmentt)
    set(handles.checkbox_desegmentt,'Value', 1);
else
    set(handles.checkbox_desegmentt,'Value', 0);
end
if(handles.dis.remCRCt)
    set(handles.checkbox_remCRCt,'Value', 1);
else
    set(handles.checkbox_remCRCt,'Value', 0);
end
if(handles.dis.errRest)
    set(handles.checkbox_errRest,'Value', 1);
else
    set(handles.checkbox_errRest,'Value', 0);
end
switch (get(handles.checkbox_TIME, 'Value'))
    case 0
        set(handles.checkbox_dataMACt,'Enable', 'off');
        set(handles.checkbox_addCRCt,'Enable', 'off');
        set(handles.checkbox_segmentt,'Enable', 'off');
        set(handles.checkbox_chCodet,'Enable', 'off');
        set(handles.checkbox_rateMatcht,'Enable', 'off');
        set(handles.checkbox_dscramblingt,'Enable', 'off');
        set(handles.checkbox_dmodulacet,'Enable', 'off');
        set(handles.checkbox_dmappert,'Enable', 'off');
        set(handles.checkbox_dOFDMt,'Enable', 'off');
        set(handles.checkbox_radt,'Enable', 'off');
        set(handles.checkbox_ddeOFDMt,'Enable', 'off');
        set(handles.checkbox_vyrkt,'Enable', 'off');
        set(handles.checkbox_ddemappert,'Enable', 'off');
        set(handles.checkbox_ddemodt,'Enable', 'off');
        set(handles.checkbox_ddescramt,'Enable', 'off');
        set(handles.checkbox_chdeCodet,'Enable', 'off');
        set(handles.checkbox_desegmentt,'Enable', 'off');
        set(handles.checkbox_remCRCt,'Enable', 'off');
        set(handles.checkbox_errRest,'Enable', 'off');
    case 1
        set(handles.checkbox_dataMACt,'Enable', 'on');
        set(handles.checkbox_addCRCt,'Enable', 'on');
        set(handles.checkbox_segmentt,'Enable', 'on');
        set(handles.checkbox_chCodet,'Enable', 'on');
        set(handles.checkbox_rateMatcht,'Enable', 'on');
        set(handles.checkbox_dscramblingt,'Enable', 'on');
        set(handles.checkbox_dmodulacet,'Enable', 'on');
        set(handles.checkbox_dmappert,'Enable', 'on');
        set(handles.checkbox_dOFDMt,'Enable', 'on');
        set(handles.checkbox_radt,'Enable', 'on');
        set(handles.checkbox_ddeOFDMt,'Enable', 'on');
        set(handles.checkbox_vyrkt,'Enable', 'on');
        set(handles.checkbox_ddemappert,'Enable', 'on');
        set(handles.checkbox_ddemodt,'Enable', 'on');
        set(handles.checkbox_ddescramt,'Enable', 'on');
        set(handles.checkbox_chdeCodet,'Enable', 'on');
        set(handles.checkbox_desegmentt,'Enable', 'on');
        set(handles.checkbox_remCRCt,'Enable', 'on');
        set(handles.checkbox_errRest,'Enable', 'on');
end


% --- Executes on button press in pushbutton_Save.
function pushbutton_Save_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton_Save (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
if(get(handles.checkbox_ERR, 'Value') == 0)
    handles.dis.ERR = false;
else
    handles.dis.ERR = true;
end
if(get(handles.checkbox_errCRC, 'Value') == 0)
    handles.dis.errCRC = false;
else
    handles.dis.errCRC = true;
end
if(get(handles.checkbox__err, 'Value') == 0)
    handles.dis.err = false;
else
    handles.dis.err = true;
end
if(get(handles.checkbox_nErr, 'Value') == 0)
    handles.dis.nErr = false;
else
    handles.dis.nErr = true;
end
if(get(handles.checkbox_errBlokCRC, 'Value') == 0)
    handles.dis.errBlokCRC = false;
else
    handles.dis.errBlokCRC = true;
end
if(get(handles.checkbox_STATUS, 'Value') == 0)
    handles.dis.STATUS = false;
else
    handles.dis.STATUS = true;
end
if(get(handles.checkbox_dataMAC, 'Value') == 0)
    handles.dis.dataMAC = false;
else
    handles.dis.dataMAC = true;
end
if(get(handles.checkbox_addCRC, 'Value') == 0)
    handles.dis.addCRC = false;
else
    handles.dis.addCRC = true;
end
if(get(handles.checkbox_segment, 'Value') == 0)
    handles.dis.segment = false;
else
    handles.dis.segment = true;
end
if(get(handles.checkbox_chCode, 'Value') == 0)
    handles.dis.chCode = false;
else
    handles.dis.chCode = true;
end
if(get(handles.checkbox_rateMatch, 'Value') == 0)
    handles.dis.rateMatch = false;
else
    handles.dis.rateMatch = true;
end
if(get(handles.checkbox_dscrambling, 'Value') == 0)
    handles.dis.dscrambling = false;
    handles.dis.uscrambling = false;
else
    handles.dis.dscrambling = true;
    handles.dis.uscrambling = true;
end
if(get(handles.checkbox_dmodulace, 'Value') == 0)
    handles.dis.dmodulace = false;
    handles.dis.umodulace = false;
else
    handles.dis.dmodulace = true;
    handles.dis.umodulace = true;
end
if(get(handles.checkbox_dmapper, 'Value') == 0)
    handles.dis.dmapper = false;
    handles.dis.umapper = false;
else
    handles.dis.dmapper = true;
    handles.dis.umapper = true;
end
if(get(handles.checkbox_dOFDM, 'Value') == 0)
    handles.dis.dOFDM = false;
    handles.dis.uSCFDMA = false;
else
    handles.dis.dOFDM = true;
    handles.dis.uSCFDMA = true;
end
if(get(handles.checkbox_ddeOFDM, 'Value') == 0)
    handles.dis.ddeOFDM = false;
    handles.dis.udeSCFDMA = false;
else
    handles.dis.ddeOFDM = true;
    handles.dis.udeSCFDMA = true;
end
if(get(handles.checkbox_ddemapper, 'Value') == 0)
    handles.dis.ddemapper = false;
    handles.dis.udemapper = false;
else
    handles.dis.ddemapper = true;
    handles.dis.udemapper = true;
end
if(get(handles.checkbox_ddemod, 'Value') == 0)
    handles.dis.ddemod = false;
    handles.dis.udemod = false;
else
    handles.dis.ddemod = true;
    handles.dis.udemod = true;
end
if(get(handles.checkbox_ddescram, 'Value') == 0)
    handles.dis.ddescram = false;
    handles.dis.udescram = false;
else
    handles.dis.ddescram = true;
    handles.dis.udescram = true;
end
if(get(handles.checkbox_chdeCode, 'Value') == 0)
    handles.dis.chdeCode = false;
else
    handles.dis.chdeCode = true;
end
if(get(handles.checkbox_desegment, 'Value') == 0)
    handles.dis.desegment = false;
else
    handles.dis.desegment = true;
end
if(get(handles.checkbox_remCRC, 'Value') == 0)
    handles.dis.remCRC = false;
else
    handles.dis.remCRC = true;
end

if(get(handles.checkbox_DETAIL, 'Value') == 0)
    handles.dis.DETAIL = false;
else
    handles.dis.DETAIL = true;
end
if(get(handles.checkbox_dataMACd, 'Value') == 0)
    handles.dis.dataMACd = false;
else
    handles.dis.dataMACd = true;
end
if(get(handles.checkbox_addCRCd, 'Value') == 0)
    handles.dis.addCRCd = false;
else
    handles.dis.addCRCd = true;
end
if(get(handles.checkbox_segmentd, 'Value') == 0)
    handles.dis.segmentd = false;
else
    handles.dis.segmentd = true;
end
if(get(handles.checkbox_chCoded, 'Value') == 0)
    handles.dis.chCoded = false;
else
    handles.dis.chCoded = true;
end
if(get(handles.checkbox_rateMatchd, 'Value') == 0)
    handles.dis.rateMatchd = false;
else
    handles.dis.rateMatchd = true;
end
if(get(handles.checkbox_dscramblingd, 'Value') == 0)
    handles.dis.dscramblingd = false;
    handles.dis.uscramblingd = false;
else
    handles.dis.dscramblingd = true;
    handles.dis.uscramblingd = true;
end
if(get(handles.checkbox_dmodulaced, 'Value') == 0)
    handles.dis.dmodulaced = false;
    handles.dis.umodulaced = false;
else
    handles.dis.dmodulaced = true;
    handles.dis.umodulaced = true;
end
if(get(handles.checkbox_dmapperd, 'Value') == 0)
    handles.dis.dmapperd = false;
    handles.dis.umapperd = false;
else
    handles.dis.dmapperd = true;
    handles.dis.umapperd = true;
end
if(get(handles.checkbox_dOFDMd, 'Value') == 0)
    handles.dis.dOFDMd = false;
    handles.dis.uSCFDMAd = false;
else
    handles.dis.dOFDMd = true;
    handles.dis.uSCFDMAd = true;
end
if(get(handles.checkbox_ddeOFDMd, 'Value') == 0)
    handles.dis.ddeOFDMd = false;
    handles.dis.udeSCFDMAd = false;
else
    handles.dis.ddeOFDMd = true;
    handles.dis.udeSCFDMAd = true;
end
if(get(handles.checkbox_ddemapperd, 'Value') == 0)
    handles.dis.ddemapperd = false;
    handles.dis.udemapperd = false;
else
    handles.dis.ddemapperd = true;
    handles.dis.udemapperd = true;
end
if(get(handles.checkbox_ddemodd, 'Value') == 0)
    handles.dis.ddemodd = false;
    handles.dis.udemodd = false;
else
    handles.dis.ddemodd = true;
    handles.dis.udemodd = true;
end
if(get(handles.checkbox_ddescramd, 'Value') == 0)
    handles.dis.ddescramd = false;
    handles.dis.udescramd = false;
else
    handles.dis.ddescramd = true;
    handles.dis.udescramd = true;
end
if(get(handles.checkbox_chdeCoded, 'Value') == 0)
    handles.dis.chdeCoded = false;
else
    handles.dis.chdeCoded = true;
end
if(get(handles.checkbox_desegmentd, 'Value') == 0)
    handles.dis.desegmentd = false;
else
    handles.dis.desegmentd = true;
end
if(get(handles.checkbox_remCRCd, 'Value') == 0)
    handles.dis.remCRCd = false;
else
    handles.dis.remCRCd = true;
end
if(get(handles.checkbox_PAUSE, 'Value') == 0)
    handles.dis.PAUSE = false;
else
    handles.dis.PAUSE = true;
end
if(get(handles.checkbox_TIME, 'Value') == 0)
    handles.dis.TIME = false;
else
    handles.dis.TIME = true;
end
if(get(handles.checkbox_dataMACt, 'Value') == 0)
    handles.dis.dataMACt = false;
else
    handles.dis.dataMACt = true;
end
if(get(handles.checkbox_addCRCt, 'Value') == 0)
    handles.dis.addCRCt = false;
else
    handles.dis.addCRCt = true;
end
if(get(handles.checkbox_segmentt, 'Value') == 0)
    handles.dis.segmentt = false;
else
    handles.dis.segmentt = true;
end
if(get(handles.checkbox_chCodet, 'Value') == 0)
    handles.dis.chCodet = false;
else
    handles.dis.chCodet = true;
end
if(get(handles.checkbox_rateMatcht, 'Value') == 0)
    handles.dis.rateMatcht = false;
else
    handles.dis.rateMatcht = true;
end
if(get(handles.checkbox_dscramblingt, 'Value') == 0)
    handles.dis.dscramblingt = false;
    handles.dis.uscramblingt = false;
else
    handles.dis.dscramblingt = true;
    handles.dis.uscramblingt = true;
end
if(get(handles.checkbox_dmodulacet, 'Value') == 0)
    handles.dis.dmodulacet = false;
    handles.dis.umodulacet = false;
else
    handles.dis.dmodulacet = true;
    handles.dis.umodulacet = true;
end
if(get(handles.checkbox_dmappert, 'Value') == 0)
    handles.dis.dmappert = false;
    handles.dis.umappert = false;
else
    handles.dis.dmappert = true;
    handles.dis.umappert = true;
end
if(get(handles.checkbox_dOFDMt, 'Value') == 0)
    handles.dis.dOFDMt = false;
    handles.dis.uSCFDMAt = false;
else
    handles.dis.dOFDMt = true;
    handles.dis.uSCFDMAt = true;
end
if(get(handles.checkbox_ddeOFDMt, 'Value') == 0)
    handles.dis.ddeOFDMt = false;
    handles.dis.udeSCFDMAt = false;
else
    handles.dis.ddeOFDMt = true;
    handles.dis.udeSCFDMAt = true;
end
if(get(handles.checkbox_ddemappert, 'Value') == 0)
    handles.dis.ddemappert = false;
    handles.dis.udemappert = false;
else
    handles.dis.ddemappert = true;
    handles.dis.udemappert = true;
end
if(get(handles.checkbox_ddemodt, 'Value') == 0)
    handles.dis.ddemodt = false;
    handles.dis.udemodt = false;
else
    handles.dis.ddemodt = true;
    handles.dis.udemodt = true;
end
if(get(handles.checkbox_ddescramt, 'Value') == 0)
    handles.dis.ddescramt = false;
    handles.dis.udescramt = false;
else
    handles.dis.ddescramt = true;
    handles.dis.udescramt = true;
end
if(get(handles.checkbox_chdeCodet, 'Value') == 0)
    handles.dis.chdeCodet = false;
else
    handles.dis.chdeCodet = true;
end
if(get(handles.checkbox_desegmentt, 'Value') == 0)
    handles.dis.desegmentt = false;
else
    handles.dis.desegmentt = true;
end
if(get(handles.checkbox_remCRCt, 'Value') == 0)
    handles.dis.remCRCt = false;
else
    handles.dis.remCRCt = true;
end
if(get(handles.checkbox_SumErrt, 'Value') == 0)
    handles.dis.SumErrt = false;
else
    handles.dis.SumErrt = true;
end
if(get(handles.checkbox_errRest, 'Value') == 0)
    handles.dis.errRest = false;
else
    handles.dis.errRest = true;
end
% Následujici 4 ovladace maji vyt nastaveny na false, zobrazování řešeno
% jiným způsobem - v GUI

handles.dis.obr         = false; % Zobrazení Vstupního obrázku, pokud je vstupem

handles.dis.mapper.MAP  = false; % Zobrazení struktury radiového rámce symbolicky
handles.dis.mapper.mag  = false; % Zobrazení struktury rádiového rámce, modul
handles.dis.mapper.angle= false; % Zobrazení struktury rádiového rámce, úhel
% Dalsi později dodelavane
if(get(handles.checkbox_rad, 'Value') == 0)
    handles.dis.rad = false;
else
    handles.dis.rad = true;
end
if(get(handles.checkbox_radd, 'Value') == 0)
    handles.dis.radd = false;
else
    handles.dis.radd = true;
end
if(get(handles.checkbox_radt, 'Value') == 0)
    handles.dis.radt = false;
else
    handles.dis.radt = true;
end
if(get(handles.checkbox_vyrk, 'Value') == 0)
    handles.dis.vyrk = false;
else
    handles.dis.vyrk = true;
end
if(get(handles.checkbox_vyrkd, 'Value') == 0)
    handles.dis.vyrkd = false;
else
    handles.dis.vyrkd = true;
end
if(get(handles.checkbox_vyrkt, 'Value') == 0)
    handles.dis.vyrkt = false;
else
    handles.dis.vyrkt = true;
end
if(get(handles.checkbox_timeplan, 'Value') == 0)
    handles.dis.timeplan = false;
else
    handles.dis.timeplan = true;
end
if(get(handles.checkbox_oddel, 'Value') == 0)
    handles.dis.oddel = false;
else
    handles.dis.oddel = true;
end

handles.main_handles.dis = handles.dis;
guidata(hObject, handles);

guidata(handles.main_handle,handles.main_handles) 
dis = handles.dis;
save('display.mat', 'dis');
reload(handles);
helpdlg('Nastavení bylo uloženo.', 'Uložení nastavení');
% --- Executes on button press in pushbutton_default.
function pushbutton_default_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton_default (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
handles.dis = init_disp('display');
handles.main_handles.dis = handles.dis;
guidata(hObject, handles);

guidata(handles.main_handle,handles.main_handles) 
dis = handles.dis;
save('display.mat', 'dis');
reload(handles);
helpdlg('Bylo obnoveno výchozí nastavení.', 'Výchozí nastavení');


% --- Executes on button press in checkbox_rad.
function checkbox_rad_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_rad (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_rad


% --- Executes on button press in checkbox_radd.
function checkbox_radd_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_radd (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_radd


% --- Executes on button press in checkbox_radt.
function checkbox_radt_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_radt (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_radt


% --- Executes on button press in checkbox_vyrk.
function checkbox_vyrk_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_vyrk (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_vyrk


% --- Executes on button press in checkbox_vyrkd.
function checkbox_vyrkd_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_vyrkd (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_vyrkd


% --- Executes on button press in checkbox_vyrkt.
function checkbox_vyrkt_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_vyrkt (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_vyrkt


% --- Executes on button press in checkbox_timeplan.
function checkbox_timeplan_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_timeplan (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_timeplan


% --- Executes on button press in checkbox_oddel.
function checkbox_oddel_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox_oddel (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox_oddel
