From 3e114fd4fadcc30ada520802f7aaddedfc2311ff Mon Sep 17 00:00:00 2001 From: Brendan Haines Date: Mon, 2 Mar 2020 20:07:07 -0700 Subject: [PATCH] fix data append --- 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 6cb9f1a..be65dcd 100644 --- a/Software/python/hwtest.py +++ b/Software/python/hwtest.py @@ -106,13 +106,13 @@ def control_thread(): if time_data.shape[0] == 0: this_time = 0 else: - this_time = t[-1, 0] + sample_interval + this_time = time_data[-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) # TODO: implement control stuff and drive outputs - new_time_data = [this_time, line_position] + new_time_data = [[this_time, line_position]] time_data = np.concatenate((time_data, new_time_data)) if DEBUG: