Merge branch 'meallink' of https://github.com/nightscout/AndroidAPS into meallink
This commit is contained in:
commit
ab0f64bd46
|
@ -1,10 +1,10 @@
|
|||
package info.nightscout.androidaps.db;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.j256.ormlite.dao.CloseableIterator;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.sql.SQLException;
|
||||
|
@ -78,7 +78,7 @@ public class DatabaseHelperProvider implements DatabaseHelperInterface {
|
|||
return MainApp.Companion.getDbHelper().createOrUpdate(tempBasal);
|
||||
}
|
||||
|
||||
@NonNull @Override public TemporaryBasal findTempBasalByPumpId(long id) {
|
||||
@Nullable @Override public TemporaryBasal findTempBasalByPumpId(long id) {
|
||||
return MainApp.Companion.getDbHelper().findTempBasalByPumpId(id);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ interface DatabaseHelperInterface {
|
|||
fun roundDateToSec(date: Long): Long
|
||||
fun createOrUpdateTDD(record: TDD)
|
||||
fun createOrUpdate(tempBasal: TemporaryBasal): Boolean
|
||||
fun findTempBasalByPumpId(id: Long): TemporaryBasal
|
||||
fun findTempBasalByPumpId(id: Long): TemporaryBasal?
|
||||
fun getTemporaryBasalsDataFromTime(mills: Long, ascending: Boolean): List<TemporaryBasal>
|
||||
fun getExtendedBolusDataFromTime(mills: Long, ascending: Boolean): List<ExtendedBolus>
|
||||
fun getProfileSwitchEventsFromTime(from: Long, to: Long, ascending: Boolean): List<ProfileSwitch>
|
||||
|
|
|
@ -38,6 +38,12 @@ interface PumpInterface {
|
|||
val reservoirLevel: Double
|
||||
val batteryLevel: Int // in percent as integer
|
||||
|
||||
/**
|
||||
* Request a bolus to be delivered, carbs to be stored on pump or both.
|
||||
*
|
||||
* @param detailedBolusInfo it's the caller's responsibility to ensure the request can be satisfied by the pump,
|
||||
* e.g. DBI will not contain carbs if the pump can't store carbs.
|
||||
*/
|
||||
fun deliverTreatment(detailedBolusInfo: DetailedBolusInfo): PumpEnactResult
|
||||
fun stopBolusDelivering()
|
||||
fun setTempBasalAbsolute(absoluteRate: Double, durationInMinutes: Int, profile: Profile, enforceNew: Boolean): PumpEnactResult
|
||||
|
|
Loading…
Reference in a new issue