TODO cleanup

This commit is contained in:
Milos Kozak 2022-04-06 15:03:21 +02:00
parent 9ceb0193ee
commit 1c26bde0be
10 changed files with 9 additions and 16 deletions

View file

@ -104,7 +104,7 @@ class SurveyActivity : NoSplashAppCompatActivity() {
.addOnCompleteListener(this) { task ->
if (task.isSuccessful) {
aapsLogger.debug(LTag.CORE, "signInAnonymously:success")
//val user = auth.currentUser // TODO: do we need this, seems unused?
//val user = auth.currentUser // do we need this, seems unused?
val database = FirebaseDatabase.getInstance().reference
database.child("survey").child(r.id).setValue(r)

View file

@ -64,8 +64,6 @@ class MaintenancePlugin @Inject constructor(
context.startActivity(emailIntent)
}
//todo replace this with a call on startup of the application, specifically to remove
// unnecessary garbage from the log exports
fun deleteLogs(keep: Int) {
val logDir = File(loggerUtils.logDirectory)
val files = logDir.listFiles { _: File?, name: String ->

View file

@ -261,7 +261,7 @@ public class FixedLineGraphSeries<E extends DataPointInterface> extends BaseSeri
//fix: last value not drawn as datapoint. Draw first point here, and then on every step the end values (above)
// float first_X = (float) x + (graphLeft + 1);
// float first_Y = (float) (graphTop - y) + graphHeight;
//TODO canvas.drawCircle(first_X, first_Y, dataPointsRadius, mPaint);
// canvas.drawCircle(first_X, first_Y, dataPointsRadius, mPaint);
}
lastEndY = orgY;
lastEndX = orgX;

View file

@ -39,8 +39,6 @@ class DummyService : DaggerService() {
override fun onCreate() {
super.onCreate()
// TODO: I guess this was moved here in order to adhere to the 5 seconds rule to call "startForeground" after a Service was called as Foreground service?
// As onCreate() is not called every time a service is started, copied to onStartCommand().
try {
aapsLogger.debug("Starting DummyService with ID ${notificationHolder.notificationID} notification ${notificationHolder.notification}")
startForeground(notificationHolder.notificationID, notificationHolder.notification)

View file

@ -53,8 +53,6 @@ class SensitivityOref1Plugin @Inject constructor(
) {
override fun detectSensitivity(ads: AutosensDataStore, fromTime: Long, toTime: Long): AutosensResult {
// todo this method is called from the IobCobCalculatorPlugin, which leads to a circular
// dependency, this should be avoided
val profile = profileFunction.getProfile()
if (profile == null) {
aapsLogger.error("No profile")

View file

@ -319,7 +319,7 @@ public class AreaGraphSeries<E extends DoubleDataPoint> extends BaseSeries<E> {
//fix: last value not drawn as datapoint. Draw first point here, and then on every step the end values (above)
//float first_X = (float) x + (graphLeft + 1);
//float first_Y = (float) (graphTop - y) + graphHeight;
//TODO canvas.drawCircle(first_X, first_Y, dataPointsRadius, mPaint);
// canvas.drawCircle(first_X, first_Y, dataPointsRadius, mPaint);
}
lastEndY1 = orgY1;
lastEndY2 = orgY2;

View file

@ -169,9 +169,9 @@ public abstract class AbstractDanaRPlugin extends PumpPluginBase implements Pump
@Override
public boolean isThisProfileSet(@NonNull Profile profile) {
if (!isInitialized())
return true; // TODO: not sure what's better. so far TRUE to prevent too many SMS
return true;
if (danaPump.getPumpProfiles() == null)
return true; // TODO: not sure what's better. so far TRUE to prevent too many SMS
return true;
int basalValues = danaPump.getBasal48Enable() ? 48 : 24;
int basalIncrement = danaPump.getBasal48Enable() ? 30 * 60 : 60 * 60;
for (int h = 0; h < basalValues; h++) {

View file

@ -11,7 +11,6 @@ class MsgStatusAPSRv2Test : DanaRTestBase() {
fun runTest() {
val packet = MsgStatusAPS_v2(injector)
// test iob
//TODO Find a way to mock treatments plugin
val testArray = createArray(34, 7.toByte())
val iob = packet.intFromBuff(testArray, 0, 2) / 100.0
packet.handleMessage(testArray)

View file

@ -242,8 +242,8 @@ class DanaRSPlugin @Inject constructor(
}
override fun isThisProfileSet(profile: Profile): Boolean {
if (!isInitialized()) return true // TODO: not sure what's better. so far TRUE to prevent too many SMS
if (danaPump.pumpProfiles == null) return true // TODO: not sure what's better. so far TRUE to prevent too many SMS
if (!isInitialized()) return true
if (danaPump.pumpProfiles == null) return true
val basalValues = if (danaPump.basal48Enable) 48 else 24
val basalIncrement = if (danaPump.basal48Enable) 30 * 60 else 60 * 60
for (h in 0 until basalValues) {

View file

@ -224,8 +224,8 @@ class DiaconnG8Plugin @Inject constructor(
}
override fun isThisProfileSet(profile: Profile): Boolean {
if (!isInitialized()) return true // TODO: not sure what's better. so far TRUE to prevent too many SMS
if (diaconnG8Pump.pumpProfiles == null) return true // TODO: not sure what's better. so far TRUE to prevent too many SMS
if (!isInitialized()) return true
if (diaconnG8Pump.pumpProfiles == null) return true
val basalValues = 24
val basalIncrement = 60 * 60
for (h in 0 until basalValues) {