Skip to content

Commit 1ecb2bf

Browse files
author
neil.hamilton
committed
Update functionsExhibitions.py
1 parent 393f3d0 commit 1ecb2bf

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

picosdk/functionsExhibitions.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import numpy as np
66
import openpyxl
77
from math import floor, log2, log10
8+
import shutil
9+
import os
810

911
def dataImporter(name):
1012

@@ -100,9 +102,9 @@ def BitEnumSelector(bits):
100102

101103
return enum
102104

103-
def saveConfigFile(channels, bits, sampleRate,captureLength, maxAmplitude, segments):
105+
def saveConfigFile(channels, bits, sampleRate,captureLength, segments):
104106

105-
configValues = [channels, bits, sampleRate, captureLength, maxAmplitude, segments]
107+
configValues = [channels, bits, sampleRate, captureLength, segments]
106108

107109
# Save the list to a text file
108110
with open('configValues.txt', 'w') as file:
@@ -129,7 +131,19 @@ def loadConfigValues():
129131
bits = restored_configValues[1]
130132
sampleRate = restored_configValues[2]
131133
captureLength = restored_configValues[3]
132-
maxAmplitude = restored_configValues[4]
133134
segments = restored_configValues[5]
134135

135-
return channels, bits, sampleRate, captureLength, maxAmplitude, segments
136+
return channels, bits, sampleRate, captureLength, segments
137+
138+
def copyFile(source_directory, filename):
139+
140+
destination_directory = 'D:/'
141+
142+
# Define the destination file path
143+
source_file = os.path.join(source_directory, filename)
144+
destination_file = os.path.join(destination_directory, filename)
145+
146+
# Copy the file to the new location
147+
shutil.copy(source_file, destination_file)
148+
149+
return

0 commit comments

Comments
 (0)