lints
This commit is contained in:
parent
5a4733dbdc
commit
aadeeeebbf
3 changed files with 25 additions and 9 deletions
|
@ -2,19 +2,24 @@
|
|||
<dictionary name="project-dictionary">
|
||||
<words>
|
||||
<w>aaps</w>
|
||||
<w>acked</w>
|
||||
<w>actionstring</w>
|
||||
<w>allowednumbers</w>
|
||||
<w>androidaps</w>
|
||||
<w>autosens</w>
|
||||
<w>autosensdata</w>
|
||||
<w>autosense</w>
|
||||
<w>bage</w>
|
||||
<w>basaliob</w>
|
||||
<w>basals</w>
|
||||
<w>bgcheck</w>
|
||||
<w>bgsource</w>
|
||||
<w>bolusing</w>
|
||||
<w>carb</w>
|
||||
<w>carbs</w>
|
||||
<w>carbsreq</w>
|
||||
<w>careportal</w>
|
||||
<w>cellnovo</w>
|
||||
<w>crashlytics</w>
|
||||
<w>danar</w>
|
||||
<w>danars</w>
|
||||
|
@ -23,6 +28,7 @@
|
|||
<w>dexcom</w>
|
||||
<w>dexdrip</w>
|
||||
<w>enteredby</w>
|
||||
<w>enteredinsulin</w>
|
||||
<w>eveningoutpost</w>
|
||||
<w>eversense</w>
|
||||
<w>extendedbolus</w>
|
||||
|
@ -32,12 +38,15 @@
|
|||
<w>gson</w>
|
||||
<w>hmac</w>
|
||||
<w>iage</w>
|
||||
<w>insulet</w>
|
||||
<w>iobtotal</w>
|
||||
<w>libre</w>
|
||||
<w>listdelimiter</w>
|
||||
<w>localprofile</w>
|
||||
<w>medtronic</w>
|
||||
<w>mgdl</w>
|
||||
<w>mmol</w>
|
||||
<w>multiwave</w>
|
||||
<w>netinsulin</w>
|
||||
<w>netratio</w>
|
||||
<w>nightscout</w>
|
||||
|
@ -45,6 +54,7 @@
|
|||
<w>nsclient</w>
|
||||
<w>okcancel</w>
|
||||
<w>omnipod</w>
|
||||
<w>openaps</w>
|
||||
<w>oref</w>
|
||||
<w>passcode</w>
|
||||
<w>poctech</w>
|
||||
|
@ -56,7 +66,9 @@
|
|||
<w>refresheventsfromnightscout</w>
|
||||
<w>rileylink</w>
|
||||
<w>roboelectric</w>
|
||||
<w>sitechange</w>
|
||||
<w>smscommunicator</w>
|
||||
<w>sooil</w>
|
||||
<w>soundid</w>
|
||||
<w>splitted</w>
|
||||
<w>superbolus</w>
|
||||
|
@ -73,6 +85,9 @@
|
|||
<w>uart</w>
|
||||
<w>wizzardpage</w>
|
||||
<w>xdrip</w>
|
||||
<w>ypso</w>
|
||||
<w>ypsomed</w>
|
||||
<w>ypsopump</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
|
@ -44,6 +44,7 @@ import javax.inject.Singleton
|
|||
import kotlin.math.abs
|
||||
import kotlin.math.floor
|
||||
import kotlin.math.max
|
||||
import kotlin.math.min
|
||||
import kotlin.math.roundToLong
|
||||
|
||||
@Singleton
|
||||
|
@ -380,16 +381,16 @@ open class IobCobCalculatorPlugin @Inject constructor(
|
|||
bucketedData = bData
|
||||
}
|
||||
|
||||
fun oldestDataAvailable(): Long {
|
||||
private fun oldestDataAvailable(): Long {
|
||||
var oldestTime = System.currentTimeMillis()
|
||||
val oldestTempBasal = repository.getOldestTemporaryBasalRecord()
|
||||
if (oldestTempBasal != null) oldestTime = Math.min(oldestTime, oldestTempBasal.timestamp)
|
||||
if (oldestTempBasal != null) oldestTime = min(oldestTime, oldestTempBasal.timestamp)
|
||||
val oldestExtendedBolus = repository.getOldestExtendedBolusRecord()
|
||||
if (oldestExtendedBolus != null) oldestTime = Math.min(oldestTime, oldestExtendedBolus.timestamp)
|
||||
if (oldestExtendedBolus != null) oldestTime = min(oldestTime, oldestExtendedBolus.timestamp)
|
||||
val oldestBolus = repository.getOldestBolusRecord()
|
||||
if (oldestBolus != null) oldestTime = Math.min(oldestTime, oldestBolus.timestamp)
|
||||
if (oldestBolus != null) oldestTime = min(oldestTime, oldestBolus.timestamp)
|
||||
val oldestCarbs = repository.getOldestCarbsRecord()
|
||||
if (oldestCarbs != null) oldestTime = Math.min(oldestTime, oldestCarbs.timestamp)
|
||||
if (oldestCarbs != null) oldestTime = min(oldestTime, oldestCarbs.timestamp)
|
||||
oldestTime -= 15 * 60 * 1000L // allow 15 min before
|
||||
return oldestTime
|
||||
}
|
||||
|
|
|
@ -137,12 +137,12 @@ class DanaRKoreanPlugin @Inject constructor(
|
|||
if (!result.success) result.comment(resourceHelper.gs(R.string.boluserrorcode, detailedBolusInfo.insulin, t.insulin, danaPump.bolusStartErrorCode)) else result.comment(R.string.ok)
|
||||
aapsLogger.debug(LTag.PUMP, "deliverTreatment: OK. Asked: " + detailedBolusInfo.insulin + " Delivered: " + result.bolusDelivered)
|
||||
detailedBolusInfo.insulin = t.insulin
|
||||
detailedBolusInfo.timestamp = dateUtil._now()
|
||||
detailedBolusInfo.timestamp = dateUtil.now()
|
||||
if (detailedBolusInfo.insulin > 0) pumpSync.syncBolusWithPumpId(
|
||||
detailedBolusInfo.timestamp,
|
||||
detailedBolusInfo.insulin,
|
||||
detailedBolusInfo.bolusType,
|
||||
dateUtil._now(),
|
||||
dateUtil.now(),
|
||||
PumpType.DANA_R_KOREAN,
|
||||
serialNumber()
|
||||
)
|
||||
|
@ -285,8 +285,8 @@ class DanaRKoreanPlugin @Inject constructor(
|
|||
sExecutionService.tempBasalStop()
|
||||
if (!danaPump.isTempBasalInProgress) {
|
||||
pumpSync.syncStopTemporaryBasalWithPumpId(
|
||||
dateUtil._now(),
|
||||
dateUtil._now(),
|
||||
dateUtil.now(),
|
||||
dateUtil.now(),
|
||||
pumpDescription.pumpType,
|
||||
serialNumber()
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue