nightscout / Trio

MIT License
64 stars 259 forks source link

Fix SAGE uploads in NS for Libre Transmitter #112

Closed avouspierre closed 4 months ago

avouspierre commented 4 months ago

Fix issue #108 The implementation is not perfect because need to add LibreTransmitter library in OiAPS.

Should be tested by @kylmcw

bjornoleh commented 4 months ago

Fix issue #108 The implementation is not perfect because need to add LibreTransmitter library in OiAPS.

Should be tested by @kylmcw

I suppose this is an acceptable solution if it works as intended? What are the drawbacks of adding the LibreTransmitter library in OiAPS?

avouspierre commented 4 months ago

The beauty of the code 😂.

More seriously, the correct pattern should be to use only the generic protocol (here cgmManager defined in Loopkit) and not a specific implementation of cgmManager (here Libre). That requires to modify Loopkit protocol... probably a long journey to integrate the sensor information in the protocol. The cons : if Libre changes, requires to update the code... that's why protocol exists.. https://guilhermemello1988.medium.com/swift-protocols-delegate-and-notification-design-patterns-b9ce13b601da

bjornoleh commented 4 months ago

Merging into alpha for testing