commit 8bc2e0298fda17d5431b50dae7dd7838f6f80414
parent 725ed380dc5577af52fca9138cfa791fb398651c
Author: rob <rob@tarina.org>
Date: Mon, 9 Sep 2019 13:27:17 +0300
red, blue gains rounded
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tarina.py b/tarina.py
@@ -2331,11 +2331,11 @@ def main():
elif menu[selected] == 'RED:':
camera.awb_mode = 'off'
if float(camera.awb_gains[0]) < 7.98:
- camera.awb_gains = (float(camera.awb_gains[0]) + 0.02, float(camera.awb_gains[1]))
+ camera.awb_gains = (round(camera.awb_gains[0],2) + 0.02, round(camera.awb_gains[1],2))
elif menu[selected] == 'BLUE:':
camera.awb_mode = 'off'
if float(camera.awb_gains[1]) < 7.98:
- camera.awb_gains = (float(camera.awb_gains[0]), float(camera.awb_gains[1]) + 0.02)
+ camera.awb_gains = (round(camera.awb_gains[0],2), round(camera.awb_gains[1],2) + 0.02)
elif menu[selected] == 'SRV:':
if serverstate == 'on':
serverstate = tarinaserver(False)
@@ -2426,11 +2426,11 @@ def main():
elif menu[selected] == 'RED:':
camera.awb_mode = 'off'
if float(camera.awb_gains[0]) > 0.02:
- camera.awb_gains = (float(camera.awb_gains[0]) - 0.02, float(camera.awb_gains[1]))
+ camera.awb_gains = (round(camera.awb_gains[0],2) - 0.02, round(camera.awb_gains[1],2))
elif menu[selected] == 'BLUE:':
camera.awb_mode = 'off'
if float(camera.awb_gains[1]) > 0.02:
- camera.awb_gains = (float(camera.awb_gains[0]), float(camera.awb_gains[1]) - 0.02)
+ camera.awb_gains = (round(camera.awb_gains[0],2), round(camera.awb_gains[1],2) - 0.02)
elif menu[selected] == 'SRV:':
if serverstate == 'on':
serverstate = tarinaserver(False)