File tree Expand file tree Collapse file tree 3 files changed +4
-9
lines changed Expand file tree Collapse file tree 3 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ pub trait PicoDriver: fmt::Debug + Send + Sync {
205
205
_stop_delta_phase : u32 ,
206
206
_delta_phase_increment : u32 ,
207
207
_dwell_count : u32 ,
208
- _arbitrary_waveform : & Vec < i16 > ,
208
+ _arbitrary_waveform : & mut Vec < i16 > ,
209
209
_sweep_type : PicoSweepType ,
210
210
_operation : PicoExtraOperations ,
211
211
_index_mode : PicoIndexMode ,
Original file line number Diff line number Diff line change @@ -364,7 +364,7 @@ impl PicoDriver for PS2000ADriver {
364
364
stop_delta_phase : u32 ,
365
365
delta_phase_increment : u32 ,
366
366
dwell_count : u32 ,
367
- arbitrary_waveform : & Vec < i16 > ,
367
+ arbitrary_waveform : & mut Vec < i16 > ,
368
368
sweep_type : PicoSweepType ,
369
369
operation : PicoExtraOperations ,
370
370
index_mode : PicoIndexMode ,
@@ -373,11 +373,6 @@ impl PicoDriver for PS2000ADriver {
373
373
trigger_source : PicoSigGenTrigSource ,
374
374
ext_in_threshold : i16 ,
375
375
) -> PicoResult < ( ) > {
376
- // TODO: no idea how to do this better
377
- // to avoid the data being taken away, store a copy here?
378
- // go read the SDK to see if the memory is caller responsibility or
379
- // copied by the library.
380
- let mut arbitrary_waveform = arbitrary_waveform. clone ( ) ;
381
376
PicoStatus :: from ( unsafe {
382
377
self . bindings . ps2000aSetSigGenArbitrary (
383
378
handle,
Original file line number Diff line number Diff line change @@ -679,7 +679,7 @@ impl PicoStreamingDevice {
679
679
#[ tracing:: instrument( skip( self ) , level = "trace" ) ]
680
680
pub fn set_sig_gen_arbitrary (
681
681
& self ,
682
- props : SetSigGenArbitraryProperties ,
682
+ mut props : SetSigGenArbitraryProperties ,
683
683
) -> PicoResult < ( ) > {
684
684
// Start an AWG function
685
685
let current_state = self . current_state . write ( ) ;
@@ -730,7 +730,7 @@ impl PicoStreamingDevice {
730
730
stop_delta_phase,
731
731
delta_phase_increment,
732
732
dwell_count,
733
- & props. arbitrary_waveform ,
733
+ & mut props. arbitrary_waveform ,
734
734
props. sweep_type ,
735
735
props. extra_operations ,
736
736
index_mode,
You can’t perform that action at this time.
0 commit comments