@@ -346,9 +346,13 @@ def _register_basic_callbacks(self):
346346
347347 self .register_config_callback (CBPacketType .CHANREPAINP , self ._handle_chaninfo )
348348 self .register_config_callback (CBPacketType .CHANREPSPKTHR , self ._handle_chaninfo )
349- self .register_config_callback (CBPacketType .CHANREPNTRODEGROUP , self ._handle_chaninfo )
349+ self .register_config_callback (
350+ CBPacketType .CHANREPNTRODEGROUP , self ._handle_chaninfo
351+ )
350352 self .register_config_callback (CBPacketType .CHANREPDISP , self ._handle_chaninfo )
351- self .register_config_callback (CBPacketType .CHANREPUNITOVERRIDES , self ._handle_chaninfo )
353+ self .register_config_callback (
354+ CBPacketType .CHANREPUNITOVERRIDES , self ._handle_chaninfo
355+ )
352356
353357 self .register_config_callback (CBPacketType .GROUPREP , self ._handle_groupinfo )
354358 self .register_config_callback (CBPacketType .PROCREP , self ._handle_procinfo )
@@ -400,7 +404,9 @@ def _handle_sysrep(self, pkt):
400404 def _handle_chaninfo (self , pkt ):
401405 # If this config packet is limited in scope then it might have some garbage data in its out-of-scope payload.
402406 # We should update our config, but only the parts that this REP packet is scoped to.
403- if (pkt .header .instrument != self ._config ["instrument" ]) or (pkt .chan > self ._config ["proc_chans" ]):
407+ if (pkt .header .instrument != self ._config ["instrument" ]) or (
408+ pkt .chan > self ._config ["proc_chans" ]
409+ ):
404410 # Drop channels that do not belong to this instrument
405411 pass
406412 elif pkt .header .type in [CBPacketType .CHANREP ]:
@@ -446,7 +452,10 @@ def _handle_chaninfo(self, pkt):
446452 elif pkt .header .type == CBPacketType .CHANREPLABEL :
447453 self ._config ["channel_infos" ][pkt .chan ].label = pkt .label
448454 self ._config ["channel_infos" ][pkt .chan ].userflags = pkt .userflags
449- elif pkt .header .type in [CBPacketType .CHANSETSPKTHR , CBPacketType .CHANREPSPKTHR ]:
455+ elif pkt .header .type in [
456+ CBPacketType .CHANSETSPKTHR ,
457+ CBPacketType .CHANREPSPKTHR ,
458+ ]:
450459 self ._config ["channel_infos" ][pkt .chan ].spkthrlevel = pkt .spkthrlevel
451460 elif pkt .header .type == CBPacketType .CHANREPNTRODEGROUP :
452461 # TODO: from use pkt.spkgroup
@@ -502,7 +511,7 @@ def _handle_procmon(self, pkt):
502511 f";\t counter - { pkt .counter if has_counter else 'N/A' } "
503512 f";\t delta - { pkt_delta } "
504513 f";\t sent - { pkt .sentpkts } "
505- f";\t rate (pkt/samp) - { pkt_delta / update_interval } "
514+ f";\t rate (pkt/samp) - { pkt_delta / update_interval } "
506515 )
507516 self ._monitor_state = {
508517 "counter" : pkt .counter if has_counter else - 1 ,
0 commit comments