fix file load

This commit is contained in:
Brendan Haines 2020-03-02 22:19:21 -07:00
parent e4cc932d1a
commit 753d7473b1

View File

@ -40,12 +40,12 @@ servos[2].throttle = 0
# Initialize calibration # Initialize calibration
try: try:
white_cal = np.loadtxt('cal_white.txt') white_cal = np.loadtxt('cal_white.txt')
except FileNotFoundError: except IOError:
white_cal = [0]*8 white_cal = [0]*8
try: try:
black_cal = np.loadtxt('cal_black.txt') black_cal = np.loadtxt('cal_black.txt')
except FileNotFoundError: except IOError:
black_cal = [5]*8 black_cal = [5]*8
def get_reflectivity(chan): def get_reflectivity(chan):