@@ -593,7 +593,7 @@ impl PicoStreamingDevice {
593593 trigger_source : PicoSigGenTrigSource ,
594594 ext_in_threshold : i16
595595 ) {
596- let current_state = self . current_state . write ( ) ;
596+ let current_state = self . current_state . read ( ) ;
597597 let handle = match current_state. clone ( ) {
598598 State :: Closed => {
599599 panic ! ( "attempt to sig gen on closed device, no handle" ) ;
@@ -628,7 +628,7 @@ impl PicoStreamingDevice {
628628 & self ,
629629 state : i16 ,
630630 ) -> PicoResult < ( ) > {
631- let current_state = self . current_state . write ( ) ;
631+ let current_state = self . current_state . read ( ) ;
632632 let handle = match current_state. clone ( ) {
633633 State :: Closed => {
634634 panic ! ( "attempt to sig gen on closed device, no handle" ) ;
@@ -653,7 +653,7 @@ impl PicoStreamingDevice {
653653 & self ,
654654 props : SetSigGenBuiltInV2Properties ,
655655 ) -> PicoResult < ( ) > {
656- let current_state = self . current_state . write ( ) ;
656+ let current_state = self . current_state . read ( ) ;
657657 let handle = match current_state. clone ( ) {
658658 State :: Closed => {
659659 panic ! ( "attempt to sig gen on closed device, no handle" ) ;
@@ -678,7 +678,7 @@ impl PicoStreamingDevice {
678678 pub fn sig_gen_arbitrary_min_max_values (
679679 & self
680680 ) -> PicoResult < SigGenArbitraryMinMaxValues > {
681- let current_state = self . current_state . write ( ) ;
681+ let current_state = self . current_state . read ( ) ;
682682 let handle = match current_state. clone ( ) {
683683 State :: Closed => {
684684 panic ! ( "attempt to sig gen on closed device, no handle" ) ;
@@ -704,7 +704,7 @@ impl PicoStreamingDevice {
704704 mut props : SetSigGenArbitraryProperties ,
705705 ) -> PicoResult < ( ) > {
706706 // Start an AWG function
707- let current_state = self . current_state . write ( ) ;
707+ let current_state = self . current_state . read ( ) ;
708708 let handle = match current_state. clone ( ) {
709709 State :: Closed => {
710710 panic ! ( "attempt to sig gen on closed device, no handle" ) ;
0 commit comments