[chronojump-server] uploadEncoderData adds laterality and fixes exerciseId
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump-server] uploadEncoderData adds laterality and fixes exerciseId
- Date: Thu, 29 Jun 2017 13:07:33 +0000 (UTC)
commit 1801fd1bf055abe81d1df6a15ae1543dde7b1512
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Jun 29 15:07:09 2017 +0200
uploadEncoderData adds laterality and fixes exerciseId
main.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/main.py b/main.py
index deb5928..4e4b2af 100755
--- a/main.py
+++ b/main.py
@@ -199,7 +199,8 @@ def uploadEncoderData():
personId = content.get('personId', 1)
stationId = content.get('stationId', 1)
- exerciseId = content.get('exerciseID', 1)
+ exerciseId = content.get('exerciseId', 1)
+ laterality = content.get('laterality', 'RL')
resistance = content.get('resistance', 0)
repetitions = content.get('repetitions', 1)
@@ -228,11 +229,11 @@ def uploadEncoderData():
(con, cur) = connect_db()
cur.execute("INSERT INTO resultEncoder " +
- "(dt, personId, stationId, exerciseId, resistance, repetitions, " +
+ "(dt, personId, stationId, exerciseId, laterality, resistance, repetitions, " +
"lossBySpeed, numBySpeed, rangeBySpeed, vmeanBySpeed, vmaxBySpeed, pmeanBySpeed, pmaxBySpeed, " +
"lossByPower, numByPower, rangeByPower, vmeanByPower, vmaxByPower, pmeanByPower, pmaxByPower) " +
- "VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
- (datetime.datetime.now(), personId, stationId, exerciseId, resistance, repetitions,
+ "VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
+ (datetime.datetime.now(), personId, stationId, exerciseId, laterality, resistance, repetitions,
lossBySpeed, numBySpeed, rangeBySpeed, vmeanBySpeed, vmaxBySpeed, pmeanBySpeed, pmaxBySpeed,
lossByPower, numByPower, rangeByPower, vmeanByPower, vmaxByPower, pmeanByPower, pmaxByPower,
))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]