From c9cfd677f0b795ede43d5af46edb899517c9646d Mon Sep 17 00:00:00 2001 From: Brendan Haines Date: Mon, 2 Mar 2020 20:03:17 -0700 Subject: [PATCH] fix another old variable name --- Software/python/hwtest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Software/python/hwtest.py b/Software/python/hwtest.py index e1b6736..6cb9f1a 100644 --- a/Software/python/hwtest.py +++ b/Software/python/hwtest.py @@ -103,10 +103,10 @@ def control_thread(): while True: # TODO: replace sleep statement with something that doesn't depend on execution time of loop time.sleep(sample_interval) - if len(t) == 0: + if time_data.shape[0] == 0: this_time = 0 else: - this_time = t[-1] + sample_interval + this_time = t[-1, 0] + sample_interval brightness = np.clip([get_normalized_reflectivity(c) for c in range(8)], 0, 1) line_position = np.sum((1 - brightness) * (np.arange(8) - 3.5))/np.sum(1-brightness)