Module Expr Str Import alias alias alias alias alias alias alias alias Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Num Num Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr ListLoad ListLoad ListLoad ListLoad Assign AttributeStore NameLoad attr BinOpMult ListLoad NameLoad Num Assign AttributeStore NameLoad attr BinOpMult ListLoad Num Num Assign AttributeStore NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call NameLoad Str Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign AttributeStore NameLoad attr Call NameLoad Str Assign AttributeStore NameLoad attr Call NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Num Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Str Assign AttributeStore NameLoad attr Call NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad BinOpDiv BinOpSub NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Assign NameStore BinOpMult ListLoad NameLoad Num Assign NameStore ListLoad Call NameLoad Call NameLoad Str Call NameLoad Call NameLoad Str Call NameLoad Call NameLoad Str For NameStore Call NameLoad Num body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Num Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num Num Num Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Str Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call NameLoad Str keyword Num keyword AttributeLoad NameLoad attr Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Str Call NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad BinOpMod Str Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpBitOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad Str Assign AttributeStore NameLoad attr ListLoad Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign AttributeStore NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad Str AttributeLoad NameLoad attr Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Num Num Num Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Num Num Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Num Num Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr NameLoad Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Num Assign NameStore Call NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign SubscriptStore NameLoad Index Num ListLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Num orelse Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str keyword AttributeLoad NameLoad attr keyword Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str keyword Str keyword AttributeLoad NameLoad attr keyword Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str keyword Str keyword AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword AttributeLoad NameLoad attr keyword Str keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str keyword AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore NameStore NameLoad orelse Assign NameStore UnaryOpNot AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad If CompareEq Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad Str Str Return Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Str Str NameLoad Num NameLoad If BoolOpAnd NameLoad UnaryOpNot Call AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call NameLoad For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AugAssignAdd NameStore BinOpAdd NameLoad Str Assign NameStore SubscriptLoad NameLoad Slice Num Expr Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call AttributeLoad AttributeLoad NameLoad attr attr body Assign AttributeStore NameLoad attr Num Print Str If Call AttributeLoad AttributeLoad NameLoad attr attr body Assign AttributeStore NameLoad attr Num Print Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Str NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If CompareGt NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpDiv Num NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str Call AttributeLoad AttributeLoad NameLoad attr attr If Call AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call NameLoad Num NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpDiv Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str If CompareGt Call NameLoad AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call NameLoad BinOpAdd Call AttributeLoad NameLoad attr Str Str Str TryFinally body Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Print Str finalbody Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr TupleLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str If CompareGt Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Num body Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Num Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr TupleLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str If CompareGt Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Num body Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Num Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr TupleLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str If CompareGt Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Num body Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Num Assign NameStore ListComp SubscriptLoad NameLoad Index Num comprehension NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num For NameStore Call NameLoad Num body Assign SubscriptStore NameLoad Index NameLoad ListComp SubscriptLoad NameLoad Index Num comprehension NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If SubscriptLoad AttributeLoad NameLoad attr Index NameLoad body Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad SubscriptLoad NameLoad Index NameLoad Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Num Call NameLoad Num SubscriptLoad NameLoad Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Call NameLoad AttributeLoad NameLoad attr If CompareGt Call NameLoad NameLoad Num body Assign NameStore Call NameLoad keyword SubscriptLoad SubscriptLoad NameLoad Index Num Index Num keyword SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Num Index Num keyword SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Num Index Num keyword SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Num Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body For NameStore NameLoad body If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad Str body Assign NameStore Call NameLoad NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpMod Str NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A  
A serial port packet monitor that plots live data using PyQwt.

The monitor expects to receive 8 bytes data packets with a line return
as a packet EOF on the serial port.
Each received packet is analysed to extract gx, gy and gz.

When the monitor is active, you can turn the 'Update speed' knob
to control the frequency of screen updates.

Code herited from Eli Bendersky (eliben@gmail.com)
License: this code is in the public domain
Last modified: 07.08.2009
 N/A random sys Queue serial glob os csv time N/A PyQt4.Qwt5 Qwt PyQt4.QtCore * PyQt4.QtGui * com_monitor ComMonitorThread globals * PlottingDataMonitor N/A QMainWindow N/A __init__ N/A N/A self parent N/A None N/A N/A N/A N/A N/A super PlottingDataMonitor self __init__ parent N/A N/A N/A self setWindowTitle ADXL345 Realtime Monitor N/A N/A N/A self resize 800 600 N/A N/A self port N/A N/A self baudrate 9600 N/A N/A self monitor_active False N/A N/A self com_monitor None N/A N/A self com_data_q None N/A N/A self com_error_q None N/A N/A self livefeed N/A LiveDataFeed N/A N/A self timer N/A QTimer N/A N/A self g_samples N/A N/A N/A N/A N/A N/A self curve N/A N/A None 3 N/A N/A self gcurveOn N/A N/A 1 3 N/A N/A self csvdata N/A N/A N/A N/A self create_menu N/A N/A N/A self create_main_frame N/A N/A N/A self create_status_bar N/A N/A N/A self connect N/A self button_Connect N/A SIGNAL clicked() N/A self OnStart N/A N/A N/A self connect N/A self button_Disconnect N/A SIGNAL clicked() N/A self OnStop N/A create_com_box N/A N/A self N/A N/A N/A  
        Purpose:   create the serial com groupbox
        Return:    return a layout of the serial com
         N/A N/A self com_box N/A QGroupBox COM Configuration N/A com_layout N/A QGridLayout N/A N/A self radio9600 N/A QRadioButton 9600 N/A N/A N/A N/A self radio9600 setChecked 1 N/A N/A self radio19200 N/A QRadioButton 19200 N/A N/A self Com_ComboBox N/A QComboBox N/A N/A N/A com_layout addWidget N/A self Com_ComboBox 0 0 1 2 N/A N/A N/A com_layout addWidget N/A self radio9600 1 0 N/A N/A N/A com_layout addWidget N/A self radio19200 1 1 N/A N/A N/A self fill_ports_combobox N/A N/A self button_Connect N/A QPushButton Start N/A N/A self button_Disconnect N/A QPushButton Stop N/A N/A N/A N/A self button_Disconnect setEnabled False N/A N/A N/A com_layout addWidget N/A self button_Connect 0 2 N/A N/A N/A com_layout addWidget N/A self button_Disconnect 1 2 N/A com_layout N/A create_plot N/A N/A self N/A N/A N/A  
        Purpose:   create the pyqwt plot
        Return:    return a list containing the plot and the list of the curves
         N/A plot N/A N/A Qwt QwtPlot self N/A N/A N/A plot setCanvasBackground N/A Qt black N/A N/A N/A plot setAxisTitle N/A N/A Qwt QwtPlot xBottom Time N/A N/A N/A plot setAxisScale N/A N/A Qwt QwtPlot xBottom 0 10 1 N/A N/A N/A plot setAxisTitle N/A N/A Qwt QwtPlot yLeft Acceleration N/A N/A N/A plot setAxisScale N/A N/A Qwt QwtPlot yLeft YMIN YMAX N/A N/A YMAX YMIN 10 N/A N/A N/A plot replot N/A curve N/A N/A None 3 N/A pen N/A N/A QPen N/A QColor limegreen N/A QPen N/A QColor red N/A QPen N/A QColor yellow N/A i N/A range 3 N/A N/A N/A curve N/A i N/A N/A Qwt QwtPlotCurve N/A N/A N/A N/A curve N/A i setRenderHint N/A N/A Qwt QwtPlotItem RenderAntialiased N/A N/A N/A N/A pen N/A i setWidth 2 N/A N/A N/A N/A curve N/A i setPen N/A pen N/A i N/A N/A N/A N/A curve N/A i attach plot N/A N/A plot curve N/A create_knob N/A N/A self N/A N/A N/A  
        Purpose:   create a knob
        Return:    return a the knob widget
         N/A knob N/A N/A Qwt QwtKnob self N/A N/A N/A knob setRange 0 180 0 1 N/A N/A N/A knob setScaleMaxMajor 10 N/A N/A N/A knob setKnobWidth 50 N/A N/A N/A knob setValue 10 N/A knob N/A create_status_bar N/A N/A self N/A N/A N/A N/A self status_text N/A QLabel Monitor idle N/A N/A N/A N/A N/A self statusBar addWidget N/A self status_text 1 N/A create_checkbox N/A N/A self label color connect_fn connect_param N/A N/A N/A  
        Purpose:    create a personalized checkbox
        Input:      the label, color, activated function and the transmitted parameter
        Return:     return a checkbox widget
         N/A checkBox N/A QCheckBox label N/A N/A N/A checkBox setChecked 1 N/A N/A N/A checkBox setFont N/A QFont Arial pointSize 12 weight N/A QFont Bold N/A green N/A QPalette N/A N/A N/A green setColor N/A QPalette Foreground color N/A N/A N/A checkBox setPalette green N/A N/A N/A self connect checkBox N/A SIGNAL clicked() N/A partial connect_fn connect_param N/A checkBox N/A create_main_frame N/A N/A self N/A N/A N/A  
        Purpose:    create the main frame Qt widget
         N/A portname_layout N/A N/A self create_com_box N/A N/A N/A N/A self com_box setLayout portname_layout N/A N/A self updatespeed_knob N/A N/A self create_knob N/A N/A N/A self connect N/A self updatespeed_knob N/A SIGNAL valueChanged(double) N/A self on_knob_change N/A N/A self knob_l N/A QLabel N/A Update speed = %s (Hz) N/A N/A N/A self updatespeed_knob value N/A N/A N/A N/A self knob_l setAlignment N/A N/A Qt AlignTop N/A Qt AlignHCenter N/A N/A N/A self plot N/A self curve N/A N/A self create_plot N/A N/A self max_spin N/A QSpinBox N/A N/A N/A N/A self max_spin setMaximum 1000 N/A N/A N/A N/A self max_spin setValue 1000 N/A spins_hbox N/A QHBoxLayout N/A N/A N/A spins_hbox addWidget N/A QLabel Save every N/A N/A N/A spins_hbox addWidget N/A self max_spin N/A N/A N/A spins_hbox addWidget N/A QLabel Lines N/A N/A self gCheckBox N/A N/A N/A self create_checkbox Acceleration(x) N/A Qt green N/A self activate_curve 0 N/A N/A self create_checkbox Acceleration(y) N/A Qt red N/A self activate_curve 1 N/A N/A self create_checkbox Acceleration(z) N/A Qt yellow N/A self activate_curve 2 N/A N/A self button_clear N/A QPushButton Clear screen N/A N/A N/A self connect N/A self button_clear N/A SIGNAL clicked() N/A self clear_screen N/A plot_layout N/A QGridLayout N/A N/A N/A plot_layout addWidget N/A self plot 0 0 8 7 N/A N/A N/A plot_layout addWidget N/A N/A self gCheckBox N/A 0 0 8 N/A N/A N/A plot_layout addWidget N/A N/A self gCheckBox N/A 1 1 8 N/A N/A N/A plot_layout addWidget N/A N/A self gCheckBox N/A 2 2 8 N/A N/A N/A plot_layout addWidget N/A self button_clear 3 8 N/A N/A N/A plot_layout addLayout spins_hbox 4 8 N/A N/A N/A plot_layout addWidget N/A self updatespeed_knob 5 8 N/A N/A N/A plot_layout addWidget N/A self knob_l 6 8 N/A plot_groupbox N/A QGroupBox Acceleration N/A N/A N/A plot_groupbox setLayout plot_layout N/A N/A self main_frame N/A QWidget N/A main_layout N/A QVBoxLayout N/A N/A N/A main_layout addWidget N/A self com_box N/A N/A N/A main_layout addWidget plot_groupbox N/A N/A N/A main_layout addStretch 1 N/A N/A N/A N/A self main_frame setLayout main_layout N/A N/A N/A self setCentralWidget N/A self main_frame N/A clear_screen N/A N/A self N/A N/A N/A N/A g_samples N/A 0 N/A N/A activate_curve N/A N/A self axe N/A N/A N/A N/A N/A N/A N/A self gCheckBox N/A axe isChecked N/A N/A N/A N/A self gcurveOn N/A axe 1 N/A N/A N/A N/A self gcurveOn N/A axe 0 N/A create_menu N/A N/A self N/A N/A N/A N/A self file_menu N/A N/A N/A N/A self menuBar addMenu &File N/A selectport_action N/A N/A self create_action Select COM &Port... shortcut Ctrl+P slot N/A self on_select_port tip Select a COM port N/A N/A self start_action N/A N/A self create_action &Start monitor shortcut Ctrl+M slot N/A self OnStart tip Start the data monitor N/A N/A self stop_action N/A N/A self create_action &Stop monitor shortcut Ctrl+T slot N/A self OnStop tip Stop the data monitor N/A exit_action N/A N/A self create_action E&xit slot N/A self close shortcut Ctrl+X tip Exit the application N/A N/A N/A N/A self start_action setEnabled False N/A N/A N/A N/A self stop_action setEnabled False N/A N/A N/A self add_actions N/A self file_menu N/A selectport_action N/A self start_action N/A self stop_action None exit_action N/A N/A self help_menu N/A N/A N/A N/A self menuBar addMenu &Help N/A about_action N/A N/A self create_action &About shortcut F1 slot N/A self on_about tip About the monitor N/A N/A N/A self add_actions N/A self help_menu N/A about_action N/A set_actions_enable_state N/A N/A self N/A N/A N/A N/A N/A N/A N/A self portname text N/A N/A start_enable stop_enable False N/A N/A start_enable N/A N/A self monitor_active N/A stop_enable N/A self monitor_active N/A N/A N/A N/A self start_action setEnabled start_enable N/A N/A N/A N/A self stop_action setEnabled stop_enable N/A on_about N/A N/A self N/A N/A N/A msg __doc__ N/A N/A N/A QMessageBox about self About the demo N/A N/A msg strip N/A on_select_port N/A N/A self N/A N/A N/A ports N/A enumerate_serial_ports N/A N/A N/A len ports 0 N/A N/A N/A N/A QMessageBox critical self No ports No serial ports found N/A N/A N/A item ok N/A N/A QInputDialog getItem self Select a port Serial port: ports 0 False N/A N/A ok N/A N/A N/A item isEmpty N/A N/A N/A N/A N/A self portname setText item N/A N/A N/A self set_actions_enable_state N/A fill_ports_combobox N/A N/A self N/A N/A N/A  Purpose: rescan the serial port com and update the combobox
         N/A vNbCombo N/A N/A N/A N/A self Com_ComboBox clear N/A N/A self AvailablePorts N/A enumerate_serial_ports N/A value N/A self AvailablePorts N/A N/A N/A N/A N/A self Com_ComboBox addItem value N/A vNbCombo N/A value  -  N/A vNbCombo N/A vNbCombo N/A -3 N/A N/A debug N/A --> Les ports series disponibles sont: %s  vNbCombo N/A OnStart N/A N/A self N/A N/A N/A  Start the monitor: com_monitor thread and the update timer     
         N/A N/A N/A N/A self radio19200 isChecked N/A N/A N/A self baudrate 19200 N/A --> baudrate is 19200 bps N/A N/A N/A N/A self radio9600 isChecked N/A N/A N/A self baudrate 9600 N/A --> baudrate is 9600 bps N/A vNbCombo N/A N/A N/A self Com_ComboBox currentIndex N/A N/A self port N/A N/A self AvailablePorts N/A vNbCombo N/A N/A N/A N/A self button_Connect setEnabled False N/A N/A N/A N/A self button_Disconnect setEnabled True N/A N/A N/A N/A self Com_ComboBox setEnabled False N/A N/A self data_q N/A N/A Queue Queue N/A N/A self error_q N/A N/A Queue Queue N/A N/A self com_monitor N/A ComMonitorThread N/A self data_q N/A self error_q N/A self port N/A self baudrate N/A N/A N/A N/A self com_monitor start N/A com_error N/A get_item_from_queue N/A self error_q N/A N/A com_error None N/A N/A N/A N/A QMessageBox critical self ComMonitorThread error com_error N/A N/A self com_monitor None N/A N/A self monitor_active True N/A N/A N/A self connect N/A self timer N/A SIGNAL timeout() N/A self on_timer N/A update_freq N/A N/A N/A self updatespeed_knob value N/A N/A update_freq 0 N/A N/A N/A N/A N/A self timer start N/A 1000.0 update_freq N/A N/A N/A N/A self status_text setText Monitor running N/A N/A debug --> Monitor running N/A OnStop N/A N/A self N/A N/A N/A  Stop the monitor
         N/A N/A N/A self com_monitor None N/A N/A N/A N/A N/A self com_monitor join 1000 N/A N/A self com_monitor None N/A N/A self monitor_active False N/A N/A N/A N/A self button_Connect setEnabled True N/A N/A N/A N/A self button_Disconnect setEnabled False N/A N/A N/A N/A self Com_ComboBox setEnabled True N/A N/A N/A N/A self timer stop N/A N/A N/A N/A self status_text setText Monitor idle N/A N/A debug --> Monitor idle N/A on_timer N/A N/A self N/A N/A N/A  Executed periodically when the monitor update timer
            is fired.
         N/A N/A N/A self read_serial_data N/A N/A N/A self update_monitor N/A on_knob_change N/A N/A self N/A N/A N/A  When the knob is rotated, it sets the update interval
            of the timer.
         N/A update_freq N/A N/A N/A self updatespeed_knob value N/A N/A N/A N/A self knob_l setText N/A Update speed = %s (Hz) N/A N/A N/A self updatespeed_knob value N/A N/A N/A N/A self timer isActive N/A N/A update_freq N/A max 0.01 update_freq N/A N/A N/A N/A self timer setInterval N/A 1000.0 update_freq N/A update_monitor N/A N/A self N/A N/A N/A  Updates the state of the monitor window with new 
            data. The livefeed is used to find out whether new
            data was received since the last update. If not, 
            nothing is updated.
         N/A N/A N/A self livefeed has_new_data N/A N/A data N/A N/A N/A self livefeed read_data N/A N/A N/A N/A self csvdata append N/A N/A data N/A timestamp N/A data N/A gx N/A data N/A gy N/A data N/A gz N/A N/A N/A len N/A self csvdata N/A N/A N/A self max_spin value N/A N/A f N/A open N/A N/A N/A time strftime %H%M%S .csv wt N/A N/A N/A writer N/A N/A csv writer f N/A i N/A range N/A N/A N/A self max_spin value N/A N/A N/A N/A writer writerow N/A N/A self csvdata N/A i N/A transfert data to csv after 1000 samples N/A N/A N/A N/A f close N/A N/A self csvdata N/A N/A N/A N/A N/A N/A self g_samples N/A 0 append N/A N/A data N/A timestamp N/A data N/A gx N/A N/A N/A len N/A N/A self g_samples N/A 0 100 N/A N/A N/A N/A N/A N/A self g_samples N/A 0 pop 0 N/A N/A N/A N/A N/A self g_samples N/A 1 append N/A N/A data N/A timestamp N/A data N/A gy N/A N/A N/A len N/A N/A self g_samples N/A 1 100 N/A N/A N/A N/A N/A N/A self g_samples N/A 1 pop 0 N/A N/A N/A N/A N/A self g_samples N/A 2 append N/A N/A data N/A timestamp N/A data N/A gz N/A N/A N/A len N/A N/A self g_samples N/A 2 100 N/A N/A N/A N/A N/A N/A self g_samples N/A 2 pop 0 N/A tdata N/A N/A s N/A 0 N/A s N/A N/A self g_samples N/A 2 N/A i N/A range 3 N/A N/A N/A data N/A i N/A N/A s N/A 1 N/A s N/A N/A self g_samples N/A i N/A N/A N/A self gcurveOn N/A i N/A N/A N/A N/A N/A N/A self curve N/A i setData tdata N/A data N/A i N/A 
            debug("xdata", data[0])
            debug("ydata", data[1])
            debug("tdata", data[2])
             N/A N/A N/A N/A self plot setAxisScale N/A N/A Qwt QwtPlot xBottom N/A tdata N/A 0 N/A max 5 N/A tdata N/A -1 N/A N/A N/A N/A self plot replot N/A read_serial_data N/A N/A self N/A N/A N/A  Called periodically by the update timer to read data
            from the serial port.
         N/A qdata N/A list N/A get_all_from_queue N/A self data_q N/A N/A N/A len qdata 0 N/A N/A data N/A dict timestamp N/A N/A qdata N/A -1 N/A 1 gx N/A N/A N/A qdata N/A -1 N/A 0 N/A 0 gy N/A N/A N/A qdata N/A -1 N/A 0 N/A 1 gz N/A N/A N/A qdata N/A -1 N/A 0 N/A 2 N/A N/A N/A N/A self livefeed add_data data N/A add_actions N/A N/A self target actions N/A N/A N/A action actions N/A N/A N/A action None N/A N/A N/A N/A target addSeparator N/A N/A N/A N/A target addAction action N/A create_action N/A N/A self text slot shortcut icon tip checkable signal N/A None None None None False triggered() N/A N/A action N/A QAction text self N/A N/A icon None N/A N/A N/A N/A action setIcon N/A QIcon N/A :/%s.png icon N/A N/A shortcut None N/A N/A N/A N/A action setShortcut shortcut N/A N/A tip None N/A N/A N/A N/A action setToolTip tip N/A N/A N/A action setStatusTip tip N/A N/A slot None N/A N/A N/A N/A self connect action N/A SIGNAL signal slot N/A checkable N/A N/A N/A N/A action setCheckable True N/A action N/A N/A main N/A N/A N/A N/A N/A app N/A QApplication N/A sys argv N/A form N/A PlottingDataMonitor N/A N/A N/A form show N/A N/A N/A app exec_ N/A N/A N/A __name__ __main__ N/A N/A N/A main