Browse Source

Reduced minimum weight for player detection to 10 kg

master
klonfish 6 years ago
parent
commit
fbe4fd49ba
  1. 4
      wii-pair/daemon.py

4
wii-pair/daemon.py

@ -15,6 +15,8 @@ known_boards = {'niklas': '00:26:59:34:C8:69', @@ -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): @@ -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)

Loading…
Cancel
Save