mirror of
https://github.com/bckelley/tconnectsync.git
synced 2026-08-25 12:14:15 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea84b0b9cc | ||
|
|
07aaea9e1c | ||
|
|
67b9f42f9b | ||
|
|
997ab7bac8 |
@@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
name = tconnectsync
|
||||
version = 2.2.0
|
||||
version = 2.2.2
|
||||
author = James Woglom
|
||||
author_email = j@wogloms.net
|
||||
description = Syncs Tandem Source (formerly t:connect) insulin pump data to Nightscout for the t:slim X2
|
||||
|
||||
@@ -4495,7 +4495,7 @@ class LidDailyBasal(BaseEvent):
|
||||
|
||||
@property
|
||||
def batteryChargePercent(self):
|
||||
return (256*(self.batterychargepercentmsbRaw%2)+self.batterychargepercentlsbRaw)/512
|
||||
return (256*(self.batterychargepercentmsbRaw-14)+self.batterychargepercentlsbRaw)/(3*256)
|
||||
|
||||
@staticmethod
|
||||
def build(raw):
|
||||
|
||||
@@ -116,7 +116,7 @@ def transform_battery_charge_percent(event_def, name, name_fmt, field, tx):
|
||||
out += [
|
||||
'@property',
|
||||
f'def batteryChargePercent(self):',
|
||||
f' return (256*(self.batterychargepercentmsbRaw%2)+self.batterychargepercentlsbRaw)/512',
|
||||
f' return (256*(self.batterychargepercentmsbRaw-14)+self.batterychargepercentlsbRaw)/(3*256)',
|
||||
''
|
||||
]
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@ class TestProcessDeviceStatus(unittest.TestCase):
|
||||
'pump': {
|
||||
'clock': '2024-12-03 23:40:23-05:00',
|
||||
'battery': {
|
||||
'status': '48%',
|
||||
'percent': 48,
|
||||
'status': '32%',
|
||||
'percent': 32,
|
||||
'voltage': 14.08
|
||||
}
|
||||
},
|
||||
@@ -93,8 +93,8 @@ class TestProcessDeviceStatus(unittest.TestCase):
|
||||
'pump': {
|
||||
'clock': '2024-12-04 02:30:23-05:00',
|
||||
'battery': {
|
||||
'status': '47%',
|
||||
'percent': 47,
|
||||
'status': '31%',
|
||||
'percent': 31,
|
||||
'voltage': 13.824
|
||||
}
|
||||
},
|
||||
@@ -137,8 +137,8 @@ class TestProcessDeviceStatus(unittest.TestCase):
|
||||
'pump': {
|
||||
'clock': '2024-12-04 05:50:23-05:00',
|
||||
'battery': {
|
||||
'status': '46%',
|
||||
'percent': 46,
|
||||
'status': '30%',
|
||||
'percent': 30,
|
||||
'voltage': 13.568
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user