|
@ -37,7 +37,7 @@
|
|||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
|
18
.travis.yml
Normal file
|
@ -0,0 +1,18 @@
|
|||
language: android
|
||||
jdk: oraclejdk8
|
||||
env:
|
||||
matrix:
|
||||
- ANDROID_TARGET=android-23 ANDROID_ABI=x86
|
||||
android:
|
||||
components:
|
||||
- platform-tools
|
||||
- tools
|
||||
- build-tools-25.0.2
|
||||
- android-23
|
||||
- extra-google-m2repository
|
||||
- extra-android-m2repository
|
||||
- extra-google-google_play_services
|
||||
|
||||
script:
|
||||
# Unit Test
|
||||
- ./gradlew test
|
|
@ -37,7 +37,7 @@ def generateGitBuild = { ->
|
|||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion "23.0.3"
|
||||
buildToolsVersion "25.0.2"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "info.nightscout.androidaps"
|
||||
|
|
|
@ -39,6 +39,7 @@ import info.nightscout.androidaps.plugins.TempBasals.TempBasalsFragment;
|
|||
import info.nightscout.androidaps.plugins.Treatments.TreatmentsFragment;
|
||||
import info.nightscout.androidaps.plugins.VirtualPump.VirtualPumpFragment;
|
||||
import info.nightscout.androidaps.plugins.Wear.WearFragment;
|
||||
import info.nightscout.androidaps.plugins.persistentnotification.PersistentNotificationPlugin;
|
||||
import info.nightscout.androidaps.receivers.KeepAliveReceiver;
|
||||
import io.fabric.sdk.android.Fabric;
|
||||
|
||||
|
@ -93,6 +94,7 @@ public class MainApp extends Application {
|
|||
pluginsList.add(SmsCommunicatorFragment.getPlugin());
|
||||
|
||||
if (Config.WEAR) pluginsList.add(WearFragment.getPlugin(this));
|
||||
pluginsList.add(new PersistentNotificationPlugin(this));
|
||||
|
||||
pluginsList.add(sConfigBuilder = ConfigBuilderFragment.getPlugin());
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ public class LoopPlugin implements PluginBase {
|
|||
@Override
|
||||
public void run() {
|
||||
final PumpEnactResult applyResult = configBuilder.applyAPSRequest(resultAfterConstraints);
|
||||
if (applyResult.enacted) {
|
||||
if (applyResult.enacted || applyResult.success) {
|
||||
lastRun.setByPump = applyResult;
|
||||
lastRun.lastEnact = lastRun.lastAPSRun;
|
||||
} else {
|
||||
|
|
|
@ -61,7 +61,7 @@ public class NewTreatmentDialog extends DialogFragment implements OnClickListene
|
|||
Double maxInsulin = MainApp.getConfigBuilder().applyBolusConstraints(Constants.bolusOnlyForCheckLimit);
|
||||
|
||||
editCarbs = new PlusMinusEditText(view, R.id.treatments_newtreatment_carbsamount, R.id.treatments_newtreatment_carbsamount_plus, R.id.treatments_newtreatment_carbsamount_minus, 0d, 0d, (double) maxCarbs, 1d, new DecimalFormat("0"), false);
|
||||
editInsulin = new PlusMinusEditText(view, R.id.treatments_newtreatment_insulinamount, R.id.treatments_newtreatment_insulinamount_plus, R.id.treatments_newtreatment_insulinamount_minus, 0d, 0d, maxInsulin, 0.05d, new DecimalFormat("0.00"), false);
|
||||
editInsulin = new PlusMinusEditText(view, R.id.treatments_newtreatment_insulinamount, R.id.treatments_newtreatment_insulinamount_plus, R.id.treatments_newtreatment_insulinamount_minus, 0d, 0d, maxInsulin, MainApp.getConfigBuilder().getPumpDescription().bolusStep, new DecimalFormat("0.00"), false);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public class VirtualPumpPlugin implements PluginBase, PumpInterface {
|
|||
|
||||
public VirtualPumpPlugin() {
|
||||
pumpDescription.isBolusCapable = true;
|
||||
pumpDescription.bolusStep = 1d;
|
||||
pumpDescription.bolusStep = 0.1d;
|
||||
|
||||
pumpDescription.isExtendedBolusCapable = true;
|
||||
pumpDescription.extendedBolusStep = 0.2d;
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
package info.nightscout.androidaps.plugins.persistentnotification;
|
||||
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
|
||||
/**
|
||||
* Created by adrian on 23/12/16.
|
||||
*/
|
||||
|
||||
public class PersistentNotificationFragment extends Fragment implements FragmentBase {
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,241 @@
|
|||
package info.nightscout.androidaps.plugins.persistentnotification;
|
||||
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.support.v4.app.TaskStackBuilder;
|
||||
import android.support.v7.app.NotificationCompat;
|
||||
|
||||
import com.squareup.otto.Subscribe;
|
||||
|
||||
import info.nightscout.androidaps.Constants;
|
||||
import info.nightscout.androidaps.MainActivity;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.db.BgReading;
|
||||
import info.nightscout.androidaps.db.DatabaseHelper;
|
||||
import info.nightscout.androidaps.db.TempBasal;
|
||||
import info.nightscout.androidaps.events.EventInitializationChanged;
|
||||
import info.nightscout.androidaps.events.EventNewBG;
|
||||
import info.nightscout.androidaps.events.EventNewBasalProfile;
|
||||
import info.nightscout.androidaps.events.EventPreferenceChange;
|
||||
import info.nightscout.androidaps.events.EventRefreshGui;
|
||||
import info.nightscout.androidaps.events.EventTempBasalChange;
|
||||
import info.nightscout.androidaps.events.EventTreatmentChange;
|
||||
import info.nightscout.androidaps.interfaces.PluginBase;
|
||||
import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||
import info.nightscout.androidaps.plugins.OpenAPSMA.IobTotal;
|
||||
import info.nightscout.androidaps.plugins.Overview.Notification;
|
||||
import info.nightscout.client.data.NSProfile;
|
||||
import info.nightscout.utils.DecimalFormatter;
|
||||
|
||||
/**
|
||||
* Created by adrian on 23/12/16.
|
||||
*/
|
||||
|
||||
public class PersistentNotificationPlugin implements PluginBase{
|
||||
|
||||
private static final int ONGOING_NOTIFICATION_ID = 4711;
|
||||
static boolean fragmentEnabled = false;
|
||||
private final Context ctx;
|
||||
|
||||
public PersistentNotificationPlugin(Context ctx) {
|
||||
this.ctx = ctx;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return GENERAL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFragmentClass() {
|
||||
return PersistentNotificationFragment.class.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return ctx.getString(R.string.ongoingnotificaction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled(int type) {
|
||||
return fragmentEnabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isVisibleInTabs(int type) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeHidden(int type) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFragmentEnabled(int type, boolean fragmentEnabled) {
|
||||
|
||||
if(getType() == type){
|
||||
this.fragmentEnabled = fragmentEnabled;
|
||||
checkBusRegistration();
|
||||
updateNotification();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void updateNotification() {
|
||||
|
||||
if(!fragmentEnabled){
|
||||
NotificationManager mNotificationManager =
|
||||
(NotificationManager) ctx.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
mNotificationManager.cancel(ONGOING_NOTIFICATION_ID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
String line1 = ctx.getString(R.string.noprofile);
|
||||
NSProfile profile = MainApp.getConfigBuilder().getActiveProfile().getProfile();
|
||||
|
||||
|
||||
BgReading lastBG = MainApp.getDbHelper().lastBg();
|
||||
DatabaseHelper.GlucoseStatus glucoseStatus = MainApp.getDbHelper().getGlucoseStatusData();
|
||||
|
||||
if(profile != null && lastBG != null) {
|
||||
line1 = lastBG.valueToUnitsToString(profile.getUnits());
|
||||
}
|
||||
if (glucoseStatus != null) {
|
||||
line1 += " Δ" + deltastring(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, profile.getUnits())
|
||||
+ " avgΔ" + deltastring(glucoseStatus.avgdelta, glucoseStatus.avgdelta * Constants.MGDL_TO_MMOLL, profile.getUnits());
|
||||
} else {
|
||||
line1 += " " +
|
||||
ctx.getString(R.string.old_data) +
|
||||
" ";
|
||||
}
|
||||
|
||||
PumpInterface pump = MainApp.getConfigBuilder();
|
||||
|
||||
if (pump.isTempBasalInProgress()) {
|
||||
TempBasal activeTemp = pump.getTempBasal();
|
||||
line1 += " " + activeTemp.toStringShort();
|
||||
}
|
||||
|
||||
//IOB
|
||||
MainApp.getConfigBuilder().getActiveTreatments().updateTotalIOB();
|
||||
IobTotal bolusIob = MainApp.getConfigBuilder().getActiveTreatments().getLastCalculation().round();
|
||||
if (bolusIob == null) bolusIob = new IobTotal();
|
||||
MainApp.getConfigBuilder().getActiveTempBasals().updateTotalIOB();
|
||||
IobTotal basalIob = MainApp.getConfigBuilder().getActiveTempBasals().getLastCalculation().round();
|
||||
if (basalIob == null) basalIob = new IobTotal();
|
||||
String line2 = ctx.getString(R.string.treatments_iob_label_string) + " " + DecimalFormatter.to2Decimal(bolusIob.iob + basalIob.basaliob) + "U ("
|
||||
+ ctx.getString(R.string.bolus) + ": " + DecimalFormatter.to2Decimal(bolusIob.iob) + "U "
|
||||
+ ctx.getString(R.string.basal) + ": " + DecimalFormatter.to2Decimal(basalIob.basaliob) + "U)";
|
||||
|
||||
|
||||
String line3 = DecimalFormatter.to2Decimal(pump.getBaseBasalRate()) + " U/h";
|
||||
|
||||
|
||||
if (profile != null && profile.getActiveProfile() != null)
|
||||
line3 += " - " + profile.getActiveProfile();
|
||||
|
||||
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(ctx);
|
||||
builder.setOngoing(true);
|
||||
builder.setCategory(NotificationCompat.CATEGORY_STATUS);
|
||||
builder.setSmallIcon(R.drawable.ic_notification);
|
||||
Bitmap largeIcon = BitmapFactory.decodeResource(ctx.getResources(), R.mipmap.ic_launcher);
|
||||
builder.setLargeIcon(largeIcon);
|
||||
builder.setContentTitle(line1);
|
||||
builder.setContentText(line2);
|
||||
builder.setSubText(line3);
|
||||
|
||||
Intent resultIntent = new Intent(ctx, MainActivity.class);
|
||||
|
||||
TaskStackBuilder stackBuilder = TaskStackBuilder.create(ctx);
|
||||
stackBuilder.addParentStack(MainActivity.class);
|
||||
stackBuilder.addNextIntent(resultIntent);
|
||||
PendingIntent resultPendingIntent =
|
||||
stackBuilder.getPendingIntent(
|
||||
0,
|
||||
PendingIntent.FLAG_UPDATE_CURRENT
|
||||
);
|
||||
builder.setContentIntent(resultPendingIntent);
|
||||
NotificationManager mNotificationManager =
|
||||
(NotificationManager) ctx.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
|
||||
android.app.Notification notification = builder.build();
|
||||
mNotificationManager.notify(ONGOING_NOTIFICATION_ID, notification);
|
||||
|
||||
}
|
||||
|
||||
private void checkBusRegistration() {
|
||||
if(fragmentEnabled){
|
||||
MainApp.bus().register(this);
|
||||
} else {
|
||||
MainApp.bus().unregister(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFragmentVisible(int type, boolean fragmentVisible) {
|
||||
//no visible fragment
|
||||
}
|
||||
|
||||
private String deltastring(double deltaMGDL, double deltaMMOL, String units) {
|
||||
String deltastring = "";
|
||||
if (deltaMGDL >=0){
|
||||
deltastring += "+";
|
||||
} else{
|
||||
deltastring += "-";
|
||||
|
||||
}
|
||||
if (units.equals(Constants.MGDL)){
|
||||
deltastring += DecimalFormatter.to1Decimal(Math.abs(deltaMGDL));
|
||||
}
|
||||
else {
|
||||
deltastring += DecimalFormatter.to1Decimal(Math.abs(deltaMMOL));
|
||||
}
|
||||
return deltastring;
|
||||
}
|
||||
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventPreferenceChange ev) {
|
||||
updateNotification();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventTreatmentChange ev) {
|
||||
updateNotification();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventTempBasalChange ev) {
|
||||
updateNotification();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventNewBG ev) {
|
||||
updateNotification();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventNewBasalProfile ev) {
|
||||
updateNotification();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventInitializationChanged ev) {
|
||||
updateNotification();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventRefreshGui ev) {
|
||||
updateNotification();
|
||||
}
|
||||
|
||||
}
|
BIN
app/src/main/res/drawable-hdpi-v11/ic_notification.png
Normal file
After Width: | Height: | Size: 972 B |
BIN
app/src/main/res/drawable-hdpi-v9/ic_notification.png
Normal file
After Width: | Height: | Size: 907 B |
BIN
app/src/main/res/drawable-hdpi/ic_notification.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/drawable-mdpi-v11/ic_notification.png
Normal file
After Width: | Height: | Size: 569 B |
BIN
app/src/main/res/drawable-mdpi-v9/ic_notification.png
Normal file
After Width: | Height: | Size: 506 B |
BIN
app/src/main/res/drawable-mdpi/ic_notification.png
Normal file
After Width: | Height: | Size: 836 B |
BIN
app/src/main/res/drawable-xhdpi-v11/ic_notification.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable-xhdpi-v9/ic_notification.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_notification.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/drawable-xxhdpi-v11/ic_notification.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
app/src/main/res/drawable-xxhdpi-v9/ic_notification.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_notification.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/drawable/notif_icon.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
|
@ -209,7 +209,7 @@
|
|||
<string name="syncprofiletopump_title">Синхронизирай помпата с профила в Nightscout</string>
|
||||
<string name="nobtadapter">Няма bluetooth адаптер</string>
|
||||
<string name="nightscout">Nightscout</string>
|
||||
<string name="dismiss">ПРЕКРАТИ</string>
|
||||
<string name="dismiss">Разбрах</string>
|
||||
<string name="end_user_license_agreement">End User License Agreement</string>
|
||||
<string name="end_user_license_agreement_text">MUST NOT BE USED TO MAKE MEDICAL DECISIONS. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</string>
|
||||
<string name="smscommunicator_allowednumbers_summary">+XXXXXXXXXX;+YYYYYYYYYY</string>
|
||||
|
@ -275,7 +275,7 @@
|
|||
<string name="enacted">Приложено</string>
|
||||
<string name="danar_sbolus">S bolus</string>
|
||||
<string name="failedupdatebasalprofile">Не може да се обнови базалния профил</string>
|
||||
<string name="hoursago">ч. преди</string>
|
||||
<string name="hoursago">h ago</string>
|
||||
<string name="objectives_0_gate">Потвърдете, че КЗ и данните от помпата са достъпни в Nightscout</string>
|
||||
<string name="danar_debolus">DE bolus</string>
|
||||
<string name="danar_dsbolus">DS bolus</string>
|
||||
|
@ -331,7 +331,7 @@
|
|||
<string name="circadian_percentage_profile">Процентен профил</string>
|
||||
<string name="send_to_pump">Изпрати към помпата</string>
|
||||
<string name="edit_base_basal">Редактирай базални стойности</string>
|
||||
<string name="dia">"DIA "</string>
|
||||
<string name="dia">DIA:</string>
|
||||
<string name="edit_base_ic">Редактирай Инс./ВХ</string>
|
||||
<string name="edit_base_isf">Редактирай Инс. чувствителност</string>
|
||||
<string name="fillbolus_title">Fill/Prime стандарта стойност</string>
|
||||
|
@ -350,4 +350,30 @@
|
|||
<string name="ns_upload_only_enabled">Моля изключете "NS upload only" за да използвате това.</string>
|
||||
<string name="ns_upload_only_summary">NS upload only. Not effective on SGV unless a local source like xDrip is selected. Not effective on Profiles while NS-Profiles is used.</string>
|
||||
<string name="absorption_rate">Усвояване на ВХ (ч):</string>
|
||||
<string name="alert_dialog_storage_permission_text">Моля рестартирайте телефона или AndroidAPS, в противен случай информацията за грешки няма да се запише(важно за да се потвърди, че алгоритъмът работи правилно)</string>
|
||||
<string name="androidaps_tempbasalendnote">Край на временен базал</string>
|
||||
<string name="androidaps_tempbasalstartnote">Старт на временен базал</string>
|
||||
<string name="basal_rate">Базал:</string>
|
||||
<string name="basalvaluebelowminimum">Базалните стойности са под минимума. Не е зададен профил!</string>
|
||||
<string name="batterydischarged">Батерията на помпата е изтощена</string>
|
||||
<string name="actualbg">КЗ:</string>
|
||||
<string name="danar_disableeasymode">Забрани EasyUI режим в помпата</string>
|
||||
<string name="danar_enableextendedbolus">Разреши удължен болус в помпата</string>
|
||||
<string name="danar_switchtouhmode">Промени режима от U/d на U/h в помпата</string>
|
||||
<string name="danarkoreanpump">DanaR за Корея</string>
|
||||
<string name="high_mark">Горна линия</string>
|
||||
<string name="lastbg">Последна КЗ:</string>
|
||||
<string name="low_mark">Долна линия</string>
|
||||
<string name="lowbattery">Изтощена батерия</string>
|
||||
<string name="open_settings_on_wear">Отвори Опции на часовника</string>
|
||||
<string name="prefs_range_summary">Горна и долна линия на диаграмата на часовника</string>
|
||||
<string name="prefs_range_title">Диапазон на визуализация</string>
|
||||
<string name="profile_set_failed">Неуспешно задаване на базален профил</string>
|
||||
<string name="profile_set_ok">Базалният профил е обновен</string>
|
||||
<string name="pumpNotInitializedProfileNotSet">Помпата не е инициализирана, профила не е зададен!</string>
|
||||
<string name="pumperror">Грешка на помпата</string>
|
||||
<string name="pumpshutdown">Помпата е изключена</string>
|
||||
<string name="resend_all_data">Изпрати всички данни отново</string>
|
||||
<string name="wear">Wear</string>
|
||||
<string name="wrongpumpdriverselected">Избран е грешен тип помпа</string>
|
||||
</resources>
|
||||
|
|
|
@ -374,4 +374,6 @@
|
|||
<string name="wrongpumpdriverselected">Vybrán špatný ovladač pumpy</string>
|
||||
<string name="basalvaluebelowminimum">Hodnota bazálu pod minimem. Nenastaveno!</string>
|
||||
<string name="mdi">Pera</string>
|
||||
<string name="actualbg">Glykémie:</string>
|
||||
<string name="lastbg">Poslední glykémie:</string>
|
||||
</resources>
|
||||
|
|
|
@ -191,13 +191,13 @@
|
|||
<string name="enabled">사용</string>
|
||||
<string name="visible">보이기</string>
|
||||
<string name="up">Up</string>
|
||||
<string name="exported">세팅이 Export 되었습니다</string>
|
||||
<string name="export_to">다음 위치로 세팅을 Export 하시겠습니까</string>
|
||||
<string name="import_from">다음 위치에서 세팅을 Import 하시겠습니까</string>
|
||||
<string name="setting_imported">세팅이 Import 되었습니다</string>
|
||||
<string name="exported">설정이 저장되었습니다</string>
|
||||
<string name="export_to">다음 위치에 설정을 저장하시겠습니까</string>
|
||||
<string name="import_from">다음 위치에서 설정을 불러오시겠습니까</string>
|
||||
<string name="setting_imported">설정을 불러왔습니다</string>
|
||||
<string name="filenotfound">파일을 찾을 수 없습니다</string>
|
||||
<string name="nav_export">Export 설정</string>
|
||||
<string name="nav_import">Import 설정</string>
|
||||
<string name="nav_export">설정 저장하기</string>
|
||||
<string name="nav_import">설정 불러오기</string>
|
||||
<string name="de_lang">German</string>
|
||||
<string name="es_lang">Spanish</string>
|
||||
<string name="openapsma_low_summary">목표범위 최소 혈당값</string>
|
||||
|
@ -238,6 +238,7 @@
|
|||
<string name="absolute">Absolute</string>
|
||||
<string name="canceltemp">임시기초주입 취소하기</string>
|
||||
<string name="smscommunicator">SMS 전송</string>
|
||||
<string name="mm640g">MM 640g</string>
|
||||
<string name="waitingforpumpresult">결과 기다리는 중</string>
|
||||
<string name="smscommunicator_allowednumbers">허가된 전화번호</string>
|
||||
<string name="smscommunicator_allowednumbers_summary">+XXXXXXXXXX;+YYYYYYYYYY</string>
|
||||
|
@ -285,7 +286,7 @@
|
|||
<string name="pumpbusy">펌프가 바쁩니다</string>
|
||||
<string name="overview_bolusprogress_delivered">주입됨</string>
|
||||
<string name="overview_bolusprogress_stoped">정지됨</string>
|
||||
<string name="occlusion">Occlusion</string>
|
||||
<string name="occlusion">막힘</string>
|
||||
<string name="overview_bolusprogress_stop">정지</string>
|
||||
<string name="overview_bolusprogress_stoppressed">정지 누름</string>
|
||||
<string name="waitingforpump">펌프를 기다리고 있습니다.</string>
|
||||
|
@ -337,11 +338,50 @@
|
|||
<string name="ns_upload_only_summary">NS upload only. 로컬소스(xDrip)가 선택되지 않으면 SGV에는 효력이 없습니다. NS프로파일이 사용중이라면 프로파일에는 효력이 없습니다.</string>
|
||||
<string name="ns_upload_only_enabled">이 기능을 사용하시려면 "NS upload only"을 비활성화 하세요.</string>
|
||||
<string name="pumpNotInitialized">펌프가 초기화 되지 않았습니다!</string>
|
||||
<string name="primefill">Prime/Fill</string>
|
||||
<string name="primefill">공기/채움</string>
|
||||
<string name="fillwarning">Please make sure the amount matches the specification of your infusion set!</string>
|
||||
<string name="othersettings_title">Other</string>
|
||||
<string name="fillbolus_title">Fill/Prime standard insulin amounts.</string>
|
||||
<string name="button1">Button 1</string>
|
||||
<string name="button2">Button 2</string>
|
||||
<string name="button3">Button 3</string>
|
||||
<string name="othersettings_title">기타</string>
|
||||
<string name="fillbolus_title">공기/채움 기본 인슐린양</string>
|
||||
<string name="button1">버튼1</string>
|
||||
<string name="button2">버튼2</string>
|
||||
<string name="button3">버튼3</string>
|
||||
<string name="percentagefactor_hint">Percentage factor by which the base profile will be multiplied.</string>
|
||||
<string name="timeshift_hint">Time in hours by which the profile will be shifted round robin.</string>
|
||||
<string name="send_to_pump">SEND TO PUMP</string>
|
||||
<string name="units">Units:</string>
|
||||
<string name="mgdl">mg/dl</string>
|
||||
<string name="mmol">mmol/l</string>
|
||||
<string name="dia">DIA:</string>
|
||||
<string name="absorption_rate">Absorption rate:</string>
|
||||
<string name="target_range">Target range:</string>
|
||||
<string name="edit_base_basal">Edit Base-Basal:</string>
|
||||
<string name="edit_base_isf">Edit Base-ISF:</string>
|
||||
<string name="edit_base_ic">Edit Base-IC:</string>
|
||||
<string name="base_profile_label">Base Profile:</string>
|
||||
<string name="circadian_percentage_profile">CircadianPercentageProfile</string>
|
||||
<string name="androidaps_tempbasalendnote">Basal Temp End</string>
|
||||
<string name="androidaps_tempbasalstartnote">Basal Temp Start</string>
|
||||
<string name="prefs_range_title">차트 표시 범위</string>
|
||||
<string name="prefs_range_summary">Overview/스마트워치 차트 표시용 고/저혈당 선</string>
|
||||
<string name="low_mark">저혈당 선</string>
|
||||
<string name="high_mark">고혈당 선</string>
|
||||
<string name="wear">Wear</string>
|
||||
<string name="resend_all_data">모든 데이터 다시 보내기</string>
|
||||
<string name="open_settings_on_wear">웨어에서 설정 열기</string>
|
||||
<string name="pumperror">펌프 에러</string>
|
||||
<string name="lowbattery">배터리 부족</string>
|
||||
<string name="pumpshutdown">펌프 중지</string>
|
||||
<string name="batterydischarged">펌프배터리 방전</string>
|
||||
<string name="danarkoreanpump">다나R 한글</string>
|
||||
<string name="wrongpumpdriverselected">펌프 드라이버가 잘못 선택되었습니다</string>
|
||||
<string name="basal_rate">Basal rate:</string>
|
||||
<string name="profile_set_failed">기초주입 프로파일 설정이 실패하였습니다</string>
|
||||
<string name="profile_set_ok">기초주입 프로파일이 펌프에 업데이트 되었습니다</string>
|
||||
<string name="danar_disableeasymode">펌프에서 EasyUI모드를 해제하세요</string>
|
||||
<string name="danar_enableextendedbolus">펌프에서 확장식사기능을 활성화 하세요</string>
|
||||
<string name="danar_switchtouhmode">펌프에서 U/d에서 U/h로 모드를 변경하세요</string>
|
||||
<string name="basalvaluebelowminimum">기초주입값이 최소값 이하입니다. 프로파일이 설정되지 않습니다!</string>
|
||||
<string name="actualbg">BG:</string>
|
||||
<string name="lastbg">Last BG:</string>
|
||||
<string name="mdi">MDI</string>
|
||||
</resources>
|
||||
|
|
|
@ -387,4 +387,6 @@
|
|||
<string name="actualbg">BG:</string>
|
||||
<string name="lastbg">Last BG:</string>
|
||||
<string name="mdi">MDI</string>
|
||||
<string name="ongoingnotificaction">Ongoing Notification</string>
|
||||
<string name="old_data">OLD DATA</string>
|
||||
</resources>
|
||||
|
|
27
app/src/test/info/nightscout/utils/RoundTest.java
Normal file
|
@ -0,0 +1,27 @@
|
|||
package info.nightscout.utils;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class RoundTest {
|
||||
|
||||
@Test
|
||||
public void roundTo() {
|
||||
assertEquals( 0.55d, Round.roundTo(0.54d, 0.05d), 0.00000001d );
|
||||
assertEquals( 1d, Round.roundTo(1.49d, 1d), 0.00000001d );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void floorTo() {
|
||||
assertEquals( 0.5d, Round.floorTo(0.54d, 0.05d), 0.00000001d );
|
||||
assertEquals( 1d, Round.floorTo(1.59d, 1d), 0.00000001d );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void ceilTo() {
|
||||
assertEquals( 0.6d, Round.ceilTo(0.54d, 0.1d), 0.00000001d );
|
||||
assertEquals( 2d, Round.ceilTo(1.49999d, 1d), 0.00000001d );
|
||||
}
|
||||
|
||||
}
|
|
@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
|
|||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion "23.0.3"
|
||||
buildToolsVersion "25.0.2"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "info.nightscout.androidaps"
|
||||
|
|
|
@ -106,14 +106,6 @@
|
|||
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
|
||||
|
@ -122,6 +114,15 @@
|
|||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
|
||||
|
@ -134,10 +135,14 @@
|
|||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/ustwo-clockwise-debug/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
|
||||
</content>
|
||||
|
|