Fixed wrong values being sent to jawOpen

This commit is contained in:
Rames The Generic committed 2023-05-11 23:39:13 -04:00
1 parent d5c008a823
commit c93ebb3a70
1 file changed
+6 -8
+6 -8
View File
@@ -58,8 +58,6 @@ class Calibration(object):
self._last_update = os.fstat(user_file.fileno()).st_mtime
self.jsonminmax = [
[self.calib["cheekPuff"]["min"],self.calib["cheekPuff"]["max"]], # CheekPuff
[self.calib["cheekSquintLeft"]["min"],self.calib["cheekSquintLeft"]["max"]], # cheekSquintLeft
[self.calib["cheekSquintRight"]["min"],self.calib["cheekSquintRight"]["max"]], # cheekSquintRight
[self.calib["noseSneerLeft"]["min"],self.calib["noseSneerLeft"]["max"]], # noseSneerLeft
[self.calib["noseSneerRight"]["min"],self.calib["noseSneerRight"]["max"]], # noseSneerRight
[self.calib["jawOpen"]["min"],self.calib["jawOpen"]["max"]], # jawOpen
@@ -285,12 +283,12 @@ while True:
for i in range(len(output)): # Clip values between 0 - 1
output[i] = max(min(output[i], 1), 0)
client.send_message(location + "/cheekPuff", array[0] * multi)
client.send_message(location + "/noseSneerLeft", output[1] * multi)
client.send_message(location + "/noseSneerRight", output[2] * multi)
client.send_message(location + "/jawOpen", array[3] * multi)
client.send_message(location + "/jawForward", array[4] * multi)
client.send_message(location + "/jawLeft", array[5] * multi)
client.send_message(location + "/jawRight", array[6] * multi)
client.send_message(location + "/noseSneerLeft", output[5] * multi)
client.send_message(location + "/noseSneerRight", output[6] * multi)
client.send_message(location + "/jawOpen", array[1] * multi)
client.send_message(location + "/jawForward", array[2] * multi)
client.send_message(location + "/jawLeft", array[3] * multi)
client.send_message(location + "/jawRight", array[4] * multi)
client.send_message(location + "/mouthFunnel", array[7] * multi)
client.send_message(location + "/mouthPucker", array[8] * multi)
client.send_message(location + "/mouthLeft", array[9] * multi)