Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Features for Diacon P8 Insulin Pen #3783

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

miyeongkim
Copy link

This PR introduces key features related to the Diaconn P8 Insulin Pen.
Below are the updates and screen changes included in this release:

Key Changes

1. Added Diaconn P8 Menu

  • A new Diaconn P8 menu has been added under the Insulin Pen section.

2. Pen Connection (Pairing) Feature

  • Enables Bluetooth pairing with the Diaconn P8 insulin pen.

3. Sound Playback During Pen log transfer

4. Automatic Synchronization

  • Automatically syncs the pen's usage data every 5 minutes.

Screen Details
Pen Menu Addition Screen
image

Diaconn P8 menu Screen
image

Diaconn P8 Paring
Includes a UI to support the pairing process for the Diacon P8 insulin pen.
image

Looking forward to your review! 😊

Background sync added
Removed connection toast due to excessive display.
Removed connection toast due to excessive display.
Removed connection toast due to excessive display.
@jamorham
Copy link
Collaborator

Hello, thanks for this submission. Can you please give some more details on the testing which has been done to confirm accurate operation? Also please look at the merge conflicts and resolve them.

@miyeongkim
Copy link
Author

Test Details
1. Pen Pairing and Connection Test

  • Successfully confirmed pairing by entering a 5-digit pen serial number, followed by a 6-digit random number during the pairing process.

image

  • Confirmed that the device's MAC address is saved in xDrip preferences during pairing, enabling subsequent automatic connections using the stored MAC address.

2. Pen Log Upload Test

  • After completing the pairing process, performed insulin injections using the pen and confirmed that, upon accessing the xDrip home screen, the app connects to the pen and generates notes based on the injection logs.
    image
  • Ensured that sound notifications are played if the sound alert setting is enabled during note creation.
  • Tested background log upload : confirmed that the app automatically connects to the P8 pen every 5 minutes, logs injection data as notes in xDrip, and uploads these logs to Nightscout.
    image

3. Workflow
Step 1: Connect
Attempt to connect with a paired pen.
Step 2: Pen Status Check
Retrieve pen information, including set time, insulin data, cartridge information, remaining quantity, and battery level.
Step 3: Time Synchronization
Sync the time if the current time and the pen's time differ by more than 30 seconds.
Step 4: Pen Log Upload
Upload saved injection logs from the pen to xDrip as notes (with sound playback and cloud upload).
Step 5: Disconnect
Attempt to disconnect the Bluetooth connection.

Additional Note
The newly added menu has been localized to support the Korean language.

@Navid200
Copy link
Collaborator

I cannot review. You can ignore my comments. I'm just making comments here as an observer.

My understanding of how translations are done in this project is that all strings are originally only entered in English. Then, at least two translators are needed for each language in Crowdin. One can enter a suggestion. The other will have to proof read/verify. This means that no translation is done only by one person. This reduces chances of errors considering the reviewer here (xDrip code review, not language review) does not speak all languages.

When injecting a unit to empty the air inside the needle, is there a mechanism for not logging that in xDrip as a real injection?

Does this code use the existing insulin types in xDrip? Or, does it introduce a different set of insulin types? If the latter, wouldn't this result in code duplication and possibly errors in the future?

I see hardly any comments in the code. Is that intentional?

Please don't make any changes. As I said, I am not the reviewer. You can ignore all my comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants