Skip to content

Conversation

@Lytrix
Copy link

@Lytrix Lytrix commented Sep 8, 2018

Started working on updating the getStatusCommand
These are the possible status request values, which will also be used in the status error. (I've started on that as well)
And a small fix to have the bolus tests back.

Let me know if you want to merge these small steps. I can also continue with adding more stuff in for the status error responses as well and then do the PR later.

}

struct GetStatusCommand : MessageBlock {
public enum GetStatusCommandError: Error {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed if you're using MessageError.unknownValue instead.

- insulinRemaining
- timeActive
- secondaryLoggedFaultEvent
- logEventError
- New test for testing one Fault during deactivation
- insulinStateCorruptionDuringErrorLogging
- progressAtFirstLoggedFaultEvent
- recieverLowGain
- radioRSSI
- progressAtFirstLoggedFaultEventCheck
- Fixed wrong low bit selection  on radio
Removed StatusConfigAlarms test for now, must use separate route to evaluate.
case tankPowerActivated = 1
case tankFillCompleted = 2
case pairingSuccess = 3
case Purging = 4
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enums should begin lowercase

public let insulinNotDelivered: Double
public let podMessageCounter: UInt8
public let unknownPageCode: Double
public let origionalLoggedFaultEvent: UInt8
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spelling: origional -> original

case primingCannula = 7
case runningNormal = 8
case runningLessThen50ULeftInReservoir = 9
case OnenotUsedButin33 = 10
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.oneNotUsedButIn33

case podInactive = 15 // ($1C Deactivate Pod or packet header mismatch)
}

public enum DeliveryInProgressType: UInt8 {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking on the wiki, it looks like this is a bitfield. If that is the case, this should be an OptionSet


self.recieverLowGain = encodedData[20] >> 4

self.radioRSSI = encodedData[20] & 0xF
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a db field? Perhaps it can be converted to the actual value, if we know how to do it; it'd be interesting to see how strongly the pod hears us.

* DeliveryType as OptionSet
* Fix Typo original
to be the same as StatusError DeliveryType.
* Added none type
* Fixed typo original
* Put all ReservoirStatus cases into StatusResponse
* Replaced ProgressType with ReservoirStatus in StatusError
@ps2 ps2 merged commit 6f0430c into ps2:omnikit Sep 15, 2018
ps2 added a commit that referenced this pull request Sep 16, 2018
* omnipod pumpmanager

* Fix test

* update icon and launch screens

* Adding more details to pod settings screen

* Use launch storyboard instead of launch images

* Adding testing commands

* Temporary app-wide basal schedule

* Adding pod status response data to pod settings screen

* added beeptype options to canceldeliverycommand

* changed OptionSet to enum

* Added suspend basal & bolus cancel tests.
Seperated Bolus tests from Message tests.

* Added beepType and beepRepeat

* Replaced CancelCommand.BeepType with configAlerts.BeepType

* 2 Seperate beep data appends and exception error on rawvalue

* Default to UInt8 for BeepRepeat and removed unnecessary UInt8 on BeepType

* Fix typo enum type description

* Handle 0U/hr temp basals

* fix regression

* Finalizing doses

* Updated Omnikit readme (#451)

* Setup steps and ways to contribute with Omnipod development

* Reduced images sizes screenshots

* Aligned screenshots and changed title headers

* Added more steps before creating a PR

* removed testflight + howto signup developper account

* Removed NS options and fixed typo

* Auto-retry for badNonce errors

* Use dev LoopKit

* Track last insulin measurements, handle temp basal cancel

* Update certainty of delivery

* Finalize doses during assertCurrentPumpData

* Fix logic error

* fix tests

* Only store doses during assertCurrentPumpData

* Omnikit status command errors (#452)

* 'Fixed missing Foundation and availability of Bolus tests in Xcode'

* Updated statusTypes

* added status test and fixed typo

* removed obsolete unknown requesttype function

* added more statusFaultError tests and values

* Added more basic test values to StatusError Type2

* Added to statusError:
- insulinRemaining
- timeActive
- secondaryLoggedFaultEvent
- logEventError
- New test for testing one Fault during deactivation

* Added remaining values:
- insulinStateCorruptionDuringErrorLogging
- progressAtFirstLoggedFaultEvent
- recieverLowGain
- radioRSSI
- progressAtFirstLoggedFaultEventCheck
- Fixed wrong low bit selection  on radio
Removed StatusConfigAlarms test for now, must use separate route to evaluate.

* * Enum values in lowerCase
* DeliveryType as OptionSet
* Fix Typo original

* Added extendedBolus value to OptionSet DeliveryType,
to be the same as StatusError DeliveryType.

* Messageblock error: Function not closed with }

* Fixed typo original

* Added .none DeliveryType

* * Removed DeliveryInProgress error message handling
* Added none type
* Fixed typo original

* Added extra pod failure tests

* The statuslist of StatusError and StatusResponse is the same, so:
* Put all ReservoirStatus cases into StatusResponse
* Replaced ProgressType with ReservoirStatus in StatusError

* Track lastPumpDataReportDate, set raw data for sync identifier when storing
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.

2 participants