Skip to content

Commit

Permalink
changed calibration and scale to have usr input rather than args for …
Browse files Browse the repository at this point in the history
…easier bat file creation
  • Loading branch information
rclarke0 committed May 2, 2024
1 parent 926ef09 commit c038f7a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 29 deletions.
11 changes: 2 additions & 9 deletions abr-testing/abr_testing/data_collection/abr_calibration_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,18 +155,10 @@ def upload_calibration_offsets(
parser.add_argument(
"email", metavar="EMAIL", type=str, nargs=1, help="opentrons gmail."
)
parser.add_argument(
"ip_or_all",
metavar="IP_OR_ALL",
type=str,
nargs=1,
help="Enter 'ALL' to read IPs.json or type full IP address of 1 robot.",
)
args = parser.parse_args()
storage_directory = args.storage_directory[0]
folder_name = args.folder_name[0]
google_sheet_name = args.google_sheet_name[0]
ip_or_all = args.ip_or_all[0]
email = args.email[0]
# Connect to google drive.
try:
Expand All @@ -191,7 +183,8 @@ def upload_calibration_offsets(
except FileNotFoundError:
print(f"Add .json file with robot IPs to: {storage_directory}.")
sys.exit()

ip_or_all = input("IP Address or ALL: ")

if ip_or_all == "ALL":
ip_address_list = ip_file["ip_address_list"]
for ip in ip_address_list:
Expand Down
22 changes: 3 additions & 19 deletions abr-testing/abr_testing/tools/abr_scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,7 @@
nargs=1,
help="Name of google sheet and local csv to save data to.",
)
parser.add_argument("robot", metavar="ROBOT", type=str, nargs=1, help="Robot name.")
parser.add_argument(
"labware_name",
metavar="LABWARE_NAME",
type=str,
nargs=1,
help="Name of labware.",
)
parser.add_argument(
"protocol_step",
metavar="PROTOCOL_STEP",
type=str,
nargs=1,
help="1 for empty plate, 2 for filled plate, 3 for end of protocol.",
)
args = parser.parse_args()
robot = args.robot[0]
labware = args.labware_name[0]
protocol_step = args.protocol_step[0]
storage_directory = args.storage_directory[0]
file_name = args.file_name[0]
file_name_csv = file_name + ".csv"
Expand Down Expand Up @@ -71,7 +53,9 @@
print("Connected to google sheet.")
except FileNotFoundError:
print("No google sheets credentials. Add credentials to storage notebook.")

robot = input("Robot: ")
labware = input("Labware: ")
protocol_step = input("Measurement Step (1,2,3): ")
# Scale Loop
grams, is_stable = scale.read_mass()
grams, is_stable = scale.read_mass()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, robot: str, duration: int, frequency: int) -> None:
test_name = "ABR-Environment-Monitoring"
run_id = data.create_run_id()
file_name = data.create_file_name(test_name, run_id, robot)
sensor = asair_sensor.BuildAsairSensor(False, True)
sensor = asair_sensor.BuildAsairSensor(False, False)
print(sensor)
env_data = sensor.get_reading()
header = [
Expand Down

0 comments on commit c038f7a

Please sign in to comment.