Skip to content

Commit 1e64163

Browse files
committed
update clue metal detector for ulab renames
1 parent d1f7491 commit 1e64163

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

CLUE_Metal_Detector/clue-metal-detector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ def sample_sum(pin, num):
523523
# Keep some historical voltage data to calculate median for re-baselining
524524
# aiming for about 10 reads per second so this gives
525525
# 20 seconds
526-
voltage_hist = ulab.zeros(20 * 10 + 1, dtype=ulab.float)
526+
voltage_hist = ulab.numpy.zeros(20 * 10 + 1, dtype=ulab.numpy.float)
527527
voltage_hist_idx = 0
528528
voltage_hist_complete = False
529529
voltage_hist_median = None
@@ -699,7 +699,7 @@ def sample_sum(pin, num):
699699

700700
# Adjust the reference base_voltage to the median of historical values
701701
if voltage_hist_complete and update_median:
702-
voltage_hist_median = ulab.numerical.sort(voltage_hist)[len(voltage_hist) // 2]
702+
voltage_hist_median = ulab.numpy.sort(voltage_hist)[len(voltage_hist) // 2]
703703
base_voltage = voltage_hist_median
704704

705705
d_print(2, counter, sample_start_time_ns / 1e9,

0 commit comments

Comments
 (0)