From b2fb14e57aa24a99e89574aba32d88f1015b7b88 Mon Sep 17 00:00:00 2001 From: Alessya Date: Tue, 17 Apr 2018 14:52:06 +0300 Subject: [PATCH 001/698] New icons added for local profile screen --- .../drawable-hdpi/icon_local-activatehdpi.png | Bin 0 -> 1357 bytes .../res/drawable-hdpi/icon_local-resethdpi.png | Bin 0 -> 963 bytes .../res/drawable-hdpi/icon_local-savehdpi.png | Bin 0 -> 912 bytes .../drawable-mdpi/icon_local-activatemdpi.png | Bin 0 -> 881 bytes .../res/drawable-mdpi/icon_local-resetmdpi.png | Bin 0 -> 692 bytes .../res/drawable-mdpi/icon_local-savemdpi.png | Bin 0 -> 619 bytes .../drawable-xhdpi/icon_local-activatexhdpi.png | Bin 0 -> 1700 bytes .../res/drawable-xhdpi/icon_local-resetxhdpi.png | Bin 0 -> 1241 bytes .../res/drawable-xhdpi/icon_local-savexhdpi.png | Bin 0 -> 1154 bytes .../icon_local-activatexxhdpi.png | Bin 0 -> 2678 bytes .../drawable-xxhdpi/icon_local-resetxxhdpi.png | Bin 0 -> 1884 bytes .../drawable-xxhdpi/icon_local-savexxhdpi.png | Bin 0 -> 1694 bytes .../icon_local-activatexxxhdpi.png | Bin 0 -> 3549 bytes .../drawable-xxxhdpi/icon_local-resetxxxhdpi.png | Bin 0 -> 2510 bytes .../drawable-xxxhdpi/icon_local-savexxxhdpi.png | Bin 0 -> 2249 bytes 15 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 app/src/main/res/drawable-hdpi/icon_local-activatehdpi.png create mode 100644 app/src/main/res/drawable-hdpi/icon_local-resethdpi.png create mode 100644 app/src/main/res/drawable-hdpi/icon_local-savehdpi.png create mode 100644 app/src/main/res/drawable-mdpi/icon_local-activatemdpi.png create mode 100644 app/src/main/res/drawable-mdpi/icon_local-resetmdpi.png create mode 100644 app/src/main/res/drawable-mdpi/icon_local-savemdpi.png create mode 100644 app/src/main/res/drawable-xhdpi/icon_local-activatexhdpi.png create mode 100644 app/src/main/res/drawable-xhdpi/icon_local-resetxhdpi.png create mode 100644 app/src/main/res/drawable-xhdpi/icon_local-savexhdpi.png create mode 100644 app/src/main/res/drawable-xxhdpi/icon_local-activatexxhdpi.png create mode 100644 app/src/main/res/drawable-xxhdpi/icon_local-resetxxhdpi.png create mode 100644 app/src/main/res/drawable-xxhdpi/icon_local-savexxhdpi.png create mode 100644 app/src/main/res/drawable-xxxhdpi/icon_local-activatexxxhdpi.png create mode 100644 app/src/main/res/drawable-xxxhdpi/icon_local-resetxxxhdpi.png create mode 100644 app/src/main/res/drawable-xxxhdpi/icon_local-savexxxhdpi.png diff --git a/app/src/main/res/drawable-hdpi/icon_local-activatehdpi.png b/app/src/main/res/drawable-hdpi/icon_local-activatehdpi.png new file mode 100644 index 0000000000000000000000000000000000000000..4ef567ffb65bb11825ac52978c03cb378a338646 GIT binary patch literal 1357 zcmV-T1+w~yP)002t}1^@s6I8J)%00009a7bBm000o1 z000o10d$F+O8@`_|4BqaRCt{2TuXA=KoISuvbT3yMmd4W34jv>pTKyho$(1mPGG## z&TxX@6BwN!_yid*wKFGhswsvK;W~l!Pf%JvZ+Q?d$GGcgk)VxrChZpGv+iD+8pnGzJS6`ha;^O{;{ zkPj+efHKe4vEL&qS%s?4iD*VdSJ57_!#y7kp*p9T9{k4^+ou+<`*thof8rN zIfq{xSZL-85shQ{v?yd1s%F1**YXo4XwGE1XaY2q{oVKgao1&@&E2Fv3~{mwRnJ?@ zu7arque^mHT$Fh>4t>r(M9FF)Y6J6Fial)i%n`KIWbUGbiILS}de7`{Vme;DKRNa6rwVQkTudiSAsR!4cCZBIK2URbnWuKrx#f;72SD;Bz}*E zYaGFTav%uQGF`4SUsLzhEYrh6N*Q*%UkxFj5C9Z{f)7k`9hIyqG~wfrUgjC6BDY9C z_Q6_wSEzdB>YyQ)Zi=0f)zdzU^^eLto8kWY3lgHQPnx02=hdvIT|Teq=-& zGvT@q6C&O0*ko=wqxWnHo8;<_EcgoD?n5RycMbL0Bl`Iv?Ovig)Nhi5OtmmUo9}2kKV#Luzz(Z zVd7H#EEeS2@YNMe(t8SQ1KfYrK-9IAFBChDf(>I$?cd;mX%leYb;Cxsh2-ASw5QYo zv34u7kPj_CiM?C-Hn2o8;*|EmuQ4U!F_;1|+dkC5av%J*Yx?i(gWm!#JjDbiHljz~ zuFmfC5Y}Uz-4XGFhtTz@uzW9xl{ghP>*9dZ7RNkqIN0+=JxkxV#(6{W!v{7vssH6D zon-xwkPehPAd%&OM3w^*Sq?~KIUtecfJBx95?KyNWH}&_<$y$%Er{q3J~1+q+rF88 P00000NkvXXu0mjf^*DY- literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-hdpi/icon_local-resethdpi.png b/app/src/main/res/drawable-hdpi/icon_local-resethdpi.png new file mode 100644 index 0000000000000000000000000000000000000000..7d38cf0b5026b936e9435c4d54078c0793274382 GIT binary patch literal 963 zcmeAS@N?(olHy`uVBq!ia0vp^-XP4u1|%)~s$Kyp&H|6fVg?3**&xhV(m4mHg1OYw z#WAFU@$GEivReiM4a;lqs%z&zWIL#?VXpCJkG7>_b@L(K9gZ)~?Y<;^fKw(fU|ZZ( z^#%TKEzZy6id24my#LI1Ic^uFDd&whnH1fN)e{$ZQ=vcajbJ2?ix~67qYf#C0=SvY z{K;}LbH$Arb}WAz87ddllOA$(zm>ii!-6=kOU~!}%^3;~T(?_&Dt_Vd=`mq*#e*3l z7BAV&7(16CVRq=#bB{m7P4oc@f7f`~{e0c|RrduhO*(O?X&DH=4Rkp0xS+b;Z@E?zh#2{5oe?YcKgL_|P}IV{*P?%jODwjr?5Lthv*e z)9B0HbJe@{iT2xFGFrCgxpw&uUcWOrp0nQ1NUEy8QezVlAre^{_r@eV*7dT|ky$Ix zaf_zjH<8zEUy@P~8P2vY?{l&I#grfSL>X)*K4aS-UViz7>Web=@CO%N5AF}$*Y(W( zQcZj2E0-606=fr4S2?Svu?%bN2|T-4_^ArHPxP%**krIuZOKi|FSQM;f9Srs`;)0$wz9cu*7hU=bt%&F)dE+;8`E?U>pT;}E+)3P-2K{Sz6hm%zgeA6>F%hnS?QD#>UrAI@xawztFt(s z^ECWUIN{y7;~e+$%R(Zh3hK6jDVe8?+|TJpFIW6GF?QaDywtOzfrbkor^e>In^RgO znkL}-o2O}+!p#EnpVu~RkTWS4yrz8WXIP&1bCW%%?J{`pxkk)i;h}Du{Yk;|v5~*k z+;$&SnMO9xH(bfxl z<$s4PPrbl3PgAE=61M<>4&dDNag-MPipYnjkfQT^(}^Eh^M20kcOu64a}wxdaa zzpW%lD9=-*rK)S$UH5yFG$d}=R1U{%`DM+z-r^44$rj JF6*2UngBe%s?Pub literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-hdpi/icon_local-savehdpi.png b/app/src/main/res/drawable-hdpi/icon_local-savehdpi.png new file mode 100644 index 0000000000000000000000000000000000000000..e5c1d5cedc61cbdb3069090d90f1611cbb5da670 GIT binary patch literal 912 zcmeAS@N?(olHy`uVBq!ia0vp^-XP4u1|%)~s$Kyp&H|6fVg?3**&xhV(m4mHg4xN_ z#WAFU@$H=Rxwj2O+T*+L-Jac-tKMPWVZOpVqe^&z^Jd3KypNh0Wao0e;+^FaP~D{F zes>mU3`YeE&&(x1b4a@&0PCg;saNDWwIQI9BK| zVPV$H@b#QIC3h=BgXq7n+caN^zuT%;b!}nJYE_0e3=fp$s+b#C!*3itCXjvQy>MWI z{r!UVl_ztrh5c$0*Ib>mx|(4}(VTmQ>#GYl8Pt{cU4Ff6#rHee-8Q_ZxBY7IpYv|( zo2|mhpRQht*!`$HqwAO5GM$T?PHl@yWDMpsTJw7m+oR)oH+TbM*+sr;Zxi6z6}9Qb z)TO`w_CF4KeItt1FjvgY|4*lI$J%K-PJQBH;1|l55 zTHd<~?1GM+H+U{rv+0Lqnx=N?AD+#VU3=xfvAfQgsbZmGS=lC^;UkjA3g8Z?p84c28Zsw7pC_P2rt!@ zlxW}e$bA3Ipg%49zw^ZlwiZ5mUKO=TGFFVQDqeSaQw#5r{JBbXZ6UmSR-3;SH50JE ze&)IE{uy;aCtu|~cwq5d_*w7#$2)S(Tv}8%ZSai@YI&%$M!)V&E4$vwUy&k-XMXhh zUGmFZv7wQ5!V8dK^@qko`z+6;cFtEkU7+qTqc`WHaf-CGQA=v~e8txevlMi)|M1*Q zmt|^6?Vq106l@}w*sgixyur+$Yy2eiPX2fB?BBsQ)3&bdsez%KJ V0^^&Ve}P$y!PC{xWt~$(69DLjngjp< literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-mdpi/icon_local-activatemdpi.png b/app/src/main/res/drawable-mdpi/icon_local-activatemdpi.png new file mode 100644 index 0000000000000000000000000000000000000000..b39c72b40776a28bcec7cfb5604bcac60b4b5da2 GIT binary patch literal 881 zcmV-%1CIQOP)$W=H2wPDBVHX22b>FDpAD0NOph^; z=_>{@eZ`wo$mK)f08IFj2y|sGS)XFx&WffF1qnU_FaF zT(o?|4#2z%QqLmeL$LsGQ}NXvKn@^wr_%MREVm)6W-j^JR-RU5d??D5W)_HmNy{h}^L@%^8YZDsu@Xj89Ag zY^gO9HNj*VABs7EuaZdSl9_eWnrBbg;-%YdGM8Lho}so3XRU=;sw6@}`B0dIz@wFN zj-e74tUNU=Znh9w`<+fJh!Eii06%;va@Mwm5G9Upa!-r9smSmHuf@{5CWSijnd0if zhaxrlKPgSd&s2M()-uxkTVsLyOf^UAdaR^WEU8^hOGauZJ@Pw=t;kR#cDPhgSIGO?3IvcU1vT7rlD2R8NOM>RXEL7k+@-eC--+d_7 z4H}n9>&!CJE!0FLIL2I*sV+E{7B#oY4nUO^tsOwCo(WIYo`U%Ur*^QFZfXe0Y^lnI z|6rvpEfG}CJ#vq&wzg@>NK1@4khP$;=6&Xpg=W5It4K21_DM&Eg}9R&)WnVymIC}s z=8}nV1eT-5z9Nm+!aC2$#_=zWvCy|noJgp(il@{~UG|?nEvGgA=h%!#&8LyOUHech z+Z;Yfa2G9!>@7oCiL*Ltdd?wW8jaF;afg7BP}bvF$CbT5$FmY09h_6v(sUI^(d8=* z$HmU_N@LXpi4rIIQ^SjY+0+LNFKGLUflOa9km)PVhYWyU{6KY-rJ5bI00000NkvXX Hu0mjfCsK~e literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-mdpi/icon_local-resetmdpi.png b/app/src/main/res/drawable-mdpi/icon_local-resetmdpi.png new file mode 100644 index 0000000000000000000000000000000000000000..ad2e0eaf6d9f16886f3d30f1a9d6656874d6a1f9 GIT binary patch literal 692 zcmV;l0!#ggP)w z&Vphb$Ju#CY62(Ts2NFQf7{P}S>9B?W+I~kG!ld%d+ zt|~COs=(x`lY%*)(s^6eR{$0OZUM{y%mG{g*a6rB_yEuV*eIj-W8XK)+N`Z=`uHaR zHv`OG$wnDXfKf^c(^fV0{-y`QMugg3A8GTOp$11P8BAN%b55BHar+a%n(iy3-;dZV z`I2@7y%-v$Brpz;F90iL^h=;UMQR1$m$*$nZe5*lOrv2OAY1O$!D+(2C`~W<){cRK ze2ps2VvJajS7mhY%e&$z5YUbv(YOkVE)vW$lp3-ZS0nv_J7URcM*7Ls(W__}onzI)KRhG z(r(Aj!q+}FGFRev6X_#V*8ioieJqU3->G5#O`5){77H_rw3}3AbC#>V1B@J>y;ZY! zr^zLlu8+|2D+cL%q7{Ml_vQNrUu0;adZP~unStA?e&P0SogR%+Th$A(i1k)YAB^o; za@cUB`atd-wqqn0uHIFKcR$nl$Q_4WZlvxwf)eB*bYs@@UW&>e{`;wnKH8C1-U6VE zUh-iBcz@A!=9%>bAhS*+g0>bx)yx6(C?3m$iP0dex!k!bqc+9 z+mHpO)!;J#$3RD7kZ28_G#wGj0t91DXE;JlE+Cldc=ms(EHraffyq?`CRY`hTvcGQ a6o9{!hU6)1qygao00009q)MCqjUgPAXcDOAjiz)09GJWAeWuV z5j%hmumk7-kGVkwI6ISICMIk)o4A>s{cc18`;njbvcap<>4dg$-5QflCSf|6ROw_= zrByOF30%V;2&W4G6978^BbMa{mwCyp4B>PtL<$A~rml07k|CV-0nD`Fz3Y6hm=R7# zKJyG5Se9><;U$2c@_5IxeChgPm1GE~GqLPFho`&n0$_{Zcs*!y##LU-Sw{I%hGNaK zdF=Gv--ks+Mk8brRUt)z zx-gsb#;|1Wu_gX^4OfREPgj1W4OT4_PEh8fJsSUsC zLXOqTD_)Wy1%PGw_>xdryh0JInw1ExwDDTa(MHhHY!d=-r;XKWjy8h#8HWEBZMA>RG(#eotwE*qMw_wEZ+dw#C{)i$Fm9JB_j?v zf?~LTaXOM!@m-mv&&`t!vE5O32}hq^(^ZZXD#mT?d>5sFF zSoZs(i~GEhBkL+ZVd!-K)Q~EjOsaG;snW@$N_%7g`~cdCzk%b?snh@f002ovPDHLk FV1fk79&G>s literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/icon_local-activatexhdpi.png b/app/src/main/res/drawable-xhdpi/icon_local-activatexhdpi.png new file mode 100644 index 0000000000000000000000000000000000000000..75e9af38ed98e928829a6f2a5dd78896bb8bfdb5 GIT binary patch literal 1700 zcma)-{Xf$Q0LMpRTbZqfQPD7Nj1D>L0b84FL&w+C##BeLxH_icJe_RPK}}PR_VcZ~fUmaC(n()&(HsTzC*psnM@u6w#i9;r!hS z={0GmGvedReeTKSTML|Zud*h%!Wj6mLLwe(I3q#vKB2rBNVNQVs%0F#H6!{WT>a0g zRygn;%`^0Qy|TJmEAle8(y%I?eJc~ULD4E6+zic2i|?A!v-28C3>jQEwXDS}O99Vi z%q2P$j_A$?e|5M1^r45DMR^tg!4N^bbvds+2a1;AN@MfNem&Fg)woTV47G_rgMJ@C zgU0l>InWnsc8wHw9DcH#&7BW0OR=|&<8fXg>e3D*Ks8CQ)}tFayFZuTr!oWLJcK2H zr!(Wx%_4u3ApfNl>mWY@&dqrhl-B08&=nh0hCEzRP*lLqHEr}zfmLe9lo;J{QALa- zwXf9z2Z=}a2*CCG zW3P*}i=R2e>>&^z)ug^ltBHBDy$7qeY(lZ}yCd2!7v<8MB@@3ty7bIZ<22J|u&7;5u86U$umto}kEhbfBLPQ_y zGN}qlhqR-jwpTK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xhdpi/icon_local-resetxhdpi.png new file mode 100644 index 0000000000000000000000000000000000000000..2813cb448d86b4f8186c955c0bf3ce3727e41214 GIT binary patch literal 1241 zcmeAS@N?(olHy`uVBq!ia0vp^sX&~Qk(@Ik;M!QVyYm_=ozH)fq{Xg z+tbA{q=ND7+|z;5jsk7B_3j__3_rn;%c92o`1ZX9jx{_!Y;7D9@~pZz1O(SiVT}3y zq?h6P4c+N`&b)E9?XQpd8=5QHy5z3w{9V=a9v!}YTUs-sCPcnsg@{84mx30nz*MFV zFGiQ842yyo0yP^53!hm2|0(~z+75(5l`h-?$z4*&KwKv1vfu^wz;>s zuOxqoU;OsIzK4C$4h9=$NFV=urgquJlpqV$n$0#>3e(t)pxyQa*ua9y$^&+28){fHg!ZZ2|_d8-i=m+Y@ndFY#? z)zoDhM1pdP#SgMeIv?m2iuU%Ia%hp)%M7Du5~|fX-`~CZ%db?n{swOX<7Ovj_v3>kiA9Or|9XteK9G* znx`1R>2Jb~pk346X!N*s$?q}y8rmf=uS=j*?Dh%~%WI0FCs&kd}b+`zo=Bp zsmN*KlxtPXb31;1y;gMX7*BiyZ^A9B&P5BAGnf3?ynB_N*ZS^xy05#{Wef!hSmsB+ zb5%K7?pwK{`_k!E#~Q0cf*#NMC7RkJ&>E+s#;$nh)uyYHmzF3l3^{e_<8StRkL_kL zMk@up>da1_Xi?j} zqFA5C$4&EYc>7N5I_b&r{vFq@C)ZvtTi9p5{o%Ko)XJRa8DT;TCagQ_d~e&W%G}zo zE2&2KydG89i=A^q<=K^M!4VHWb5GLr>SibsJ62zXeL*tVD7Vvif*kD z9age;gcdu=sQi=?n746HuwvPl{W;8wR!0(-#jzC#yh^`VUznc|*}CigU0_+o;OXk; Jvd$@?2>{2kD+>Ss literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/icon_local-savexhdpi.png b/app/src/main/res/drawable-xhdpi/icon_local-savexhdpi.png new file mode 100644 index 0000000000000000000000000000000000000000..0cf81430cc21e8ef2d92fca605c7b4ef16cd2f99 GIT binary patch literal 1154 zcmeAS@N?(olHy`uVBq!ia0vp^sX&~Qk(@Ik;M!QVyYm_=ozH)fq{X= z#M8wwq+-t7IR|rZI|#U{JH9LQvpKfzz{>-EtYPfeCNl7cX?esrK4E5*Tg&w*L|`TJ zZsyk~X2&)*v8D+g6xiwg_RXh!i}xA9Dofq#iqhL_w%>m1aq!XJUk99*GAs&W2-Iv? zA>t6irJ%(sFqNspi_rzU@RP$=>KhcN+uwTbq77a#Lp4ub`^iC-XW_Z!@yi|HsNynbGxYW3s5-M%B7$0dI_#=By4@ zGTPo_d|X_ndHJ#x`%B(zzj;5tulCn9k*`L_>fEh^Pi-@5UNwK?HT?qz7vK4umo4ng zadc8q!jtY}x=A^aM;>>tm#udR*YeKDkzDv_@sHZ1J3{W(Yg;)w*Dk-|El)PR5mRZwQV{p zPwCuVw&Hr{HdB!qH#RMq^l46pb@PLbB0f2hYS9z!tTy{H(PW!W@H(NxN2jGu3bNRy zC)2IkuY3B*5{2W_QoGW*a)1g|RZX_}#IDa-y>H_Tj>!{+q@t^v&rG(c{?V^FS99UU zRJ;F?74!L+E-RjNU-UE3=jH#SGFN>AyLqfwlTI%;Q)6op5!+N3oVZW#cGh9j&C?r7 zy^n?&1w6{W7x>BC{rjx?8OfZzYum5I}@Ci(g&57JJhwqz+G5<^%>B%|IU&tnf#XLDPX^pgc z#F@9V?eBlQzghKnp4hx4zg%46J74G=TRku6bNrt7zyz@3{C*y{`)5(p`INj#<_{x- zJa;~LwnOK^%BOmZ?2FWOm#%l2cT`2V+^y{GYcp3{->MHc%0*(Q=BBb$cpup%a@t_; z;qG~TGgN-dKE4{%FPCe#vuIkH;D zvPL-hu5v)F|KLALWRN8)z4*}Q$iB}G&v0a literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/icon_local-activatexxhdpi.png b/app/src/main/res/drawable-xxhdpi/icon_local-activatexxhdpi.png new file mode 100644 index 0000000000000000000000000000000000000000..600e6ee61c33f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)IQ- z@a_eTC6N@Mb;4)3k0Ta5#ZBNC@zk0$n)IvV6?L}KfRvOMQ zSb4F+rH&yGnWz4Mb)Y6dFU`Mm3YBqi5GW7+nfv~m(yELcK;|pWz=Z}nU+b1o@#@0( z;`?L=`_ULJB@d(o|At#7Pm@i)Zr%mXYc@>y4qsvjS~hBWXR|dU=6Mfz>BL7(bcqE5Lopnd$alLF}wXX zQ99C&YPa4ic*IH&bK_RQXdB8RK>uXYpoNl9SCSJQxmMynABNobWv6gu$l{|ckgZ(q zM?%<#N<7veMy5O+k9frjxcb_WHCQL-5D5Vd9$7DMN~b}rUPp&yBn^95sk9aQS1Ou) zOIiqfbU?4h(kqVnXLW>2rqtlE=$SL8;POSNAjRrM!St zx|i0dBIt%lvRe=De&ZPfxXi;z$Wl(C0+oKy_VGq4b-=uY0@q<<>d@qu%`Ir;;C1uY2l<@S z%Vzd6dL5W&g4iq_Ht)VF_fCF}l@BGg_Uz&L&0+yZ=djLzmI;u0gZ_O2eRR>SVl1mt zEJ+%Xq6?P6re*lviP8F3`#`?#8~BeUf1c|0zc{HLKwAXjo4qA^{{l+e{ScK!oL=cq z*x;~~=;cH)C{r0*7g#l3zkL-JxVH#z-tR%e1pAR5<1xn$gz;OPO9W*;1Q_jjHT`V tzIPf9`g>G`EyMnwIQ3s(Ot!CSR|rLSMR|Jv#n=N$AuDq`G!x}X`VTK&0rvm^ literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/icon_local-resetxxhdpi.png b/app/src/main/res/drawable-xxhdpi/icon_local-resetxxhdpi.png new file mode 100644 index 0000000000000000000000000000000000000000..dc9d659dd714b05dd4f0fb92712dc8f1701d0814 GIT binary patch literal 1884 zcmcJQX*Ao38pbnf32AfD6t%U2ia{(@Tdfsas1g-IsG==`Dyo*sSnAlKA|!u14T2(w zXd5%Moz^}nqG(Y}g&35nV#d;O-LLoay&sT`eKq|)n(GM5Bs}eyVF{l&D=6Zbjmx^l`1qWE>WzEe& zv~Ntho<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Go>@SnheHQO9` zvEbclyTK)?PU88a_-1Ib+v~*0P>l4n8GiJZg?scKd(lRCO%toHKCY~#x4|lM4ttgy z_aH@L(xdt3Ul|RdCyK4+) z2&iNeyTzB?&}e(Hoo|;_DTJr z3c3trNNhv(gJzL7?Q8MFc1XK#UlOVnB?7^AdG{?QtY}X{Bb|y&(}kOCv{nDe4Dyw9 z_%v!*BEMfC(qz~CJi?o?367IJNC;(*eb%>c=zeP7Y#V%gXKh74Ln5EgH>elKws>n& z`0rV%SJisaq+o&0E{qhY?#L?)v=FKB&ZZoa2zGioR6U%FzzQzci!KkJ%rTK91>Ulz zG=gQH;WLwP0-Lz#f`<#z=>Hos{+mGodVPlw{;$PjZ}i92j&TWcvU5c-uLPw18(*Dg AVE_OC literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/icon_local-savexxhdpi.png b/app/src/main/res/drawable-xxhdpi/icon_local-savexxhdpi.png new file mode 100644 index 0000000000000000000000000000000000000000..20448e4bf98468272a5b298fae35794acb74ce3d GIT binary patch literal 1694 zcmb`IYd8}M7{`}Z$z@D(nQ7Xrw%EG3&7}+5ilNrJn3+s2k!o#dLP9auo`Vn~%4G6P zL>UR0Ii}laN{MjhR!BP>gwFbSzMK!|IUoM-|9Rg3`{jK<{N7~p;X|5g5H$b*py}dF zpeQ|8sT|ey%G%Qg=~vpui_V^*0Kit8Us_{9y%PxltS7q=9FIrbo+^BK9${mUD0G~j zb??A!b~Yv$SJLB}o~#+w4riQSSFNQImij5~aXi&H!k!8ndt7m#)dZ&hTtsm`d+Ix4 zabN6()jY%fqxQ=`7KSe344kx=MfXW$GFIgp8*FehwWXL2TrY?3Lg~jj3RN{EM80NT6x=r15v27!yl_wH#0Rt2dJ}f--V}j@r=eerEJl9Q z%)(*#+pQV&bS681Z~!|0lo!drPrnS-;c^N(?OeLrSpv7;aLXSRXYbf#g=ZGs_3g^u z5XXA2Rg670P&_#STVzh{xA1$B9q$Usnkndv99mG+q~KHSgoN^EXd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ziEk4vk$Q-PnPt(=QZ0@lI_}SNdTjG`s<7M+V1>wf8+{ziw_FbUlsf`*h}6KXQhkqS zVmnk=z-LtIaVE%TG~dj1QQ?Lh01m1}HFElt&{$J{Jtk<4Qlw}{O9*ZBr&kTxBUsvE z0x`to_rFux$r=i<_JWMGI~s6@?hyI+U2m;j4-S zD~N&SD|?At>*oWd6~wI)o_xZoPTjBR&6jS0F(x^)uwW?td;W}S^0JO+{$MD8HQux1 z$aKUd!UuKD8ioNc_zv)aAd>9#oY;>hp#MqniDsvxm|4K8R#E%BI>{+q$Hz#qZDlyi z^@WmHkB|}n^MhFY`qdkcqc&4FbgY`~WwJ*LJ^hYFcM4`+8rR#22sXk_|4Kb_P}vNz zaoN0hJxLR3GnF__xl1$fPbhN^)qjNMi_}WkWOYH-IOS~J57*zI7GHj2W8-{&y+F|W zet6zaQ4`F`tpvICkbo&gfq&&nyE=_K?=tZeRcYG-A zaw%1P1eoy9->vv?n Date: Tue, 17 Apr 2018 15:59:00 +0300 Subject: [PATCH 002/698] Rename Icon files --- ...activatehdpi.png => icon_local_activatehdpi.png} | Bin ...local-resethdpi.png => icon_local_resethdpi.png} | Bin ...n_local-savehdpi.png => icon_local_savehdpi.png} | Bin ...activatemdpi.png => icon_local_activatemdpi.png} | Bin ...local-resetmdpi.png => icon_local_resetmdpi.png} | Bin ...n_local-savemdpi.png => icon_local_savemdpi.png} | Bin ...tivatexhdpi.png => icon_local_activatexhdpi.png} | Bin ...cal-resetxhdpi.png => icon_local_resetxhdpi.png} | Bin ...local-savexhdpi.png => icon_local_savexhdpi.png} | Bin ...vatexxhdpi.png => icon_local_activatexxhdpi.png} | Bin ...l-resetxxhdpi.png => icon_local_resetxxhdpi.png} | Bin ...cal-savexxhdpi.png => icon_local_savexxhdpi.png} | Bin ...texxxhdpi.png => icon_local_activatexxxhdpi.png} | Bin ...resetxxxhdpi.png => icon_local_resetxxxhdpi.png} | Bin ...l-savexxxhdpi.png => icon_local_savexxxhdpi.png} | Bin 15 files changed, 0 insertions(+), 0 deletions(-) rename app/src/main/res/drawable-hdpi/{icon_local-activatehdpi.png => icon_local_activatehdpi.png} (100%) rename app/src/main/res/drawable-hdpi/{icon_local-resethdpi.png => icon_local_resethdpi.png} (100%) rename app/src/main/res/drawable-hdpi/{icon_local-savehdpi.png => icon_local_savehdpi.png} (100%) rename app/src/main/res/drawable-mdpi/{icon_local-activatemdpi.png => icon_local_activatemdpi.png} (100%) rename app/src/main/res/drawable-mdpi/{icon_local-resetmdpi.png => icon_local_resetmdpi.png} (100%) rename app/src/main/res/drawable-mdpi/{icon_local-savemdpi.png => icon_local_savemdpi.png} (100%) rename app/src/main/res/drawable-xhdpi/{icon_local-activatexhdpi.png => icon_local_activatexhdpi.png} (100%) rename app/src/main/res/drawable-xhdpi/{icon_local-resetxhdpi.png => icon_local_resetxhdpi.png} (100%) rename app/src/main/res/drawable-xhdpi/{icon_local-savexhdpi.png => icon_local_savexhdpi.png} (100%) rename app/src/main/res/drawable-xxhdpi/{icon_local-activatexxhdpi.png => icon_local_activatexxhdpi.png} (100%) rename app/src/main/res/drawable-xxhdpi/{icon_local-resetxxhdpi.png => icon_local_resetxxhdpi.png} (100%) rename app/src/main/res/drawable-xxhdpi/{icon_local-savexxhdpi.png => icon_local_savexxhdpi.png} (100%) rename app/src/main/res/drawable-xxxhdpi/{icon_local-activatexxxhdpi.png => icon_local_activatexxxhdpi.png} (100%) rename app/src/main/res/drawable-xxxhdpi/{icon_local-resetxxxhdpi.png => icon_local_resetxxxhdpi.png} (100%) rename app/src/main/res/drawable-xxxhdpi/{icon_local-savexxxhdpi.png => icon_local_savexxxhdpi.png} (100%) diff --git a/app/src/main/res/drawable-hdpi/icon_local-activatehdpi.png b/app/src/main/res/drawable-hdpi/icon_local_activatehdpi.png similarity index 100% rename from app/src/main/res/drawable-hdpi/icon_local-activatehdpi.png rename to app/src/main/res/drawable-hdpi/icon_local_activatehdpi.png diff --git a/app/src/main/res/drawable-hdpi/icon_local-resethdpi.png b/app/src/main/res/drawable-hdpi/icon_local_resethdpi.png similarity index 100% rename from app/src/main/res/drawable-hdpi/icon_local-resethdpi.png rename to app/src/main/res/drawable-hdpi/icon_local_resethdpi.png diff --git a/app/src/main/res/drawable-hdpi/icon_local-savehdpi.png b/app/src/main/res/drawable-hdpi/icon_local_savehdpi.png similarity index 100% rename from app/src/main/res/drawable-hdpi/icon_local-savehdpi.png rename to app/src/main/res/drawable-hdpi/icon_local_savehdpi.png diff --git a/app/src/main/res/drawable-mdpi/icon_local-activatemdpi.png b/app/src/main/res/drawable-mdpi/icon_local_activatemdpi.png similarity index 100% rename from app/src/main/res/drawable-mdpi/icon_local-activatemdpi.png rename to app/src/main/res/drawable-mdpi/icon_local_activatemdpi.png diff --git a/app/src/main/res/drawable-mdpi/icon_local-resetmdpi.png b/app/src/main/res/drawable-mdpi/icon_local_resetmdpi.png similarity index 100% rename from app/src/main/res/drawable-mdpi/icon_local-resetmdpi.png rename to app/src/main/res/drawable-mdpi/icon_local_resetmdpi.png diff --git a/app/src/main/res/drawable-mdpi/icon_local-savemdpi.png b/app/src/main/res/drawable-mdpi/icon_local_savemdpi.png similarity index 100% rename from app/src/main/res/drawable-mdpi/icon_local-savemdpi.png rename to app/src/main/res/drawable-mdpi/icon_local_savemdpi.png diff --git a/app/src/main/res/drawable-xhdpi/icon_local-activatexhdpi.png b/app/src/main/res/drawable-xhdpi/icon_local_activatexhdpi.png similarity index 100% rename from app/src/main/res/drawable-xhdpi/icon_local-activatexhdpi.png rename to app/src/main/res/drawable-xhdpi/icon_local_activatexhdpi.png diff --git a/app/src/main/res/drawable-xhdpi/icon_local-resetxhdpi.png b/app/src/main/res/drawable-xhdpi/icon_local_resetxhdpi.png similarity index 100% rename from app/src/main/res/drawable-xhdpi/icon_local-resetxhdpi.png rename to app/src/main/res/drawable-xhdpi/icon_local_resetxhdpi.png diff --git a/app/src/main/res/drawable-xhdpi/icon_local-savexhdpi.png b/app/src/main/res/drawable-xhdpi/icon_local_savexhdpi.png similarity index 100% rename from app/src/main/res/drawable-xhdpi/icon_local-savexhdpi.png rename to app/src/main/res/drawable-xhdpi/icon_local_savexhdpi.png diff --git a/app/src/main/res/drawable-xxhdpi/icon_local-activatexxhdpi.png b/app/src/main/res/drawable-xxhdpi/icon_local_activatexxhdpi.png similarity index 100% rename from app/src/main/res/drawable-xxhdpi/icon_local-activatexxhdpi.png rename to app/src/main/res/drawable-xxhdpi/icon_local_activatexxhdpi.png diff --git a/app/src/main/res/drawable-xxhdpi/icon_local-resetxxhdpi.png b/app/src/main/res/drawable-xxhdpi/icon_local_resetxxhdpi.png similarity index 100% rename from app/src/main/res/drawable-xxhdpi/icon_local-resetxxhdpi.png rename to app/src/main/res/drawable-xxhdpi/icon_local_resetxxhdpi.png diff --git a/app/src/main/res/drawable-xxhdpi/icon_local-savexxhdpi.png b/app/src/main/res/drawable-xxhdpi/icon_local_savexxhdpi.png similarity index 100% rename from app/src/main/res/drawable-xxhdpi/icon_local-savexxhdpi.png rename to app/src/main/res/drawable-xxhdpi/icon_local_savexxhdpi.png diff --git a/app/src/main/res/drawable-xxxhdpi/icon_local-activatexxxhdpi.png b/app/src/main/res/drawable-xxxhdpi/icon_local_activatexxxhdpi.png similarity index 100% rename from app/src/main/res/drawable-xxxhdpi/icon_local-activatexxxhdpi.png rename to app/src/main/res/drawable-xxxhdpi/icon_local_activatexxxhdpi.png diff --git a/app/src/main/res/drawable-xxxhdpi/icon_local-resetxxxhdpi.png b/app/src/main/res/drawable-xxxhdpi/icon_local_resetxxxhdpi.png similarity index 100% rename from app/src/main/res/drawable-xxxhdpi/icon_local-resetxxxhdpi.png rename to app/src/main/res/drawable-xxxhdpi/icon_local_resetxxxhdpi.png diff --git a/app/src/main/res/drawable-xxxhdpi/icon_local-savexxxhdpi.png b/app/src/main/res/drawable-xxxhdpi/icon_local_savexxxhdpi.png similarity index 100% rename from app/src/main/res/drawable-xxxhdpi/icon_local-savexxxhdpi.png rename to app/src/main/res/drawable-xxxhdpi/icon_local_savexxxhdpi.png From 416bd2ff4182a85524224bdbb912b85ce2008edb Mon Sep 17 00:00:00 2001 From: Andy Rozman Date: Wed, 2 May 2018 23:59:33 +0100 Subject: [PATCH 003/698] Feature Request/Bug #863 - added package PumpCommon for common pump files - added DoseSettings, DoseStepSize, PumpTempBasalType which are needed for PumpType - added PumpType which contains all definitions for pumps - extended fragement to display Pump Type and Pump Type definitions - extended plugin to read configuration and set pumpDescription object - extended pref_virtualpump to add pump type selection --- .../interfaces/PumpDescription.java | 36 +++ .../plugins/PumpCommon/data/DoseSettings.java | 49 ++++ .../plugins/PumpCommon/defs/DoseStepSize.java | 84 ++++++ .../PumpCommon/defs/PumpTempBasalType.java | 10 + .../plugins/PumpCommon/defs/PumpType.java | 271 ++++++++++++++++++ .../plugins/PumpCommon/utils/PumpUtil.java | 49 ++++ .../PumpVirtual/VirtualPumpFragment.java | 20 ++ .../PumpVirtual/VirtualPumpPlugin.java | 32 +++ .../main/res/layout/virtualpump_fragment.xml | 94 ++++++ app/src/main/res/values/arrays.xml | 21 ++ app/src/main/res/values/strings.xml | 4 + app/src/main/res/xml/pref_virtualpump.xml | 8 + 12 files changed, 678 insertions(+) create mode 100644 app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/data/DoseSettings.java create mode 100644 app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/DoseStepSize.java create mode 100644 app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpTempBasalType.java create mode 100644 app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpType.java create mode 100644 app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/utils/PumpUtil.java diff --git a/app/src/main/java/info/nightscout/androidaps/interfaces/PumpDescription.java b/app/src/main/java/info/nightscout/androidaps/interfaces/PumpDescription.java index 701b226031..10b0b3f453 100644 --- a/app/src/main/java/info/nightscout/androidaps/interfaces/PumpDescription.java +++ b/app/src/main/java/info/nightscout/androidaps/interfaces/PumpDescription.java @@ -37,4 +37,40 @@ public class PumpDescription { public boolean isRefillingCapable = false; public boolean storesCarbInfo = true; + + + public void resetSettings() + { + isBolusCapable = true; + bolusStep = 0.1d; + + isExtendedBolusCapable = true; + extendedBolusStep = 0.1d; + extendedBolusDurationStep = 30; + extendedBolusMaxDuration = 12 * 60; + + isTempBasalCapable = true; + tempBasalStyle = PERCENT; + + maxTempPercent = 200; + tempPercentStep = 10; + + maxTempAbsolute = 10; + tempAbsoluteStep = 0.05d; + + tempDurationStep = 60; + tempMaxDuration = 12 * 60; + + + isSetBasalProfileCapable = true; + basalStep = 0.01d; + basalMinimumRate = 0.04d; + + isRefillingCapable = false; + + storesCarbInfo = true; + + } + + } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/data/DoseSettings.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/data/DoseSettings.java new file mode 100644 index 0000000000..36ee4e5845 --- /dev/null +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/data/DoseSettings.java @@ -0,0 +1,49 @@ +package info.nightscout.androidaps.plugins.PumpCommon.data; + +/** + * Created by andy on 02/05/2018. + */ + +public class DoseSettings { + + private float step; + private int durationStep; + private int maxDuration; + private float minDose; + private Float maxDose; + + public DoseSettings(float step, int durationStep, int maxDuration, float minDose, Float maxDose) + { + this.step = step; + this.durationStep = durationStep; + this.maxDuration = maxDuration; + this.minDose = minDose; + this.maxDose = maxDose; + } + + public DoseSettings(float step, int durationStep, int maxDuration, float minDose) + { + this(step, durationStep, maxDuration, minDose, null); + } + + + public float getStep() { + return step; + } + + public int getDurationStep() { + return durationStep; + } + + public int getMaxDuration() { + return maxDuration; + } + + public float getMinDose() { + return minDose; + } + + public Float getMaxDose() { + return maxDose; + } +} diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/DoseStepSize.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/DoseStepSize.java new file mode 100644 index 0000000000..84293a0192 --- /dev/null +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/DoseStepSize.java @@ -0,0 +1,84 @@ +package info.nightscout.androidaps.plugins.PumpCommon.defs; + +/** + * Created by andy on 02/05/2018. + */ + +public enum DoseStepSize +{ + + ComboBasal( // + new DoseStepSizeEntry(0f, 1f, 0.01f), // + new DoseStepSizeEntry(1f, 10f, 0.05f), // + new DoseStepSizeEntry(10f, Float.MAX_VALUE, 0.1f)), // + + MedtronicVeoBasal( // + new DoseStepSizeEntry(0f, 1f, 0.025f), // + new DoseStepSizeEntry(1f, 10f, 0.05f), // + new DoseStepSizeEntry(10f, Float.MAX_VALUE, 0.1f)), // + + ; + + + DoseStepSizeEntry[] entries; + + + DoseStepSize(DoseStepSizeEntry...entries) + { + this.entries = entries; + } + + + public float getStepSizeForAmount(float amount) + { + for (DoseStepSizeEntry entry : entries) { + if (entry.from <= amount && entry.to > amount) + return entry.value; + } + + // should never come to this + return entries[entries.length-1].value; + } + + + public String getDescription() { + StringBuilder sb = new StringBuilder(); + + for (DoseStepSizeEntry entry : entries) { + + sb.append(entry.value); + sb.append(" {"); + sb.append(entry.from); + sb.append("-"); + + if (entry.to == Float.MAX_VALUE) + { + sb.append("~}"); + } + else + { + sb.append(entry.to); + sb.append("}, "); + } + } + + return sb.toString(); + } + + + static class DoseStepSizeEntry + { + float from; + float to; + float value; + + // to = this value is not included, but would actually mean <, so for rates between 0.025-0.975 u/h, we would have [from=0, to=10] + DoseStepSizeEntry(float from, float to, float value) + { + this.from = from; + this.to = to; + this.value = value; + } + } + +} \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpTempBasalType.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpTempBasalType.java new file mode 100644 index 0000000000..167e886ea7 --- /dev/null +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpTempBasalType.java @@ -0,0 +1,10 @@ +package info.nightscout.androidaps.plugins.PumpCommon.defs; + +/** + * Created by andy on 02/05/2018. + */ + +public enum PumpTempBasalType { + Percent, // + Absolute, +} diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpType.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpType.java new file mode 100644 index 0000000000..eac100cf0b --- /dev/null +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpType.java @@ -0,0 +1,271 @@ +package info.nightscout.androidaps.plugins.PumpCommon.defs; + + +import java.util.HashMap; +import java.util.Map; + +import info.nightscout.androidaps.plugins.PumpCommon.data.DoseSettings; + +/** + * Created by andy on 02/05/2018. + * + * Most of this defintions is intended for VirtualPump only, but they can be used by other plugins. + */ + +public enum PumpType { + + GenericAAPS("Generic AAPS", 0.1f, null, // + new DoseSettings(0.05f, 30, 8*60, 0.05f), // + PumpTempBasalType.Percent, // + new DoseSettings(10,30, 24*60, 0f, 500f), // + 0.01f, 0.01f, null), // + + // Cellnovo + + Cellnovo1("Cellnovo", 0.05f, null, // + new DoseSettings(0.05f, 30, 24*60, 1f, null), + PumpTempBasalType.Percent, + new DoseSettings(5,30, 24*60, 0f, 200f), // + 0.05f, 0.05f, null), // + + // Accu-Chek + + AccuChekCombo("Accu-Chek Combo", 0.1f, null, // + new DoseSettings(0.1f, 15, 12*60, 0.1f), // + PumpTempBasalType.Percent, + new DoseSettings(10, 15, 12*60,0f, 500f), // + 0.01f, 0.1f, DoseStepSize.ComboBasal), // + + AccuChekSpirit("Accu-Chek Spirit", AccuChekCombo), // + + + // Animas + AnimasVibe("Animas Vibe", 0.05f, null, // AnimasBolus? + new DoseSettings(0.05f, 30, 12*60, 0.05f), // + PumpTempBasalType.Percent, // + new DoseSettings(10, 30, 24*60, 0f, 200f), // + 0.025f, 5f, 0f, null), // + + AnimasPing("Animas Ping", AnimasVibe), + + // Insulet + Insulet_Omnipod("Insulet Omnipod", 0.05f, null, // + new DoseSettings(0.05f, 30, 8*60, 0.05f), // + PumpTempBasalType.Absolute, // + new DoseSettings(0.05f, 30, 12*60, 0f, 5.0f), // cannot exceed max basal rate 30u/hr + 0.05f, 0.05f, null), + + // Medtronic + Minimed_512_712("Medtronic 512/712", 0.05f, null, // + new DoseSettings(0.05f, 30, 8*60, 0.05f), // + PumpTempBasalType.Absolute, // + new DoseSettings(0.05f, 30, 24*60, 0f, 35f), // + 0.05f, 0.05f, null), // TODO + + Minimed_515_715("Medtronic 515/715", Minimed_512_712), // TODO + Minimed_522_722("Medtronic 522/722", Minimed_512_712), // TODO + Minimed_523_723("Medtronic 523/723", Minimed_512_712), // TODO + + Minimed_553_753_Revel("Medtronic 553/753 (Revel)", 0.05f, null, // + new DoseSettings(0.05f, 30, 8*60, 0.05f), // + PumpTempBasalType.Absolute, // + new DoseSettings(0.05f, 30, 24*60, 0f, 35f), // + 0.025f, 0.025f, DoseStepSize.MedtronicVeoBasal), // + + Minimed_554_754_Veo("Medtronic 554/754 (Veo)", Minimed_553_753_Revel), // TODO + + Minimed_640G("Medtronic 640G", 0.025f, null, // + new DoseSettings(0.05f, 30, 8*60, 0.05f), // + PumpTempBasalType.Absolute, // + new DoseSettings(0.05f, 30, 24*60, 0f, 35f), // + 0.025f, 0.025f, DoseStepSize.MedtronicVeoBasal), // + + // Tandem + TandemTSlim("Tandem t:slim", 0.01f, null, // + new DoseSettings(0.01f,15, 8*60, 0.4f) , + PumpTempBasalType.Percent, + new DoseSettings(1,15, 8*60, 0f, 250f), // + 0.1f, 0.001f, null), + + TandemTFlex("Tandem t:flex", TandemTSlim), // + TandemTSlimG4("Tandem t:slim G4", TandemTSlim), // + TandemTSlimX2("Tandem t:slim X2", TandemTSlim), // + ; + + private String description; + private float bolusSize; + private DoseStepSize specialBolusSize; + private DoseSettings extendedBolusSettings; + private PumpTempBasalType pumpTempBasalType; + private DoseSettings tbrSettings; + private float baseBasalMinValue; // + private float baseBasalMaxValue; + private float baseBasalStep; // + private DoseStepSize baseBasalSpecialSteps; // + + private PumpType parent; + private static Map mapByDescription; + + static + { + mapByDescription = new HashMap<>(); + + for (PumpType pumpType : values()) { + mapByDescription.put(pumpType.getDescription(), pumpType); + } + } + + + PumpType(String description, PumpType parent) + { + this.description = description; + this.parent = parent; + } + + + PumpType(String description, float bolusSize, DoseStepSize specialBolusSize, // + DoseSettings extendedBolusSettings, // + PumpTempBasalType pumpTempBasalType, DoseSettings tbrSettings, // + float baseBasalMinValue, float baseBasalStep, DoseStepSize baseBasalSpecialSteps) + { + this.description = description; + this.bolusSize = bolusSize; + this.specialBolusSize = specialBolusSize; + this.extendedBolusSettings = extendedBolusSettings; + this.pumpTempBasalType = pumpTempBasalType; + this.tbrSettings = tbrSettings; + this.baseBasalMinValue = baseBasalMinValue; + this.baseBasalStep = baseBasalStep; + this.baseBasalSpecialSteps = baseBasalSpecialSteps; + } + + PumpType(String description, float bolusSize, DoseStepSize specialBolusSize, // + DoseSettings extendedBolusSettings, // + PumpTempBasalType pumpTempBasalType, DoseSettings tbrSettings, // + float baseBasalMinValue, float baseBasalMaxValue, float baseBasalStep, DoseStepSize baseBasalSpecialSteps) + { + this.description = description; + this.bolusSize = bolusSize; + this.specialBolusSize = specialBolusSize; + this.extendedBolusSettings = extendedBolusSettings; + this.pumpTempBasalType = pumpTempBasalType; + this.tbrSettings = tbrSettings; + this.baseBasalMinValue = baseBasalMinValue; + this.baseBasalMaxValue = baseBasalMaxValue; + this.baseBasalStep = baseBasalStep; + this.baseBasalSpecialSteps = baseBasalSpecialSteps; + } + + + public String getDescription() { + return description; + } + + + public float getBolusSize() { + return isParentSet() ? parent.bolusSize : bolusSize; + } + + + public DoseStepSize getSpecialBolusSize() { + return isParentSet() ? parent.specialBolusSize : specialBolusSize; + } + + + public DoseSettings getExtendedBolusSettings() { + return isParentSet() ? parent.extendedBolusSettings : extendedBolusSettings; + } + + + public PumpTempBasalType getPumpTempBasalType() { + return isParentSet() ? parent.pumpTempBasalType : pumpTempBasalType; + } + + + public DoseSettings getTbrSettings() { + return isParentSet() ? parent.tbrSettings : tbrSettings; + } + + + public float getBaseBasalMinValue() { + return isParentSet() ? parent.baseBasalMinValue : baseBasalMinValue; + } + + + public Float getBaseBasalMaxValue() { + return isParentSet() ? parent.baseBasalMaxValue : baseBasalMaxValue; + } + + + public float getBaseBasalStep() { + return isParentSet() ? parent.baseBasalStep : baseBasalStep; + } + + + public DoseStepSize getBaseBasalSpecialSteps() { + return isParentSet() ? parent.baseBasalSpecialSteps : baseBasalSpecialSteps; + } + + + public PumpType getParent() { + return parent; + } + + + private boolean isParentSet() + { + return this.parent!=null; + } + + + public static PumpType getByDescription(String desc) + { + if (mapByDescription.containsKey(desc)) + { + return mapByDescription.get(desc); + } + else + { + return PumpType.GenericAAPS; + } + } + + + public String getFullDescription(String i18nTemplate) { + + String unit = getPumpTempBasalType()==PumpTempBasalType.Percent ? "%" : ""; + + DoseSettings eb = getExtendedBolusSettings(); + DoseSettings tbr = getTbrSettings(); + + return String.format(i18nTemplate, // + getStep("" + getBolusSize(), getSpecialBolusSize()), // + eb.getStep(), eb.getDurationStep(), eb.getMaxDuration()/60, // + getStep(getBaseBasalRange(), getBaseBasalSpecialSteps()), // + tbr.getMinDose() + unit + "-" + tbr.getMaxDose() + unit, tbr.getStep() + unit, tbr.getDurationStep(), tbr.getMaxDuration()/60); + } + + + private String getBaseBasalRange() + { + Float maxValue = getBaseBasalMaxValue(); + + return maxValue==null ? "" + getBaseBasalMinValue() : getBaseBasalMinValue() + "-" + maxValue; + } + + + private String getStep(String step, DoseStepSize stepSize) + { + if (stepSize!=null) + return step + " [" + stepSize.getDescription() + "] *"; + else + return "" + step; + } + + + public boolean hasExtendedBasals() { + return ((getBaseBasalSpecialSteps() !=null) || (getSpecialBolusSize() != null)); + } + + +} diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/utils/PumpUtil.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/utils/PumpUtil.java new file mode 100644 index 0000000000..87c7f07ba4 --- /dev/null +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/utils/PumpUtil.java @@ -0,0 +1,49 @@ +package info.nightscout.androidaps.plugins.PumpCommon.utils; + +import info.nightscout.androidaps.interfaces.PumpDescription; +import info.nightscout.androidaps.plugins.PumpCommon.defs.PumpTempBasalType; +import info.nightscout.androidaps.plugins.PumpCommon.defs.PumpType; + +/** + * Created by andy on 02/05/2018. + */ + +public class PumpUtil { + + // for now used only by VirtualPump, but with small changes could be used by any constructor + public static void setPumpDescription(PumpDescription pumpDescription, PumpType pumpType) + { + pumpDescription.isBolusCapable = true; + pumpDescription.bolusStep = pumpType.getBolusSize(); + + pumpDescription.isExtendedBolusCapable = true; + pumpDescription.extendedBolusStep = pumpType.getExtendedBolusSettings().getStep(); + pumpDescription.extendedBolusDurationStep = pumpType.getExtendedBolusSettings().getDurationStep(); + pumpDescription.extendedBolusMaxDuration = pumpType.getExtendedBolusSettings().getMaxDuration(); + + pumpDescription.isTempBasalCapable = true; + + if (pumpType.getPumpTempBasalType()==PumpTempBasalType.Percent) + { + pumpDescription.tempBasalStyle = PumpDescription.PERCENT; + pumpDescription.maxTempPercent = pumpType.getTbrSettings().getMaxDose().intValue(); + pumpDescription.tempPercentStep = (int)pumpType.getTbrSettings().getStep(); + } + else + { + pumpDescription.tempBasalStyle = PumpDescription.ABSOLUTE; + pumpDescription.maxTempAbsolute = pumpType.getTbrSettings().getMaxDose(); + pumpDescription.tempAbsoluteStep = pumpType.getTbrSettings().getStep(); + } + + pumpDescription.tempDurationStep = pumpType.getTbrSettings().getDurationStep(); + pumpDescription.tempMaxDuration = pumpType.getTbrSettings().getMaxDuration(); + + + pumpDescription.isSetBasalProfileCapable = true; + pumpDescription.basalStep = pumpType.getBaseBasalStep(); + pumpDescription.basalMinimumRate = pumpType.getBaseBasalMinValue(); + } + + +} diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpFragment.java index ebaf2b19dd..a5c2b4dd93 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpFragment.java @@ -19,6 +19,7 @@ import org.slf4j.LoggerFactory; import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.R; import info.nightscout.androidaps.plugins.Common.SubscriberFragment; +import info.nightscout.androidaps.plugins.PumpCommon.defs.PumpType; import info.nightscout.androidaps.plugins.PumpVirtual.events.EventVirtualPumpUpdateGui; public class VirtualPumpFragment extends SubscriberFragment { @@ -29,6 +30,9 @@ public class VirtualPumpFragment extends SubscriberFragment { TextView extendedBolusView; TextView batteryView; TextView reservoirView; + TextView pumpTypeView; + TextView pumpSettingsView; + private static Handler sLoopHandler = new Handler(); private static Runnable sRefreshLoop = null; @@ -58,6 +62,8 @@ public class VirtualPumpFragment extends SubscriberFragment { extendedBolusView = (TextView) view.findViewById(R.id.virtualpump_extendedbolus); batteryView = (TextView) view.findViewById(R.id.virtualpump_battery); reservoirView = (TextView) view.findViewById(R.id.virtualpump_reservoir); + pumpTypeView = (TextView) view.findViewById(R.id.virtualpump_type); + pumpSettingsView = (TextView) view.findViewById(R.id.virtualpump_type_def); return view; } catch (Exception e) { @@ -93,6 +99,20 @@ public class VirtualPumpFragment extends SubscriberFragment { } batteryView.setText(virtualPump.batteryPercent + "%"); reservoirView.setText(virtualPump.reservoirInUnits + "U"); + + virtualPump.refreshConfiguration(); + + PumpType pumpType = virtualPump.getPumpType(); + + pumpTypeView.setText(pumpType.getDescription()); + + String template = MainApp.gs(R.string.virtualpump_pump_def); + + template = template.replace("EXTENDED_NOTE", pumpType.hasExtendedBasals() ? // + MainApp.gs(R.string.virtualpump_pump_def_extended_note) : ""); + + pumpSettingsView.setText(pumpType.getFullDescription(template)); + } }); } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java index 1c9fdaaaf7..cf89e81093 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java @@ -26,6 +26,8 @@ import info.nightscout.androidaps.interfaces.TreatmentsInterface; import info.nightscout.androidaps.plugins.Overview.events.EventNewNotification; import info.nightscout.androidaps.plugins.Overview.events.EventOverviewBolusProgress; import info.nightscout.androidaps.plugins.Overview.notifications.Notification; +import info.nightscout.androidaps.plugins.PumpCommon.defs.PumpType; +import info.nightscout.androidaps.plugins.PumpCommon.utils.PumpUtil; import info.nightscout.androidaps.plugins.PumpVirtual.events.EventVirtualPumpUpdateGui; import info.nightscout.utils.DateUtil; import info.nightscout.utils.NSUpload; @@ -51,6 +53,9 @@ public class VirtualPumpPlugin implements PluginBase, PumpInterface { private PumpDescription pumpDescription = new PumpDescription(); + PumpType pumpType = null; + + private static void loadFakingStatus() { fromNSAreCommingFakedExtendedBoluses = SP.getBoolean("fromNSAreCommingFakedExtendedBoluses", false); } @@ -460,4 +465,31 @@ public class VirtualPumpPlugin implements PluginBase, PumpInterface { return "Virtual Pump"; } + public PumpType getPumpType() + { + return pumpType; + } + + + public void refreshConfiguration() + { + String pumptype = SP.getString("virtualpump_type", "Generic AAPS"); + + PumpType pumpTypeNew = PumpType.getByDescription(pumptype); + + if (pumpType == pumpTypeNew) + return; + + // reset + pumpDescription.resetSettings(); + + // virtual pump specific (not configurable) + pumpDescription.isRefillingCapable = false; + + PumpUtil.setPumpDescription(pumpDescription, pumpTypeNew); + + this.pumpType = pumpTypeNew; + + } + } diff --git a/app/src/main/res/layout/virtualpump_fragment.xml b/app/src/main/res/layout/virtualpump_fragment.xml index 3643c95bf5..0cc6e739ff 100644 --- a/app/src/main/res/layout/virtualpump_fragment.xml +++ b/app/src/main/res/layout/virtualpump_fragment.xml @@ -189,6 +189,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 660f6ee00e..aee358981e 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -100,4 +100,25 @@ @string/yes + + Generic AAPS + Cellnovo + Accu-Chek Spirit + Accu-Chek Combo + Animas Ping + Animas Vibe + Insulet Omnipod + Medtronic 512/712 + Medtronic 515/715 + Medtronic 522/722 + Medtronic 523/723 + Medtronic 553/753 (Revel) + Medtronic 554/754 (Veo) + Medtronic 640G + Tandem t:slim + Tandem t:flex + Tandem t:slim G4 + Tandem t:slim X2 + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 554b7f759f..27726bf7ab 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -861,5 +861,9 @@ Recovering from connection loss Not enough insulin for bolus left in reservoir Extended bolus delivery error + Virtual Pump Type + Pump Definition + Bolus: Step=%s\nExtended Bolus: [Step=%s, Duration=%smin-%sh]\nBasal: Step=%s\nTBR: %s (by %s), Duration=%smin-%sh\nEXTENDED_NOTE + * Ranged basal/bolus values are not supported by Virtual Pump. diff --git a/app/src/main/res/xml/pref_virtualpump.xml b/app/src/main/res/xml/pref_virtualpump.xml index 23d39114b4..ac65f5e228 100644 --- a/app/src/main/res/xml/pref_virtualpump.xml +++ b/app/src/main/res/xml/pref_virtualpump.xml @@ -8,6 +8,14 @@ android:defaultValue="false" android:key="virtualpump_uploadstatus" android:title="@string/virtualpump_uploadstatus_title" /> + + + \ No newline at end of file From 5b8779f8a7db88e3dd0a3dc6c0e179e683a8f763 Mon Sep 17 00:00:00 2001 From: Andy Rozman Date: Thu, 3 May 2018 15:10:34 +0100 Subject: [PATCH 004/698] Feature Request/Bug #863 - added PumpCapability (to set boolean values) - added Dana Pumps to PumpType and to VirtulaPumps array --- .../PumpCommon/defs/PumpCapability.java | 63 +++++++++++++ .../plugins/PumpCommon/defs/PumpType.java | 88 +++++++++++++------ .../plugins/PumpCommon/utils/PumpUtil.java | 20 +++-- .../PumpVirtual/VirtualPumpPlugin.java | 5 +- app/src/main/res/values/arrays.xml | 4 + 5 files changed, 143 insertions(+), 37 deletions(-) create mode 100644 app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpCapability.java diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpCapability.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpCapability.java new file mode 100644 index 0000000000..3ee41c67ec --- /dev/null +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpCapability.java @@ -0,0 +1,63 @@ +package info.nightscout.androidaps.plugins.PumpCommon.defs; + +/** + * Created by andy on 03/05/2018. + */ + +public enum PumpCapability { + + Bolus, // + ExtendedBolus, // + TBR, // + BasalProfileSet, // + Refill, // + StoreCarbInfo, // + + // grouped + VirtualPump(Bolus, ExtendedBolus, TBR, BasalProfileSet, StoreCarbInfo), // + + Bolus_TBR_Basal_Refill_Carb(Bolus, TBR, BasalProfileSet, Refill, StoreCarbInfo), // + Bolus_Extended_TBR_Basal_Carb(Bolus, ExtendedBolus, TBR, BasalProfileSet, StoreCarbInfo), // + Bolus_Extended_TBR_Basal_Refill_Carb(Bolus, ExtendedBolus, TBR, BasalProfileSet, Refill, StoreCarbInfo), // + + ; + + PumpCapability[] children; + + + PumpCapability() + { + } + + + PumpCapability(PumpCapability...children) + { + this.children = children; + } + + + public boolean hasCapability(PumpCapability capability) + { + // we can only check presense of simple capabilities + if (capability.children != null) + return false; + + if (this == capability) + return true; + + if (this.children!=null) + { + for (PumpCapability child : children) { + if (child == capability) + return true; + } + + return false; + } + else + return false; + } + + + +} diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpType.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpType.java index eac100cf0b..0c74ef38ab 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpType.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpType.java @@ -4,8 +4,11 @@ package info.nightscout.androidaps.plugins.PumpCommon.defs; import java.util.HashMap; import java.util.Map; +import info.nightscout.androidaps.interfaces.PumpDescription; import info.nightscout.androidaps.plugins.PumpCommon.data.DoseSettings; + + /** * Created by andy on 02/05/2018. * @@ -18,7 +21,7 @@ public enum PumpType { new DoseSettings(0.05f, 30, 8*60, 0.05f), // PumpTempBasalType.Percent, // new DoseSettings(10,30, 24*60, 0f, 500f), // - 0.01f, 0.01f, null), // + 0.01f, 0.01f, null, PumpCapability.VirtualPump), // // Cellnovo @@ -26,7 +29,7 @@ public enum PumpType { new DoseSettings(0.05f, 30, 24*60, 1f, null), PumpTempBasalType.Percent, new DoseSettings(5,30, 24*60, 0f, 200f), // - 0.05f, 0.05f, null), // + 0.05f, 0.05f, null, PumpCapability.VirtualPump), // // Accu-Chek @@ -34,9 +37,13 @@ public enum PumpType { new DoseSettings(0.1f, 15, 12*60, 0.1f), // PumpTempBasalType.Percent, new DoseSettings(10, 15, 12*60,0f, 500f), // - 0.01f, 0.1f, DoseStepSize.ComboBasal), // + 0.01f, 0.1f, DoseStepSize.ComboBasal, PumpCapability.Bolus_TBR_Basal_Refill_Carb), // - AccuChekSpirit("Accu-Chek Spirit", AccuChekCombo), // + AccuChekSpirit("Accu-Chek Spirit", 0.1f, null, // + new DoseSettings(0.1f, 15, 12*60, 0.1f), // + PumpTempBasalType.Percent, + new DoseSettings(10, 15, 12*60,0f, 500f), // + 0.01f, 0.1f, null, PumpCapability.VirtualPump), // // Animas @@ -44,33 +51,50 @@ public enum PumpType { new DoseSettings(0.05f, 30, 12*60, 0.05f), // PumpTempBasalType.Percent, // new DoseSettings(10, 30, 24*60, 0f, 200f), // - 0.025f, 5f, 0f, null), // + 0.025f, 5f, 0f, null, PumpCapability.VirtualPump), // AnimasPing("Animas Ping", AnimasVibe), + // Dana + DanaR("DanaR", 0.05f, null, // + new DoseSettings(0.05f, 30, 8*60, 0.05f), // + PumpTempBasalType.Percent, // + new DoseSettings(10f, 60, 24*60, 0f, 200f), // + 0.04f, 0.01f, null, PumpCapability.Bolus_Extended_TBR_Basal_Refill_Carb), + + DanaRKorean("DanaR Korean", 0.05f, null, // + new DoseSettings(0.05f, 30, 8*60, 0.05f), // + PumpTempBasalType.Percent, // + new DoseSettings(10f, 60, 24*60, 0f, 200f), // + 0.1f, 0.01f, null, PumpCapability.Bolus_Extended_TBR_Basal_Refill_Carb), + + DanaRS("DanaRS", DanaR), + DanaRv2("DanaRv2", DanaR), + + // Insulet Insulet_Omnipod("Insulet Omnipod", 0.05f, null, // new DoseSettings(0.05f, 30, 8*60, 0.05f), // PumpTempBasalType.Absolute, // new DoseSettings(0.05f, 30, 12*60, 0f, 5.0f), // cannot exceed max basal rate 30u/hr - 0.05f, 0.05f, null), + 0.05f, 0.05f, null, PumpCapability.VirtualPump), // Medtronic Minimed_512_712("Medtronic 512/712", 0.05f, null, // new DoseSettings(0.05f, 30, 8*60, 0.05f), // PumpTempBasalType.Absolute, // new DoseSettings(0.05f, 30, 24*60, 0f, 35f), // - 0.05f, 0.05f, null), // TODO + 0.05f, 0.05f, null, PumpCapability.VirtualPump), // TODO - Minimed_515_715("Medtronic 515/715", Minimed_512_712), // TODO - Minimed_522_722("Medtronic 522/722", Minimed_512_712), // TODO - Minimed_523_723("Medtronic 523/723", Minimed_512_712), // TODO + Minimed_515_715("Medtronic 515/715", Minimed_512_712), + Minimed_522_722("Medtronic 522/722", Minimed_512_712), + Minimed_523_723("Medtronic 523/723", Minimed_512_712), Minimed_553_753_Revel("Medtronic 553/753 (Revel)", 0.05f, null, // new DoseSettings(0.05f, 30, 8*60, 0.05f), // PumpTempBasalType.Absolute, // new DoseSettings(0.05f, 30, 24*60, 0f, 35f), // - 0.025f, 0.025f, DoseStepSize.MedtronicVeoBasal), // + 0.025f, 0.025f, DoseStepSize.MedtronicVeoBasal, PumpCapability.VirtualPump), // Minimed_554_754_Veo("Medtronic 554/754 (Veo)", Minimed_553_753_Revel), // TODO @@ -78,14 +102,14 @@ public enum PumpType { new DoseSettings(0.05f, 30, 8*60, 0.05f), // PumpTempBasalType.Absolute, // new DoseSettings(0.05f, 30, 24*60, 0f, 35f), // - 0.025f, 0.025f, DoseStepSize.MedtronicVeoBasal), // + 0.025f, 0.025f, DoseStepSize.MedtronicVeoBasal, PumpCapability.VirtualPump), // // Tandem TandemTSlim("Tandem t:slim", 0.01f, null, // new DoseSettings(0.01f,15, 8*60, 0.4f) , PumpTempBasalType.Percent, new DoseSettings(1,15, 8*60, 0f, 250f), // - 0.1f, 0.001f, null), + 0.1f, 0.001f, null, PumpCapability.VirtualPump), TandemTFlex("Tandem t:flex", TandemTSlim), // TandemTSlimG4("Tandem t:slim G4", TandemTSlim), // @@ -99,9 +123,10 @@ public enum PumpType { private PumpTempBasalType pumpTempBasalType; private DoseSettings tbrSettings; private float baseBasalMinValue; // - private float baseBasalMaxValue; + private Float baseBasalMaxValue; private float baseBasalStep; // private DoseStepSize baseBasalSpecialSteps; // + private PumpCapability pumpCapability; private PumpType parent; private static Map mapByDescription; @@ -122,27 +147,25 @@ public enum PumpType { this.parent = parent; } - - PumpType(String description, float bolusSize, DoseStepSize specialBolusSize, // - DoseSettings extendedBolusSettings, // - PumpTempBasalType pumpTempBasalType, DoseSettings tbrSettings, // - float baseBasalMinValue, float baseBasalStep, DoseStepSize baseBasalSpecialSteps) + PumpType(String description, PumpType parent, PumpCapability pumpCapability) { this.description = description; - this.bolusSize = bolusSize; - this.specialBolusSize = specialBolusSize; - this.extendedBolusSettings = extendedBolusSettings; - this.pumpTempBasalType = pumpTempBasalType; - this.tbrSettings = tbrSettings; - this.baseBasalMinValue = baseBasalMinValue; - this.baseBasalStep = baseBasalStep; - this.baseBasalSpecialSteps = baseBasalSpecialSteps; + this.parent = parent; + this.pumpCapability = pumpCapability; } PumpType(String description, float bolusSize, DoseStepSize specialBolusSize, // DoseSettings extendedBolusSettings, // PumpTempBasalType pumpTempBasalType, DoseSettings tbrSettings, // - float baseBasalMinValue, float baseBasalMaxValue, float baseBasalStep, DoseStepSize baseBasalSpecialSteps) + float baseBasalMinValue, float baseBasalStep, DoseStepSize baseBasalSpecialSteps, PumpCapability pumpCapability) + { + this(description, bolusSize, specialBolusSize, extendedBolusSettings, pumpTempBasalType, tbrSettings, baseBasalMinValue, null, baseBasalStep, baseBasalSpecialSteps, pumpCapability); + } + + PumpType(String description, float bolusSize, DoseStepSize specialBolusSize, // + DoseSettings extendedBolusSettings, // + PumpTempBasalType pumpTempBasalType, DoseSettings tbrSettings, // + float baseBasalMinValue, Float baseBasalMaxValue, float baseBasalStep, DoseStepSize baseBasalSpecialSteps, PumpCapability pumpCapability) { this.description = description; this.bolusSize = bolusSize; @@ -154,6 +177,7 @@ public enum PumpType { this.baseBasalMaxValue = baseBasalMaxValue; this.baseBasalStep = baseBasalStep; this.baseBasalSpecialSteps = baseBasalSpecialSteps; + this.pumpCapability = pumpCapability; } @@ -161,6 +185,13 @@ public enum PumpType { return description; } + public PumpCapability getPumpCapability() { + + if (isParentSet()) + return this.pumpCapability == null ? parent.pumpCapability : pumpCapability; + else + return this.pumpCapability; + } public float getBolusSize() { return isParentSet() ? parent.bolusSize : bolusSize; @@ -268,4 +299,5 @@ public enum PumpType { } + } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/utils/PumpUtil.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/utils/PumpUtil.java index 87c7f07ba4..a18ff6f7bf 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/utils/PumpUtil.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/utils/PumpUtil.java @@ -1,6 +1,7 @@ package info.nightscout.androidaps.plugins.PumpCommon.utils; import info.nightscout.androidaps.interfaces.PumpDescription; +import info.nightscout.androidaps.plugins.PumpCommon.defs.PumpCapability; import info.nightscout.androidaps.plugins.PumpCommon.defs.PumpTempBasalType; import info.nightscout.androidaps.plugins.PumpCommon.defs.PumpType; @@ -10,18 +11,24 @@ import info.nightscout.androidaps.plugins.PumpCommon.defs.PumpType; public class PumpUtil { - // for now used only by VirtualPump, but with small changes could be used by any constructor public static void setPumpDescription(PumpDescription pumpDescription, PumpType pumpType) { - pumpDescription.isBolusCapable = true; + setPumpDescription(pumpDescription, pumpType, false); + } + + public static void setPumpDescription(PumpDescription pumpDescription, PumpType pumpType, boolean isVirtualPump) + { + PumpCapability pumpCapability = isVirtualPump ? PumpCapability.VirtualPump : pumpType.getPumpCapability(); + + pumpDescription.isBolusCapable = pumpCapability.hasCapability(PumpCapability.Bolus); pumpDescription.bolusStep = pumpType.getBolusSize(); - pumpDescription.isExtendedBolusCapable = true; + pumpDescription.isExtendedBolusCapable = pumpCapability.hasCapability(PumpCapability.ExtendedBolus); pumpDescription.extendedBolusStep = pumpType.getExtendedBolusSettings().getStep(); pumpDescription.extendedBolusDurationStep = pumpType.getExtendedBolusSettings().getDurationStep(); pumpDescription.extendedBolusMaxDuration = pumpType.getExtendedBolusSettings().getMaxDuration(); - pumpDescription.isTempBasalCapable = true; + pumpDescription.isTempBasalCapable = pumpCapability.hasCapability(PumpCapability.TBR); if (pumpType.getPumpTempBasalType()==PumpTempBasalType.Percent) { @@ -40,9 +47,12 @@ public class PumpUtil { pumpDescription.tempMaxDuration = pumpType.getTbrSettings().getMaxDuration(); - pumpDescription.isSetBasalProfileCapable = true; + pumpDescription.isSetBasalProfileCapable = pumpCapability.hasCapability(PumpCapability.BasalProfileSet); pumpDescription.basalStep = pumpType.getBaseBasalStep(); pumpDescription.basalMinimumRate = pumpType.getBaseBasalMinValue(); + + pumpDescription.isRefillingCapable = pumpCapability.hasCapability(PumpCapability.Refill); + pumpDescription.storesCarbInfo = pumpCapability.hasCapability(PumpCapability.StoreCarbInfo); } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java index cf89e81093..57f4d5fe79 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java @@ -483,10 +483,7 @@ public class VirtualPumpPlugin implements PluginBase, PumpInterface { // reset pumpDescription.resetSettings(); - // virtual pump specific (not configurable) - pumpDescription.isRefillingCapable = false; - - PumpUtil.setPumpDescription(pumpDescription, pumpTypeNew); + PumpUtil.setPumpDescription(pumpDescription, pumpTypeNew, true); this.pumpType = pumpTypeNew; diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index aee358981e..208833ab01 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -107,6 +107,10 @@ Accu-Chek Combo Animas Ping Animas Vibe + DanaR + DanaR Korean + DanaRS + DanaRv2 Insulet Omnipod Medtronic 512/712 Medtronic 515/715 From 4fb8e899c213f744397761379a78dbf0b9967ebc Mon Sep 17 00:00:00 2001 From: Andy Rozman Date: Fri, 4 May 2018 15:48:46 +0100 Subject: [PATCH 005/698] Feature Request/Bug #863 - merged with dev - extended PumpType with new setting in PumpDescription - added Insight pump settings for VirtualPump --- .../interfaces/PumpDescription.java | 11 +-- .../plugins/PumpCommon/defs/DoseStepSize.java | 6 ++ .../PumpCommon/defs/PumpCapability.java | 33 +++++--- .../plugins/PumpCommon/defs/PumpType.java | 77 +++++++++++-------- .../plugins/PumpCommon/utils/PumpUtil.java | 18 +++-- .../PumpVirtual/VirtualPumpFragment.java | 1 + .../PumpVirtual/VirtualPumpPlugin.java | 2 +- app/src/main/res/values/arrays.xml | 3 +- 8 files changed, 94 insertions(+), 57 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/interfaces/PumpDescription.java b/app/src/main/java/info/nightscout/androidaps/interfaces/PumpDescription.java index f3d93b7c65..27fa818528 100644 --- a/app/src/main/java/info/nightscout/androidaps/interfaces/PumpDescription.java +++ b/app/src/main/java/info/nightscout/androidaps/interfaces/PumpDescription.java @@ -58,24 +58,25 @@ public class PumpDescription { isTempBasalCapable = true; tempBasalStyle = PERCENT; - maxTempPercent = 200; tempPercentStep = 10; - maxTempAbsolute = 10; tempAbsoluteStep = 0.05d; - tempDurationStep = 60; tempMaxDuration = 12 * 60; - + tempDurationStep15mAllowed = false; + tempDurationStep30mAllowed = false; isSetBasalProfileCapable = true; basalStep = 0.01d; basalMinimumRate = 0.04d; + is30minBasalRatesCapable = false; isRefillingCapable = false; - storesCarbInfo = true; + supportsTDDs = false; + needsManualTDDLoad = true; + } } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/DoseStepSize.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/DoseStepSize.java index 84293a0192..69691886e2 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/DoseStepSize.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/DoseStepSize.java @@ -12,6 +12,12 @@ public enum DoseStepSize new DoseStepSizeEntry(1f, 10f, 0.05f), // new DoseStepSizeEntry(10f, Float.MAX_VALUE, 0.1f)), // + InsightBolus( + new DoseStepSizeEntry(0f, 2f, 0.05f), // + new DoseStepSizeEntry(2f, 5f, 0.1f), // + new DoseStepSizeEntry(5f, 10f, 0.2f), // + new DoseStepSizeEntry(10f, Float.MAX_VALUE, 0.5f)), + MedtronicVeoBasal( // new DoseStepSizeEntry(0f, 1f, 0.025f), // new DoseStepSizeEntry(1f, 10f, 0.05f), // diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpCapability.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpCapability.java index 3ee41c67ec..e38df6f4e0 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpCapability.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpCapability.java @@ -6,19 +6,30 @@ package info.nightscout.androidaps.plugins.PumpCommon.defs; public enum PumpCapability { - Bolus, // - ExtendedBolus, // - TBR, // - BasalProfileSet, // - Refill, // - StoreCarbInfo, // + Bolus, // isBolusCapable + ExtendedBolus, // isExtendedBolusCapable + TempBasal, // isTempBasalCapable + BasalProfileSet, // isSetBasalProfileCapable + Refill, // isRefillingCapable + StoreCarbInfo, // storesCarbInfo + TDD, // supportsTDDs + ManualTDDLoad, // needsManualTDDLoad + BasalRate30min, // is30minBasalRatesCapable + + // grouped by pump + VirtualPumpCapabilities(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, Refill), // + ComboCapabilities(Bolus, TempBasal, BasalProfileSet, Refill, StoreCarbInfo, TDD, ManualTDDLoad), // + DanaCapabilities(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, Refill, StoreCarbInfo, TDD, ManualTDDLoad), // + InsightCapabilities(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, Refill,TDD,BasalRate30min), // + + + // BasalRates (separately grouped) + BasalRate_Duration15minAllowed, // + BasalRate_Duration30minAllowed, // + BasalRate_Duration15and30minAllowed(BasalRate_Duration15minAllowed, BasalRate_Duration30minAllowed), // + BasalRate_Duration15and30minNotAllowed, // - // grouped - VirtualPump(Bolus, ExtendedBolus, TBR, BasalProfileSet, StoreCarbInfo), // - Bolus_TBR_Basal_Refill_Carb(Bolus, TBR, BasalProfileSet, Refill, StoreCarbInfo), // - Bolus_Extended_TBR_Basal_Carb(Bolus, ExtendedBolus, TBR, BasalProfileSet, StoreCarbInfo), // - Bolus_Extended_TBR_Basal_Refill_Carb(Bolus, ExtendedBolus, TBR, BasalProfileSet, Refill, StoreCarbInfo), // ; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpType.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpType.java index 0c74ef38ab..bc6d3f061e 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpType.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpType.java @@ -4,7 +4,6 @@ package info.nightscout.androidaps.plugins.PumpCommon.defs; import java.util.HashMap; import java.util.Map; -import info.nightscout.androidaps.interfaces.PumpDescription; import info.nightscout.androidaps.plugins.PumpCommon.data.DoseSettings; @@ -20,38 +19,43 @@ public enum PumpType { GenericAAPS("Generic AAPS", 0.1f, null, // new DoseSettings(0.05f, 30, 8*60, 0.05f), // PumpTempBasalType.Percent, // - new DoseSettings(10,30, 24*60, 0f, 500f), // - 0.01f, 0.01f, null, PumpCapability.VirtualPump), // + new DoseSettings(10,30, 24*60, 0f, 500f), PumpCapability.BasalRate_Duration15and30minAllowed, // + 0.01f, 0.01f, null, PumpCapability.VirtualPumpCapabilities), // // Cellnovo Cellnovo1("Cellnovo", 0.05f, null, // new DoseSettings(0.05f, 30, 24*60, 1f, null), PumpTempBasalType.Percent, - new DoseSettings(5,30, 24*60, 0f, 200f), // - 0.05f, 0.05f, null, PumpCapability.VirtualPump), // + new DoseSettings(5,30, 24*60, 0f, 200f), PumpCapability.BasalRate_Duration30minAllowed, // + 0.05f, 0.05f, null, PumpCapability.VirtualPumpCapabilities), // // Accu-Chek AccuChekCombo("Accu-Chek Combo", 0.1f, null, // new DoseSettings(0.1f, 15, 12*60, 0.1f), // PumpTempBasalType.Percent, - new DoseSettings(10, 15, 12*60,0f, 500f), // - 0.01f, 0.1f, DoseStepSize.ComboBasal, PumpCapability.Bolus_TBR_Basal_Refill_Carb), // + new DoseSettings(10, 15, 12*60,0f, 500f), PumpCapability.BasalRate_Duration15and30minAllowed, // + 0.01f, 0.1f, DoseStepSize.ComboBasal, PumpCapability.ComboCapabilities), // AccuChekSpirit("Accu-Chek Spirit", 0.1f, null, // new DoseSettings(0.1f, 15, 12*60, 0.1f), // PumpTempBasalType.Percent, - new DoseSettings(10, 15, 12*60,0f, 500f), // - 0.01f, 0.1f, null, PumpCapability.VirtualPump), // + new DoseSettings(10, 15, 12*60,0f, 500f), PumpCapability.BasalRate_Duration15and30minAllowed, // + 0.01f, 0.1f, null, PumpCapability.VirtualPumpCapabilities), // + AccuChekInsight("Accu-Chek Insight", 0.05f, DoseStepSize.InsightBolus, // + new DoseSettings(0.05f, 15, 24*60, 0.05f), // + PumpTempBasalType.Percent, + new DoseSettings(10, 15, 12*60,0f, 250f), PumpCapability.BasalRate_Duration15and30minAllowed, // + 0.02f, 0.1f, null, PumpCapability.InsightCapabilities), // // Animas AnimasVibe("Animas Vibe", 0.05f, null, // AnimasBolus? new DoseSettings(0.05f, 30, 12*60, 0.05f), // PumpTempBasalType.Percent, // - new DoseSettings(10, 30, 24*60, 0f, 200f), // - 0.025f, 5f, 0f, null, PumpCapability.VirtualPump), // + new DoseSettings(10, 30, 24*60, 0f, 200f), PumpCapability.BasalRate_Duration30minAllowed, // + 0.025f, 5f, 0f, null, PumpCapability.VirtualPumpCapabilities), // AnimasPing("Animas Ping", AnimasVibe), @@ -59,32 +63,37 @@ public enum PumpType { DanaR("DanaR", 0.05f, null, // new DoseSettings(0.05f, 30, 8*60, 0.05f), // PumpTempBasalType.Percent, // - new DoseSettings(10f, 60, 24*60, 0f, 200f), // - 0.04f, 0.01f, null, PumpCapability.Bolus_Extended_TBR_Basal_Refill_Carb), + new DoseSettings(10f, 60, 24*60, 0f, 200f), PumpCapability.BasalRate_Duration15and30minNotAllowed, // + 0.04f, 0.01f, null, PumpCapability.DanaCapabilities), DanaRKorean("DanaR Korean", 0.05f, null, // new DoseSettings(0.05f, 30, 8*60, 0.05f), // PumpTempBasalType.Percent, // - new DoseSettings(10f, 60, 24*60, 0f, 200f), // - 0.1f, 0.01f, null, PumpCapability.Bolus_Extended_TBR_Basal_Refill_Carb), + new DoseSettings(10f, 60, 24*60, 0f, 200f), PumpCapability.BasalRate_Duration15and30minNotAllowed, // + 0.1f, 0.01f, null, PumpCapability.DanaCapabilities), - DanaRS("DanaRS", DanaR), - DanaRv2("DanaRv2", DanaR), + DanaRS("DanaRS", 0.05f, null, // + new DoseSettings(0.05f, 30, 8*60, 0.05f), // + PumpTempBasalType.Percent, // + new DoseSettings(10f, 60, 24*60, 0f, 200f), PumpCapability.BasalRate_Duration15and30minAllowed, // + 0.04f, 0.01f, null, PumpCapability.DanaCapabilities), + + DanaRv2("DanaRv2", DanaRS), // Insulet Insulet_Omnipod("Insulet Omnipod", 0.05f, null, // new DoseSettings(0.05f, 30, 8*60, 0.05f), // PumpTempBasalType.Absolute, // - new DoseSettings(0.05f, 30, 12*60, 0f, 5.0f), // cannot exceed max basal rate 30u/hr - 0.05f, 0.05f, null, PumpCapability.VirtualPump), + new DoseSettings(0.05f, 30, 12*60, 0f, 5.0f), PumpCapability.BasalRate_Duration30minAllowed, // cannot exceed max basal rate 30u/hr + 0.05f, 0.05f, null, PumpCapability.VirtualPumpCapabilities), // Medtronic Minimed_512_712("Medtronic 512/712", 0.05f, null, // new DoseSettings(0.05f, 30, 8*60, 0.05f), // PumpTempBasalType.Absolute, // - new DoseSettings(0.05f, 30, 24*60, 0f, 35f), // - 0.05f, 0.05f, null, PumpCapability.VirtualPump), // TODO + new DoseSettings(0.05f, 30, 24*60, 0f, 35f), PumpCapability.BasalRate_Duration30minAllowed, // + 0.05f, 0.05f, null, PumpCapability.VirtualPumpCapabilities), // TODO Minimed_515_715("Medtronic 515/715", Minimed_512_712), Minimed_522_722("Medtronic 522/722", Minimed_512_712), @@ -93,23 +102,23 @@ public enum PumpType { Minimed_553_753_Revel("Medtronic 553/753 (Revel)", 0.05f, null, // new DoseSettings(0.05f, 30, 8*60, 0.05f), // PumpTempBasalType.Absolute, // - new DoseSettings(0.05f, 30, 24*60, 0f, 35f), // - 0.025f, 0.025f, DoseStepSize.MedtronicVeoBasal, PumpCapability.VirtualPump), // + new DoseSettings(0.05f, 30, 24*60, 0f, 35f), PumpCapability.BasalRate_Duration30minAllowed, // + 0.025f, 0.025f, DoseStepSize.MedtronicVeoBasal, PumpCapability.VirtualPumpCapabilities), // Minimed_554_754_Veo("Medtronic 554/754 (Veo)", Minimed_553_753_Revel), // TODO Minimed_640G("Medtronic 640G", 0.025f, null, // new DoseSettings(0.05f, 30, 8*60, 0.05f), // PumpTempBasalType.Absolute, // - new DoseSettings(0.05f, 30, 24*60, 0f, 35f), // - 0.025f, 0.025f, DoseStepSize.MedtronicVeoBasal, PumpCapability.VirtualPump), // + new DoseSettings(0.05f, 30, 24*60, 0f, 35f), PumpCapability.BasalRate_Duration30minAllowed, // + 0.025f, 0.025f, DoseStepSize.MedtronicVeoBasal, PumpCapability.VirtualPumpCapabilities), // // Tandem TandemTSlim("Tandem t:slim", 0.01f, null, // - new DoseSettings(0.01f,15, 8*60, 0.4f) , + new DoseSettings(0.01f,15, 8*60, 0.4f), PumpTempBasalType.Percent, - new DoseSettings(1,15, 8*60, 0f, 250f), // - 0.1f, 0.001f, null, PumpCapability.VirtualPump), + new DoseSettings(1,15, 8*60, 0f, 250f), PumpCapability.BasalRate_Duration15and30minAllowed, // + 0.1f, 0.001f, null, PumpCapability.VirtualPumpCapabilities), TandemTFlex("Tandem t:flex", TandemTSlim), // TandemTSlimG4("Tandem t:slim G4", TandemTSlim), // @@ -122,6 +131,7 @@ public enum PumpType { private DoseSettings extendedBolusSettings; private PumpTempBasalType pumpTempBasalType; private DoseSettings tbrSettings; + private PumpCapability specialBasalDurations; private float baseBasalMinValue; // private Float baseBasalMaxValue; private float baseBasalStep; // @@ -156,15 +166,15 @@ public enum PumpType { PumpType(String description, float bolusSize, DoseStepSize specialBolusSize, // DoseSettings extendedBolusSettings, // - PumpTempBasalType pumpTempBasalType, DoseSettings tbrSettings, // + PumpTempBasalType pumpTempBasalType, DoseSettings tbrSettings, PumpCapability specialBasalDurations, // float baseBasalMinValue, float baseBasalStep, DoseStepSize baseBasalSpecialSteps, PumpCapability pumpCapability) { - this(description, bolusSize, specialBolusSize, extendedBolusSettings, pumpTempBasalType, tbrSettings, baseBasalMinValue, null, baseBasalStep, baseBasalSpecialSteps, pumpCapability); + this(description, bolusSize, specialBolusSize, extendedBolusSettings, pumpTempBasalType, tbrSettings, specialBasalDurations, baseBasalMinValue, null, baseBasalStep, baseBasalSpecialSteps, pumpCapability); } PumpType(String description, float bolusSize, DoseStepSize specialBolusSize, // DoseSettings extendedBolusSettings, // - PumpTempBasalType pumpTempBasalType, DoseSettings tbrSettings, // + PumpTempBasalType pumpTempBasalType, DoseSettings tbrSettings, PumpCapability specialBasalDurations, // float baseBasalMinValue, Float baseBasalMaxValue, float baseBasalStep, DoseStepSize baseBasalSpecialSteps, PumpCapability pumpCapability) { this.description = description; @@ -173,6 +183,7 @@ public enum PumpType { this.extendedBolusSettings = extendedBolusSettings; this.pumpTempBasalType = pumpTempBasalType; this.tbrSettings = tbrSettings; + this.specialBasalDurations = specialBasalDurations; this.baseBasalMinValue = baseBasalMinValue; this.baseBasalMaxValue = baseBasalMaxValue; this.baseBasalStep = baseBasalStep; @@ -299,5 +310,7 @@ public enum PumpType { } - + public PumpCapability getSpecialBasalDurations() { + return specialBasalDurations; + } } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/utils/PumpUtil.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/utils/PumpUtil.java index a18ff6f7bf..afecccc5e5 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/utils/PumpUtil.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/utils/PumpUtil.java @@ -11,14 +11,10 @@ import info.nightscout.androidaps.plugins.PumpCommon.defs.PumpType; public class PumpUtil { + public static void setPumpDescription(PumpDescription pumpDescription, PumpType pumpType) { - setPumpDescription(pumpDescription, pumpType, false); - } - - public static void setPumpDescription(PumpDescription pumpDescription, PumpType pumpType, boolean isVirtualPump) - { - PumpCapability pumpCapability = isVirtualPump ? PumpCapability.VirtualPump : pumpType.getPumpCapability(); + PumpCapability pumpCapability = pumpType.getPumpCapability(); pumpDescription.isBolusCapable = pumpCapability.hasCapability(PumpCapability.Bolus); pumpDescription.bolusStep = pumpType.getBolusSize(); @@ -28,7 +24,7 @@ public class PumpUtil { pumpDescription.extendedBolusDurationStep = pumpType.getExtendedBolusSettings().getDurationStep(); pumpDescription.extendedBolusMaxDuration = pumpType.getExtendedBolusSettings().getMaxDuration(); - pumpDescription.isTempBasalCapable = pumpCapability.hasCapability(PumpCapability.TBR); + pumpDescription.isTempBasalCapable = pumpCapability.hasCapability(PumpCapability.TempBasal); if (pumpType.getPumpTempBasalType()==PumpTempBasalType.Percent) { @@ -46,6 +42,8 @@ public class PumpUtil { pumpDescription.tempDurationStep = pumpType.getTbrSettings().getDurationStep(); pumpDescription.tempMaxDuration = pumpType.getTbrSettings().getMaxDuration(); + pumpDescription.tempDurationStep15mAllowed = pumpType.getSpecialBasalDurations().hasCapability(PumpCapability.BasalRate_Duration15minAllowed); + pumpDescription.tempDurationStep30mAllowed = pumpType.getSpecialBasalDurations().hasCapability(PumpCapability.BasalRate_Duration30minAllowed); pumpDescription.isSetBasalProfileCapable = pumpCapability.hasCapability(PumpCapability.BasalProfileSet); pumpDescription.basalStep = pumpType.getBaseBasalStep(); @@ -53,6 +51,12 @@ public class PumpUtil { pumpDescription.isRefillingCapable = pumpCapability.hasCapability(PumpCapability.Refill); pumpDescription.storesCarbInfo = pumpCapability.hasCapability(PumpCapability.StoreCarbInfo); + + pumpDescription.supportsTDDs = pumpCapability.hasCapability(PumpCapability.TDD); + pumpDescription.needsManualTDDLoad = pumpCapability.hasCapability(PumpCapability.ManualTDDLoad); + + pumpDescription.is30minBasalRatesCapable = pumpCapability.hasCapability(PumpCapability.BasalRate30min); + } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpFragment.java index 5a42af3811..f01fb0f379 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpFragment.java @@ -15,6 +15,7 @@ import com.squareup.otto.Subscribe; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.R; import info.nightscout.androidaps.db.ExtendedBolus; import info.nightscout.androidaps.db.TemporaryBasal; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java index e129786a58..95f27d1707 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java @@ -426,7 +426,7 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface { // reset pumpDescription.resetSettings(); - PumpUtil.setPumpDescription(pumpDescription, pumpTypeNew, true); + PumpUtil.setPumpDescription(pumpDescription, pumpTypeNew); this.pumpType = pumpTypeNew; diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 30fd658c79..9aea30d324 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -108,11 +108,12 @@ Generic AAPS - Cellnovo Accu-Chek Spirit Accu-Chek Combo + Accu-Chek Insight Animas Ping Animas Vibe + Cellnovo DanaR DanaR Korean DanaRS From 6f19ad1407ff78b30b708dccbdfa30cdcefc5c6c Mon Sep 17 00:00:00 2001 From: Andy Rozman Date: Thu, 10 May 2018 12:40:31 +0100 Subject: [PATCH 006/698] Wrong handling of specialBasalDurations (Duration15 and Duartion30 flags), and added some logging. --- .../androidaps/plugins/PumpCommon/defs/PumpType.java | 11 ++++++++++- .../plugins/PumpVirtual/VirtualPumpPlugin.java | 4 ++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpType.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpType.java index bc6d3f061e..f22c07fa8a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpType.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpType.java @@ -311,6 +311,15 @@ public enum PumpType { public PumpCapability getSpecialBasalDurations() { - return specialBasalDurations; + + if (isParentSet()) + { + return parent.getSpecialBasalDurations(); + } + else + { + return specialBasalDurations == null ? // + PumpCapability.BasalRate_Duration15and30minNotAllowed : specialBasalDurations; + } } } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java index 4a85b5d462..361f52dd87 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java @@ -420,9 +420,13 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface { PumpType pumpTypeNew = PumpType.getByDescription(pumptype); + log.debug("Pump in configuration: {}, PumpType object: {}", pumptype, pumpTypeNew); + if (pumpType == pumpTypeNew) return; + log.debug("New pump configuration found ({}), changing from previous ({})", pumpTypeNew, pumpType); + // reset pumpDescription.resetSettings(); From 2600a7009b363ae4f85f72434bb4a4bb19c5ef2b Mon Sep 17 00:00:00 2001 From: Andy Rozman Date: Sun, 13 May 2018 18:40:53 +0100 Subject: [PATCH 007/698] Added UTests for PumpUtil and VirualPlugin (new methods) --- .../PumpCommon/utils/PumpUtilUTest.java | 45 +++++++++++ .../PumpVirtual/VirtualPumpPluginUTest.java | 78 +++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100644 app/src/test/java/info/nightscout/androidaps/plugins/PumpCommon/utils/PumpUtilUTest.java create mode 100644 app/src/test/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPluginUTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/PumpCommon/utils/PumpUtilUTest.java b/app/src/test/java/info/nightscout/androidaps/plugins/PumpCommon/utils/PumpUtilUTest.java new file mode 100644 index 0000000000..86b030b801 --- /dev/null +++ b/app/src/test/java/info/nightscout/androidaps/plugins/PumpCommon/utils/PumpUtilUTest.java @@ -0,0 +1,45 @@ +package info.nightscout.androidaps.plugins.PumpCommon.utils; + +import org.junit.Assert; +import org.junit.Test; + +import info.nightscout.androidaps.interfaces.PumpDescription; +import info.nightscout.androidaps.plugins.PumpCommon.defs.PumpCapability; +import info.nightscout.androidaps.plugins.PumpCommon.defs.PumpTempBasalType; +import info.nightscout.androidaps.plugins.PumpCommon.defs.PumpType; + +import static org.junit.Assert.*; + +/** + * Created by andy on 5/13/18. + */ +public class PumpUtilUTest { + + @Test + public void setPumpDescription() throws Exception { + + PumpDescription pumpDescription = new PumpDescription(); + + PumpUtil.setPumpDescription(pumpDescription, PumpType.AccuChekCombo); + + Assert.assertEquals(pumpDescription.bolusStep, PumpType.AccuChekCombo.getBolusSize(), 0.1d); + Assert.assertEquals(pumpDescription.basalMinimumRate, PumpType.AccuChekCombo.getBaseBasalStep(), 0.1d); + Assert.assertEquals(pumpDescription.basalStep, PumpType.AccuChekCombo.getBaseBasalStep(), 0.1d); + Assert.assertEquals(pumpDescription.extendedBolusDurationStep, PumpType.AccuChekCombo.getExtendedBolusSettings().getDurationStep(), 0.1d); + Assert.assertEquals(pumpDescription.extendedBolusMaxDuration, PumpType.AccuChekCombo.getExtendedBolusSettings().getMaxDuration(), 0.1d); + Assert.assertEquals(pumpDescription.extendedBolusStep, PumpType.AccuChekCombo.getExtendedBolusSettings().getStep(), 0.1d); + Assert.assertEquals(pumpDescription.isExtendedBolusCapable, PumpType.AccuChekCombo.getPumpCapability().hasCapability(PumpCapability.ExtendedBolus)); + Assert.assertEquals(pumpDescription.isBolusCapable, PumpType.AccuChekCombo.getPumpCapability().hasCapability(PumpCapability.Bolus)); + Assert.assertEquals(pumpDescription.isRefillingCapable, PumpType.AccuChekCombo.getPumpCapability().hasCapability(PumpCapability.Refill)); + Assert.assertEquals(pumpDescription.isSetBasalProfileCapable, PumpType.AccuChekCombo.getPumpCapability().hasCapability(PumpCapability.BasalProfileSet)); + Assert.assertEquals(pumpDescription.isTempBasalCapable, PumpType.AccuChekCombo.getPumpCapability().hasCapability(PumpCapability.TempBasal)); + Assert.assertEquals(pumpDescription.maxTempPercent, PumpType.AccuChekCombo.getTbrSettings().getMaxDose(), 0.1d); + Assert.assertEquals(pumpDescription.tempPercentStep, PumpType.AccuChekCombo.getTbrSettings().getStep(), 0.1d); + Assert.assertEquals(pumpDescription.tempBasalStyle, PumpType.AccuChekCombo.getPumpTempBasalType()== PumpTempBasalType.Percent ? PumpDescription.PERCENT : PumpDescription.ABSOLUTE); + Assert.assertEquals(pumpDescription.tempDurationStep, PumpType.AccuChekCombo.getTbrSettings().getDurationStep()); + Assert.assertEquals(pumpDescription.tempDurationStep15mAllowed, PumpType.AccuChekCombo.getSpecialBasalDurations().hasCapability(PumpCapability.BasalRate_Duration15minAllowed)); + Assert.assertEquals(pumpDescription.tempDurationStep30mAllowed, PumpType.AccuChekCombo.getSpecialBasalDurations().hasCapability(PumpCapability.BasalRate_Duration30minAllowed)); + + } + +} \ No newline at end of file diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPluginUTest.java b/app/src/test/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPluginUTest.java new file mode 100644 index 0000000000..4e2da58e06 --- /dev/null +++ b/app/src/test/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPluginUTest.java @@ -0,0 +1,78 @@ +package info.nightscout.androidaps.plugins.PumpVirtual; + +import android.content.Context; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.powermock.core.classloader.annotations.PrepareForTest; +import org.powermock.modules.junit4.PowerMockRunner; + +import info.AAPSMocker; +import info.nightscout.androidaps.MainApp; +import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin; +import info.nightscout.androidaps.plugins.PumpCommon.defs.PumpType; +import info.nightscout.androidaps.plugins.PumpInsight.InsightPlugin; +import info.nightscout.utils.SP; +import info.nightscout.utils.ToastUtils; + +import static org.junit.Assert.*; +import static org.powermock.api.mockito.PowerMockito.when; + +/** + * Created by andy on 5/13/18. + */ +@RunWith(PowerMockRunner.class) +@PrepareForTest({MainApp.class, ConfigBuilderPlugin.class, ToastUtils.class, Context.class, SP.class}) +public class VirtualPumpPluginUTest { + + + VirtualPumpPlugin virtualPumpPlugin; + + + + @Before + public void prepareMocks() throws Exception { + AAPSMocker.mockMainApp(); + AAPSMocker.mockConfigBuilder(); + AAPSMocker.mockBus(); + AAPSMocker.mockStrings(); + AAPSMocker.mockCommandQueue(); + AAPSMocker.mockSP(); + + virtualPumpPlugin = VirtualPumpPlugin.getPlugin(); + } + + + @Test + public void getPumpType() throws Exception { + } + + @Test + public void refreshConfiguration() throws Exception { + + when(SP.getString("virtualpump_type", "Generic AAPS")).thenReturn("Accu-Chek Combo"); + + virtualPumpPlugin.refreshConfiguration(); + + Assert.assertEquals(PumpType.AccuChekCombo, virtualPumpPlugin.getPumpType()); + } + + + @Test + public void refreshConfigurationTwice() throws Exception { + + when(SP.getString("virtualpump_type", "Generic AAPS")).thenReturn("Accu-Chek Combo"); + + virtualPumpPlugin.refreshConfiguration(); + + when(SP.getString("virtualpump_type", "Generic AAPS")).thenReturn("Accu-Chek Combo"); + + virtualPumpPlugin.refreshConfiguration(); + + Assert.assertEquals(PumpType.AccuChekCombo, virtualPumpPlugin.getPumpType()); + } + +} \ No newline at end of file From 1d39734b190297036caacb8d19083ccdf1fa231c Mon Sep 17 00:00:00 2001 From: Roumen Georgiev Date: Mon, 21 May 2018 11:00:48 +0300 Subject: [PATCH 008/698] clear activity queue --- .../nightscout/androidaps/startupwizard/SetupWizardActivity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/info/nightscout/androidaps/startupwizard/SetupWizardActivity.java b/app/src/main/java/info/nightscout/androidaps/startupwizard/SetupWizardActivity.java index 67af63326b..73a8d3a436 100644 --- a/app/src/main/java/info/nightscout/androidaps/startupwizard/SetupWizardActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/startupwizard/SetupWizardActivity.java @@ -144,6 +144,7 @@ public class SetupWizardActivity extends AppCompatActivity { // Go back to overview public void finishSetupWizard(View view) { Intent intent = new Intent(this, MainActivity.class); + intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent); } From de1196f34beb13e053acedd588dd81857ca6bf6b Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Tue, 29 May 2018 12:57:07 +0200 Subject: [PATCH 009/698] NSClient as source without advanced filtering --- .../androidaps/plugins/Source/SourceNSClientPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Source/SourceNSClientPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/Source/SourceNSClientPlugin.java index 3ba85e97a6..3bf5c66cca 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Source/SourceNSClientPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Source/SourceNSClientPlugin.java @@ -32,6 +32,6 @@ public class SourceNSClientPlugin extends PluginBase implements BgSourceInterfac @Override public boolean advancedFilteringSupported() { - return true; + return false; } } From 41503800e8d0a42ff0122b68c11b7c0cccb5b651 Mon Sep 17 00:00:00 2001 From: "Markus M. May" Date: Tue, 29 May 2018 20:57:55 +0200 Subject: [PATCH 010/698] Remove some duplicate code lines --- .../androidaps/Services/DataService.java | 34 ++++++----- .../Careportal/CareportalFragment.java | 61 +++++++------------ .../broadcasts/BroadcastStatus.java | 29 ++++----- .../java/info/nightscout/utils/NSUpload.java | 46 ++++++-------- 4 files changed, 72 insertions(+), 98 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/Services/DataService.java b/app/src/main/java/info/nightscout/androidaps/Services/DataService.java index 881f2e3bac..f8437d8d36 100644 --- a/app/src/main/java/info/nightscout/androidaps/Services/DataService.java +++ b/app/src/main/java/info/nightscout/androidaps/Services/DataService.java @@ -427,9 +427,7 @@ public class DataService extends IntentService { if (bundles.containsKey("sgv")) { String sgvstring = bundles.getString("sgv"); JSONObject sgvJson = new JSONObject(sgvstring); - NSSgv nsSgv = new NSSgv(sgvJson); - BgReading bgReading = new BgReading(nsSgv); - MainApp.getDbHelper().createIfNotExists(bgReading, "NS"); + storeSgv(sgvJson); } if (bundles.containsKey("sgvs")) { @@ -437,9 +435,7 @@ public class DataService extends IntentService { JSONArray jsonArray = new JSONArray(sgvstring); for (int i = 0; i < jsonArray.length(); i++) { JSONObject sgvJson = jsonArray.getJSONObject(i); - NSSgv nsSgv = new NSSgv(sgvJson); - BgReading bgReading = new BgReading(nsSgv); - MainApp.getDbHelper().createIfNotExists(bgReading, "NS"); + storeSgv(sgvJson); } } } catch (Exception e) { @@ -452,11 +448,7 @@ public class DataService extends IntentService { if (bundles.containsKey("mbg")) { String mbgstring = bundles.getString("mbg"); JSONObject mbgJson = new JSONObject(mbgstring); - NSMbg nsMbg = new NSMbg(mbgJson); - CareportalEvent careportalEvent = new CareportalEvent(nsMbg); - MainApp.getDbHelper().createOrUpdate(careportalEvent); - if (Config.logIncommingData) - log.debug("Adding/Updating new MBG: " + careportalEvent.log()); + storeMbg(mbgJson); } if (bundles.containsKey("mbgs")) { @@ -464,11 +456,7 @@ public class DataService extends IntentService { JSONArray jsonArray = new JSONArray(sgvstring); for (int i = 0; i < jsonArray.length(); i++) { JSONObject mbgJson = jsonArray.getJSONObject(i); - NSMbg nsMbg = new NSMbg(mbgJson); - CareportalEvent careportalEvent = new CareportalEvent(nsMbg); - MainApp.getDbHelper().createOrUpdate(careportalEvent); - if (Config.logIncommingData) - log.debug("Adding/Updating new MBG: " + careportalEvent.log()); + storeMbg(mbgJson); } } } catch (Exception e) { @@ -549,6 +537,20 @@ public class DataService extends IntentService { } } + private void storeMbg(JSONObject mbgJson) { + NSMbg nsMbg = new NSMbg(mbgJson); + CareportalEvent careportalEvent = new CareportalEvent(nsMbg); + MainApp.getDbHelper().createOrUpdate(careportalEvent); + if (Config.logIncommingData) + log.debug("Adding/Updating new MBG: " + careportalEvent.log()); + } + + private void storeSgv(JSONObject sgvJson) { + NSSgv nsSgv = new NSSgv(sgvJson); + BgReading bgReading = new BgReading(nsSgv); + MainApp.getDbHelper().createIfNotExists(bgReading, "NS"); + } + private void handleNewSMS(Intent intent) { Bundle bundle = intent.getExtras(); if (bundle == null) return; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/CareportalFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/CareportalFragment.java index 4a4210f29e..1542239b56 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/CareportalFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/CareportalFragment.java @@ -218,50 +218,19 @@ public class CareportalFragment extends SubscriberFragment implements View.OnCli double iageUrgent = nsSettings.getExtendedWarnValue("iage", "urgent", 96); double iageWarn = nsSettings.getExtendedWarnValue("iage", "warn", 72); + handleAge(iage, CareportalEvent.INSULINCHANGE, iageWarn, iageUrgent); + double cageUrgent = nsSettings.getExtendedWarnValue("cage", "urgent", 72); double cageWarn = nsSettings.getExtendedWarnValue("cage", "warn", 48); + handleAge(sage, CareportalEvent.SITECHANGE, cageWarn, cageUrgent); + double sageUrgent = nsSettings.getExtendedWarnValue("sage", "urgent", 166); double sageWarn = nsSettings.getExtendedWarnValue("sage", "warn", 164); + handleAge(sage, CareportalEvent.SITECHANGE, sageWarn, sageUrgent); + double pbageUrgent = nsSettings.getExtendedWarnValue("pgage", "urgent", 360); double pbageWarn = nsSettings.getExtendedWarnValue("pgage", "warn", 240); - - String notavailable = OverviewFragment.shorttextmode ? "-" : MainApp.gs(R.string.notavailable); - if (sage != null) { - careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(CareportalEvent.SENSORCHANGE); - if (careportalEvent != null) { - sage.setTextColor(CareportalFragment.determineTextColor(careportalEvent, sageWarn, sageUrgent)); - sage.setText(careportalEvent.age()); - } else { - sage.setText(notavailable); - } - } - if (iage != null) { - careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(CareportalEvent.INSULINCHANGE); - if (careportalEvent != null) { - iage.setTextColor(CareportalFragment.determineTextColor(careportalEvent, iageWarn, iageUrgent)); - iage.setText(careportalEvent.age()); - } else { - iage.setText(notavailable); - } - } - if (cage != null) { - careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(CareportalEvent.SITECHANGE); - if (careportalEvent != null) { - cage.setTextColor(CareportalFragment.determineTextColor(careportalEvent, cageWarn, cageUrgent)); - cage.setText(careportalEvent.age()); - } else { - cage.setText(notavailable); - } - } - if (pbage != null) { - careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(CareportalEvent.PUMPBATTERYCHANGE); - if (careportalEvent != null) { - pbage.setTextColor(CareportalFragment.determineTextColor(careportalEvent, pbageWarn, pbageUrgent)); - pbage.setText(careportalEvent.age()); - } else { - pbage.setText(notavailable); - } - } + handleAge(pbage, CareportalEvent.PUMPBATTERYCHANGE, pbageWarn, pbageUrgent); } ); } @@ -277,5 +246,21 @@ public class CareportalFragment extends SubscriberFragment implements View.OnCli } } + + private static TextView handleAge(final TextView age, String eventType, double warnThreshold, double urgentThreshold) { + String notavailable = OverviewFragment.shorttextmode ? "-" : MainApp.gs(R.string.notavailable); + + if (age != null) { + CareportalEvent careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(eventType); + if (careportalEvent != null) { + age.setTextColor(CareportalFragment.determineTextColor(careportalEvent, warnThreshold, urgentThreshold)); + age.setText(careportalEvent.age()); + } else { + age.setText(notavailable); + } + } + + return age; + } } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/broadcasts/BroadcastStatus.java b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/broadcasts/BroadcastStatus.java index 4ee2427af8..f9964c0704 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/broadcasts/BroadcastStatus.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/broadcasts/BroadcastStatus.java @@ -26,14 +26,24 @@ public class BroadcastStatus { private static Logger log = LoggerFactory.getLogger(BroadcastStatus.class); public static void handleNewStatus(NSSettingsStatus status, Context context, boolean isDelta) { + Intent intent = createIntent(status, isDelta); + LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent); + if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) { + context.sendBroadcast(createIntent(status, isDelta)); + } + } + + private static Intent createIntent(NSSettingsStatus status, boolean isDelta) { Bundle bundle = new Bundle(); + try { bundle.putString("nsclientversionname", MainApp.instance().getPackageManager().getPackageInfo(MainApp.instance().getPackageName(), 0).versionName); bundle.putInt("nsclientversioncode", MainApp.instance().getPackageManager().getPackageInfo(MainApp.instance().getPackageName(), 0).versionCode); } catch (PackageManager.NameNotFoundException e) { log.error("Unhandled exception", e); } + bundle.putString("nightscoutversionname", NSClientService.nightscoutVersionName); bundle.putInt("nightscoutversioncode", NSClientService.nightscoutVersionCode); bundle.putString("status", status.getData().toString()); @@ -41,24 +51,7 @@ public class BroadcastStatus { Intent intent = new Intent(Intents.ACTION_NEW_STATUS); intent.putExtras(bundle); intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES); - LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent); - if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) { - bundle = new Bundle(); - try { - bundle.putString("nsclientversionname", MainApp.instance().getPackageManager().getPackageInfo(MainApp.instance().getPackageName(), 0).versionName); - bundle.putInt("nsclientversioncode", MainApp.instance().getPackageManager().getPackageInfo(MainApp.instance().getPackageName(), 0).versionCode); - } catch (PackageManager.NameNotFoundException e) { - log.error("Unhandled exception", e); - } - bundle.putString("nightscoutversionname", NSClientService.nightscoutVersionName); - bundle.putInt("nightscoutversioncode", NSClientService.nightscoutVersionCode); - bundle.putString("status", status.getData().toString()); - bundle.putBoolean("delta", isDelta); - intent = new Intent(Intents.ACTION_NEW_STATUS); - intent.putExtras(bundle); - intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES); - context.sendBroadcast(intent); - } + return intent; } } diff --git a/app/src/main/java/info/nightscout/utils/NSUpload.java b/app/src/main/java/info/nightscout/utils/NSUpload.java index 2e5506f9c6..00d5e39821 100644 --- a/app/src/main/java/info/nightscout/utils/NSUpload.java +++ b/app/src/main/java/info/nightscout/utils/NSUpload.java @@ -289,19 +289,7 @@ public class NSUpload { public static void uploadProfileSwitch(ProfileSwitch profileSwitch) { try { - JSONObject data = new JSONObject(); - data.put("eventType", CareportalEvent.PROFILESWITCH); - data.put("duration", profileSwitch.durationInMinutes); - data.put("profile", profileSwitch.getCustomizedName()); - data.put("profileJson", profileSwitch.profileJson); - data.put("profilePlugin", profileSwitch.profilePlugin); - if (profileSwitch.isCPP) { - data.put("CircadianPercentageProfile", true); - data.put("timeshift", profileSwitch.timeshift); - data.put("percentage", profileSwitch.percentage); - } - data.put("created_at", DateUtil.toISOString(profileSwitch.date)); - data.put("enteredBy", MainApp.gs(R.string.app_name)); + JSONObject data = getJson(profileSwitch); uploadCareportalEntryToNS(data); } catch (JSONException e) { log.error("Unhandled exception", e); @@ -334,19 +322,7 @@ public class NSUpload { public static void updateProfileSwitch(ProfileSwitch profileSwitch) { try { - JSONObject data = new JSONObject(); - data.put("eventType", CareportalEvent.PROFILESWITCH); - data.put("duration", profileSwitch.durationInMinutes); - data.put("profile", profileSwitch.getCustomizedName()); - data.put("profileJson", profileSwitch.profileJson); - data.put("profilePlugin", profileSwitch.profilePlugin); - if (profileSwitch.isCPP) { - data.put("CircadianPercentageProfile", true); - data.put("timeshift", profileSwitch.timeshift); - data.put("percentage", profileSwitch.percentage); - } - data.put("created_at", DateUtil.toISOString(profileSwitch.date)); - data.put("enteredBy", MainApp.gs(R.string.app_name)); + JSONObject data = getJson(profileSwitch); if (profileSwitch._id != null) { Context context = MainApp.instance().getApplicationContext(); Bundle bundle = new Bundle(); @@ -365,6 +341,24 @@ public class NSUpload { } } + private static JSONObject getJson(ProfileSwitch profileSwitch) throws JSONException { + JSONObject data = new JSONObject(); + data.put("eventType", CareportalEvent.PROFILESWITCH); + data.put("duration", profileSwitch.durationInMinutes); + data.put("profile", profileSwitch.getCustomizedName()); + data.put("profileJson", profileSwitch.profileJson); + data.put("profilePlugin", profileSwitch.profilePlugin); + if (profileSwitch.isCPP) { + data.put("CircadianPercentageProfile", true); + data.put("timeshift", profileSwitch.timeshift); + data.put("percentage", profileSwitch.percentage); + } + data.put("created_at", DateUtil.toISOString(profileSwitch.date)); + data.put("enteredBy", MainApp.gs(R.string.app_name)); + + return data; + } + public static void uploadCareportalEntryToNS(JSONObject data) { try { if (data.has("preBolus") && data.has("carbs")) { From 0fe744c3e6ff86d68a026dabb1d4ea1859cda40a Mon Sep 17 00:00:00 2001 From: "Markus M. May" Date: Tue, 29 May 2018 21:44:33 +0200 Subject: [PATCH 011/698] Remove unnecessary assignment --- .../plugins/NSClientInternal/broadcasts/BroadcastStatus.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/broadcasts/BroadcastStatus.java b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/broadcasts/BroadcastStatus.java index f9964c0704..a2b6e64aec 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/broadcasts/BroadcastStatus.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/broadcasts/BroadcastStatus.java @@ -26,8 +26,8 @@ public class BroadcastStatus { private static Logger log = LoggerFactory.getLogger(BroadcastStatus.class); public static void handleNewStatus(NSSettingsStatus status, Context context, boolean isDelta) { - Intent intent = createIntent(status, isDelta); - LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent); + LocalBroadcastManager.getInstance(MainApp.instance()) + .sendBroadcast(createIntent(status, isDelta)); if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) { context.sendBroadcast(createIntent(status, isDelta)); From a587f72de20db8df10c77125377961f76291922b Mon Sep 17 00:00:00 2001 From: "Markus M. May" Date: Wed, 30 May 2018 18:09:41 +0200 Subject: [PATCH 012/698] Fix wrong usage of event in refactored source --- .../androidaps/plugins/Careportal/CareportalFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/CareportalFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/CareportalFragment.java index 1542239b56..c5f1886265 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/CareportalFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/CareportalFragment.java @@ -226,7 +226,7 @@ public class CareportalFragment extends SubscriberFragment implements View.OnCli double sageUrgent = nsSettings.getExtendedWarnValue("sage", "urgent", 166); double sageWarn = nsSettings.getExtendedWarnValue("sage", "warn", 164); - handleAge(sage, CareportalEvent.SITECHANGE, sageWarn, sageUrgent); + handleAge(sage, CareportalEvent.SENSORCHANGE, sageWarn, sageUrgent); double pbageUrgent = nsSettings.getExtendedWarnValue("pgage", "urgent", 360); double pbageWarn = nsSettings.getExtendedWarnValue("pgage", "warn", 240); From f71372444b27528a25f846b630d8d4a9e7980b95 Mon Sep 17 00:00:00 2001 From: Roumen Georgiev Date: Thu, 31 May 2018 13:54:37 +0300 Subject: [PATCH 013/698] strings for danaR options fragment --- app/src/main/res/values/strings.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index beb1efd994..37a815cf5f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1080,4 +1080,13 @@ Please select source of profile. If patient is a child you should use NS profile. If there is nobody following you on Nightscout you will probably prefer Local profile. Please remember that you are only selecting the profile source. To use it you must activate it by executing \"Profile switch\" Select one from availables algorithms. They are sorted from oldest to newest. Newer algorithm is usualy more powerfull and more aggresive. Thus if you are new looper you may probably start with AMA and not with latest one. Do not forget to read the OpenAPS documentation and configure it before use. Start your first objective + Display time in 24h time format( not 12hr ) + Button scroll + Beep on button press + Alarm + LCD on time + Backlight on time + Glucose units + Shutdown + Low reservoir From e4e4829c7324ae9bf57394d93814c1eda3b1903b Mon Sep 17 00:00:00 2001 From: Roumen Georgiev Date: Thu, 31 May 2018 14:18:43 +0300 Subject: [PATCH 014/698] update of strings --- app/src/main/res/values/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 37a815cf5f..2fa86e4dc0 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1084,9 +1084,13 @@ Button scroll Beep on button press Alarm + Sound + Vibrate + both LCD on time Backlight on time Glucose units Shutdown Low reservoir + Save options to pump From 39e704645bc87262b2880844c7d6ca0c1fe26b93 Mon Sep 17 00:00:00 2001 From: Roumen Georgiev Date: Thu, 31 May 2018 14:45:26 +0300 Subject: [PATCH 015/698] create userOptionsActivity class --- .../plugins/PumpDanaR/DanaRFragment.java | 4 + .../activities/DanaRUserOptionsActivity.java | 14 + app/src/main/res/layout/danar_fragment.xml | 10 + .../main/res/layout/danar_user_options.xml | 472 ++++++++++++++++++ app/src/main/res/values/strings.xml | 3 +- 5 files changed, 502 insertions(+), 1 deletion(-) create mode 100644 app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/activities/DanaRUserOptionsActivity.java create mode 100644 app/src/main/res/layout/danar_user_options.xml diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRFragment.java index b11cd87278..65ad1056ef 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRFragment.java @@ -33,6 +33,7 @@ import info.nightscout.androidaps.plugins.Common.SubscriberFragment; import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin; import info.nightscout.androidaps.plugins.PumpDanaR.Dialogs.ProfileViewDialog; import info.nightscout.androidaps.plugins.PumpDanaR.activities.DanaRHistoryActivity; +import info.nightscout.androidaps.plugins.PumpDanaR.activities.DanaRUserOptionsActivity; import info.nightscout.androidaps.plugins.PumpDanaR.events.EventDanaRNewStatus; import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin; import info.nightscout.androidaps.queue.events.EventQueueChanged; @@ -138,6 +139,9 @@ public class DanaRFragment extends SubscriberFragment { startActivity(new Intent(getContext(), TDDStatsActivity.class)); } + @OnClick(R.id.danar_user_options) + void onUserOptionsClick() { startActivity(new Intent(getContext(), DanaRUserOptionsActivity.class)); } + @OnClick(R.id.danar_btconnection) void onBtConnectionClick() { log.debug("Clicked connect to pump"); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/activities/DanaRUserOptionsActivity.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/activities/DanaRUserOptionsActivity.java new file mode 100644 index 0000000000..eb9cd05d82 --- /dev/null +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/activities/DanaRUserOptionsActivity.java @@ -0,0 +1,14 @@ +package info.nightscout.androidaps.plugins.PumpDanaR.activities; + +import android.app.Activity; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Created by Rumen Georgiev on 5/31/2018. + */ + +public class DanaRUserOptionsActivity extends Activity { + private static Logger log = LoggerFactory.getLogger(DanaRUserOptionsActivity.class); +} diff --git a/app/src/main/res/layout/danar_fragment.xml b/app/src/main/res/layout/danar_fragment.xml index 93166c9483..2f0cb992d6 100644 --- a/app/src/main/res/layout/danar_fragment.xml +++ b/app/src/main/res/layout/danar_fragment.xml @@ -730,6 +730,16 @@ android:paddingLeft="0dp" android:paddingRight="0dp" android:text="@string/danar_stats" /> +