@@ -24,8 +24,8 @@ def main():
2424 """Main function"""
2525
2626 # initialize plot helper the handle plot specific things
27- plot_helper = FastPlotLibHelper ({0 : ["BI " , "b" ], 1 : ["EMG1 " , "r" ], 2 : ["EMG2 " , "y" ],\
28- 3 : ["Breathing" , "g" ], 4 : [ "Temperature" , "w " ]}, 1000 )
27+ plot_helper = FastPlotLibHelper ({0 : ["Channel 1 " , "b" ], 1 : ["Channel 2 " , "r" ], 2 : ["Channel 3 " , "y" ],\
28+ 3 : ["Channel 4" , "g " ]}, 1000 )
2929 # flag to indicate
3030 is_window_open : bool = True
3131
@@ -53,7 +53,7 @@ async def device_communication() -> int:
5353 # call init with lowest sample rate and enable signal types
5454 init_params = DyscomInitParams ()
5555 init_params .signal_type = [DyscomSignalType .BI , DyscomSignalType .EMG_1 ,\
56- DyscomSignalType .EMG_2 , DyscomSignalType .BREATHING , DyscomSignalType . TEMPERATURE ]
56+ DyscomSignalType .EMG_2 , DyscomSignalType .BREATHING ]
5757 init_params .register_map_ads129x .config_register_1 .output_data_rate = Ads129xOutputDataRate .HR_MODE_500_SPS__LP_MODE_250_SPS
5858 init_params .register_map_ads129x .config_register_1 .power_mode = Ads129xPowerMode .LOW_POWER
5959 await dyscom .init (init_params )
@@ -93,8 +93,8 @@ async def device_communication() -> int:
9393 print (f"SendLiveData status error { sld .samples } " )
9494 break
9595
96- for x , sample in enumerate ( sld . samples ):
97- plot_helper .append_value (x , sample .value )
96+ for x in range ( 4 ):
97+ plot_helper .append_value (x , sld . samples [ x ] .value )
9898
9999 plot_helper .update ()
100100 else :
0 commit comments