From fbe4fd49ba81b6131907b46d37dbd2a7d17ad818 Mon Sep 17 00:00:00 2001 From: klonfish Date: Wed, 27 Dec 2017 14:03:06 +0100 Subject: [PATCH] Reduced minimum weight for player detection to 10 kg --- wii-pair/daemon.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wii-pair/daemon.py b/wii-pair/daemon.py index 6d6c719..763c8fb 100755 --- a/wii-pair/daemon.py +++ b/wii-pair/daemon.py @@ -15,6 +15,8 @@ known_boards = {'niklas': '00:26:59:34:C8:69', 'fed': '00:23:CC:23:5E:1D', } +MIN_WEIGHT = 10 + class StatusThread(Thread): def __init__(self, t1, t2): Thread.__init__(self) @@ -108,7 +110,7 @@ class WiiThread(Thread): while not self.stop and self.board.status == 'Connected': self.weight = self.board.mass.totalWeight - if self.board.mass.totalWeight > 15: + if self.board.mass.totalWeight >= MIN_WEIGHT: m = self.board.mass x_balance = -(m.topLeft+m.bottomLeft) + (m.topRight+m.bottomRight) x_balance = x_balance/float(m.totalWeight)