Bolus with extended delivery (Lytrix) - openaps/openomni GitHub Wiki
"2017-12-27T22:50:48.279311 ID1:1f05e708 PTYPE:PDM SEQ:19 ID2:1f05e708 B9:18 BLEN:3 BODY:0e0100814d CRC:62",
"2017-12-27T22:50:48.405218 ID1:1f05e708 PTYPE:POD SEQ:20 ID2:1f05e708 B9:1c BLEN:10 BODY:1d18040b1075003053ff80fc CRC:15",
"2017-12-27T22:50:48.409955 ID1:1f05e708 PTYPE:ACK SEQ:21 ID2:00000000 CRC:56",
"2017-12-27T22:50:48.800266 ID1:1f05e708 PTYPE:PDM SEQ:22 ID2:1f05e708 B9:20 BLEN:39 BODY:1a1601e475cb02012907028000280028100d000e100d000e17 CRC:89",
"2017-12-27T22:50:49.330686 ID1:1f05e708 PTYPE:CON SEQ:24 CON:0d3c019000030d40032000cdfe6002be CRC:df",
"2017-12-27T22:50:49.401773 ID1:1f05e708 PTYPE:POD SEQ:25 ID2:1f05e708 B9:24 BLEN:10 BODY:1d58040b4078003053ff0065 CRC:8d",
"2017-12-27T22:50:49.781228 ID1:1f05e708 PTYPE:ACK SEQ:26 ID2:00000000 CRC:66"
Extended Bolus
6,0 Unit total bolus: 2,0 Units immediate, 4,0 Units over 3 hours
1a 16 01e475cb 02 0129 07 0280 0028 0028 100d 000e 100d 000e 17
1a
Insulin Schedule Command16
Length of bytes01e475cb
Nonce02
TableNum = 2, Bolus type0129
Checksum, byte sum of next 3 fields and the resulting insulin schedule table of [$28 $d $d $e $d $d $e]07
# of entries in the resulting insulin schedule table (1 for immediate bolus plus 6 for 3-hour extended bolus)0280
Field A, First InsulinScheduleElement value of0028
* $100028
UnitRate, First InsulinScheduleElement value of0028
(# of ticks to deliver immediately?)0028
InsulinScheduleElement resulting in 1 entry of [40] * 0,05U = 2,0U immediate bolus100d
N=1
+1 = 2 entries (1 hour) of [13 13] = 1,3U000e
N=0
+1 = 1 entry (0,5 hour) of [14] = 0,7U100d
N=1
+1 = 2 entries (1 hour) of [13 13] = 1,3U000e
N=0
+1 = 1 entry (0,5 hour) of [14] = 0,7U17
Fixed next command for all bolus commands
The resulting 7 Entry Insulin Schedule Table is [40 13 13 14 13 13 14]. The first 40 tick entry delivers the 2,0U immediately, while the remaining 6 entries deliver a total of 13+13+14+13+13+14=80 ticks * 0,05U/tick = 4,0U over the next 3 hours for the extended bolus.