This commit is contained in:
Milos Kozak 2023-01-01 17:18:23 +01:00
commit ff1d3f1237
5 changed files with 42 additions and 45 deletions

View file

@ -7,9 +7,9 @@ General rules
=============
* There are plenty of ways you can help, some of them are listed on wiki:
https://wiki.aaps.app/en/latest/EN/Getting-Started/How-can-I-help.html
https://wiki.aaps.app/en/latest/Getting-Started/How-can-I-help.html
* If you wish to help with documentation or translating:
https://wiki.aaps.app/en/latest/EN/translations.html
https://wiki.aaps.app/en/latest/translations.html
Development guidelines
======================

View file

@ -6,5 +6,5 @@ Reporting bugs
upper-right corner).
- Obtain the app's log files, which can be found on the phone in
_/storage/emulated/0/Android/data/info.nightscout.androidaps/_
See https://wiki.aaps.app/en/latest/EN/Usage/Accessing-logfiles.html
See https://wiki.aaps.app/en/latest/Usage/Accessing-logfiles.html
- Open an issue at https://github.com/nightscout/AndroidAPS/issues/new

View file

@ -4,7 +4,7 @@
<string name="dia_label_exam">Duration of Insulin Action (DIA)</string>
<string name="dia_profile">You should set the value for DIA in your profile.</string>
<string name="dia_minimumis5h">The minimum allowed value is 5 hours.</string>
<string name="dia_hint1">https://wiki.aaps.app/en/latest/EN/Configuration/Config-Builder.html?#insulin</string>
<string name="dia_hint1">https://wiki.aaps.app/en/latest/Configuration/Config-Builder.html?#insulin</string>
<string name="dia_meaningisequaltodiapump">If you are satisfied that the value for DIA that you used in your pump prior to AAPS worked well, there is no need to change this when you start looping.</string>
<string name="dia_valuemustbedetermined">You should determine for yourself the appropriate value for DIA.</string>
<string name="hypott_label">Hypo Temp-Target</string>
@ -13,18 +13,18 @@
<string name="hypott_preventoversmb">To prevent AAPS from overcorrecting for a blood glucose rise caused by the fast acting carbs used to treat a hypo.</string>
<string name="hypott_exercise">To correct for a hypo induced as a result of exercise.</string>
<string name="hypott_0basal">To prevent blood glucose from going low if there is already a 0% temporary basal rate running.</string>
<string name="hypott_hint1">https://wiki.aaps.app/en/latest/EN/Usage/temptarget.html</string>
<string name="hypott_hint1">https://wiki.aaps.app/en/latest/Usage/temptarget.html</string>
<string name="offlineprofile_whatprofile">Which profile can be used and configured offline?</string>
<string name="offlineprofile_label">Topic: Offline Profile</string>
<string name="offlineprofile_nsprofile">NS Profile can be used, but not configured.</string>
<string name="offlineprofile_hint1">https://wiki.aaps.app/en/latest/EN/Configuration/Config-Builder.html#profile</string>
<string name="offlineprofile_hint1">https://wiki.aaps.app/en/latest/Configuration/Config-Builder.html#profile</string>
<string name="pumpdisconnect_label">Reasons for applying "Disconnect pump" in AAPS</string>
<string name="pumpdisconnect_whattodo">What should be done when disconnecting the pump?</string>
<string name="pumpdisconnect_unnecessary">This is unnecessary as insulin will not be delivered if the pump is physically disconnected.</string>
<string name="pumpdisconnect_missinginsulin">It prevents AAPS from accounting for insulin that was not delivered whilst the pump is physically disconnected. </string>
<string name="pumpdisconnect_notstop">It will not stop insulin delivery if the pump remains connected.</string>
<string name="pumpdisconnect_openloop">It will send AAPS into open loop mode.</string>
<string name="pumpdisconnect_hint1">https://wiki.aaps.app/en/latest/EN/Getting-Started/FAQ.html#other-settings</string>
<string name="pumpdisconnect_hint1">https://wiki.aaps.app/en/latest/Getting-Started/FAQ.html#other-settings</string>
<string name="objectives_label">AAPS Settings</string>
<string name="objectives2_label">AAPS Settings</string>
<string name="objectives_howtosave">What are the best practices for backing up your settings?</string>
@ -36,29 +36,29 @@
<string name="objectives2_internalstorage">Your settings file is found in the folder Internal Storage/AAPS/preferences on your phone.</string>
<string name="objectives2_cloud">Copy your preferences file to a safe location outside of your phone (e.g. by using a cloud drive, connecting a cable to a computer, email, etc.)</string>
<string name="objectives2_easyrestore">If your phone is damaged or lost, there are easy ways to remotely recover your settings without a backup.</string>
<string name="objectives_hint1">https://wiki.aaps.app/en/latest/EN/Usage/ExportImportSettings.html</string>
<string name="objectives_hint2">https://wiki.aaps.app/en/latest/EN/Getting-Started/FAQ.html#what-emergency-equipment-is-recommended-to-take-with-me</string>
<string name="objectives_hint1">https://wiki.aaps.app/en/latest/Usage/ExportImportSettings.html</string>
<string name="objectives_hint2">https://wiki.aaps.app/en/latest/Getting-Started/FAQ.html#what-emergency-equipment-is-recommended-to-take-with-me</string>
<string name="noisycgm_label">Noisy CGM Readings</string>
<string name="noisycgm_whattodo">What should be done if CGM data is noisy?</string>
<string name="noisycgm_nothing">Do nothing - AAPS will deal with it.</string>
<string name="noisycgm_pause">Disable the closed loop to avoid possible over or underdosing.</string>
<string name="noisycgm_replacesensor">Replace consistently noisy or inaccurate sensors.</string>
<string name="noisycgm_checksmoothing">Verify that your CGM app provides smoothed data.</string>
<string name="noisycgm_hint1">https://wiki.aaps.app/en/latest/EN/Usage/Smoothing-Blood-Glucose-Data-in-xDrip.html#smoothing-blood-glucose-data</string>
<string name="noisycgm_hint1">https://wiki.aaps.app/en/latest/Usage/Smoothing-Blood-Glucose-Data-in-xDrip.html#smoothing-blood-glucose-data</string>
<string name="exerciseprofile_label">Exercise and Profiles</string>
<string name="exerciseprofile_whattodo">How can you use profiles to best help the system deal with aerobic exercise?</string>
<string name="exerciseprofile_switchprofilebelow100">Do a profile switch to less than 100%.</string>
<string name="exerciseprofile_switchprofileabove100">Do a profile switch to more than 100%.</string>
<string name="exerciseprofile_leaveat100">Leave the profile set to 100%.</string>
<string name="exerciseprofile_suspendloop">Suspend the loop.</string>
<string name="exerciseprofile_hint1">https://wiki.aaps.app/en/latest/EN/Usage/temptarget.html#activity-temp-target</string>
<string name="exerciseprofile_hint1">https://wiki.aaps.app/en/latest/Usage/temptarget.html#activity-temp-target</string>
<string name="exercise_label">Exercise and Temporary Targets</string>
<string name="exercise_whattodo">How can you use temporary targets to best help the system deal with aerobic exercise?</string>
<string name="exercise_settt">Set an activity blood glucose target starting a suitable time before beginning exercise.</string>
<string name="exercise_setfinished">Set an activity blood glucose target after finishing exercise.</string>
<string name="exercise_setunchanged">Leave your blood glucose target unchanged.</string>
<string name="exercise_15g">Wait until blood glucose drops below your hypo temp target and then eat 15 g of fast acting carbohydrates.</string>
<string name="exercise_hint1">https://wiki.aaps.app/en/latest/EN/Usage/temptarget.html#activity-temp-target</string>
<string name="exercise_hint1">https://wiki.aaps.app/en/latest/Usage/temptarget.html#activity-temp-target</string>
<string name="suspendloop_doigetinsulin">Do I receive insulin when the loop is disabled/suspended?</string>
<string name="suspendloop_yes">Yes, basal insulin continues to be delivered.</string>
<string name="suspendloop_no">No, delivery of insulin is stopped.</string>
@ -68,7 +68,7 @@
<string name="basaltest_havingregularhighlow">When experiencing frequent high or low blood glucose.</string>
<string name="basaltest_weekly">At least once per week.</string>
<string name="basaltest_fixed">Once set and validated, these values should not change over time.</string>
<string name="basaltest_hint1">https://wiki.aaps.app/en/latest/EN/Getting-Started/FAQ.html#androidaps-settings</string>
<string name="basaltest_hint1">https://wiki.aaps.app/en/latest/Getting-Started/FAQ.html#androidaps-settings</string>
<string name="prerequisites_label">Prerequisites</string>
<string name="prerequisites_what">What is essential to set up and use AAPS?</string>
<string name="prerequisites_determinedcorrectprofile">Validated profile information (Basal, IC, ISF, DIA).</string>
@ -81,7 +81,7 @@
<string name="prerequisites_githubaccount">A Github account.</string>
<string name="prerequisites_beanandroiddeveloper">Experience in programming or editing code.</string>
<string name="prerequisites_own670g">A MiniMed 670G pump.</string>
<string name="prerequisites_hint1">https://wiki.aaps.app/en/latest/EN/Module/module.html</string>
<string name="prerequisites_hint1">https://wiki.aaps.app/en/latest/Module/module.html</string>
<string name="prerequisites_smartwatch">A Smartwatch.</string>
<string name="prerequisites_supportedcgm">A Supported CGM.</string>
<string name="prerequisites2_label">Prerequisites</string>
@ -90,7 +90,7 @@
<string name="prerequisites2_device">A compatible Android device (e.g. mobile/cell phone, full Android watch, or tablet).</string>
<string name="prerequisites2_internet">AAPS requires an internet connection in order to run in closed loop.</string>
<string name="prerequisites2_supportedcgm">A supported CGM and appropriate app to receive blood glucose values on the phone/device.</string>
<string name="prerequisites2_hint1">https://wiki.aaps.app/en/latest/EN/Module/module.html</string>
<string name="prerequisites2_hint1">https://wiki.aaps.app/en/latest/Module/module.html</string>
<string name="update_label">Updating AAPS</string>
<string name="whatistrue">Check all correct answers.</string>
<string name="update_git">You need to have Git installed and configured on your computer.</string>
@ -98,14 +98,14 @@
<string name="update_keys">You should save and note the location of your keystore and use the same signing key for updates as for your previous installation.</string>
<string name="update_neverupdate">Never update if the system is working well.</string>
<string name="update_askfriend">If you have difficulty building the apk, you can install an apk that has been built by a friend.</string>
<string name="update_hint1">https://wiki.aaps.app/en/latest/EN/Installing-AndroidAPS/Update-to-new-version.html#update-to-a-new-version-or-branch</string>
<string name="update_hint1">https://wiki.aaps.app/en/latest/Installing-AndroidAPS/Update-to-new-version.html#update-to-a-new-version-or-branch</string>
<string name="troubleshooting_label">Troubleshooting</string>
<string name="troubleshooting_wheretoask">Where can you look for help with AAPS?</string>
<string name="troubleshooting_fb">You can ask for advice in the AAPS Users Facebook group.</string>
<string name="troubleshooting_wiki">You should read (and re-read) the AAPS documentation.</string>
<string name="troubleshooting_gitter">You can ask for advice and log technical problems or issues in the AAPS Discord.</string>
<string name="troubleshooting_yourendo">You should ask your diabetes clinic/endocrinologist.</string>
<string name="troubleshooting_hint1">https://wiki.aaps.app/en/latest/EN/Installing-AndroidAPS/Update-to-new-version.html#troubleshooting</string>
<string name="troubleshooting_hint1">https://wiki.aaps.app/en/latest/Installing-AndroidAPS/Update-to-new-version.html#troubleshooting</string>
<string name="troubleshooting_hint2">https://www.facebook.com/groups/AndroidAPSUsers/</string>
<string name="troubleshooting_hint3">https://discord.gg/4fQUWHZ4Mw</string>
<string name="insulin_plugins">Insulin Plugins</string>
@ -114,15 +114,15 @@
<string name="insulin_novorapid">NovoRapid®/Novolog®</string>
<string name="insulin_humalog">Humalog®</string>
<string name="insulin_actrapid">Actrapid®/Humalin R®/"regular" human insulin.</string>
<string name="insulin_hint1">https://wiki.aaps.app/en/latest/EN/Configuration/Config-Builder.html#insulin</string>
<string name="insulin_hint1">https://wiki.aaps.app/en/latest/Configuration/Config-Builder.html#insulin</string>
<string name="sensitivity_label">Sensitivity Plugins</string>
<string name="sensitivity_which">Check all correct answers.</string>
<string name="sensitivity_adjust">Sensitivity plugins allow AAPS to adjust for temporary or short-lived changes in insulin sensitivity (for example hormonal changes or issues with absorption at the infusion site).</string>
<string name="sensitivity_edit">Sensitivity plugins provide the user with suggested changes to basal rates, I:C ratios and ISF that can be used to edit profile.</string>
<string name="sensitivity_cannula">Logging a cannula change will reset Autosens ratio back to 100%.</string>
<string name="sensitivity_time">Some of the plugin options have configurable time ranges that can be set by the user.</string>
<string name="sensitivity_hint1">https://wiki.aaps.app/en/latest/EN/Configuration/Sensitivity-detection-and-COB.html</string>
<string name="sensitivity_hint2">https://wiki.aaps.app/en/latest/Usage/Open-APS-features.html?highlight=Autosens#autosens</string>
<string name="sensitivity_hint1">https://wiki.aaps.app/en/latest/Configuration/Sensitivity-detection-and-COB.html</string>
<string name="sensitivity_hint2">https://wiki.aaps.app/en/latest/Usage/Open-APS-features.html#autosens</string>
<string name="wrongcarbs_label">Carb Entry Errors</string>
<string name="wrongcarbs_whattodo">What should you do if youve made an incorrect carb entry?</string>
<string name="wrongcarbs_treatmentstab">Delete the incorrect entry in Treatments and enter the correct new carb value.</string>
@ -157,29 +157,29 @@
<string name="breadgrams_exchange">Carbohydrates consumed can be recorded using an appropriate exchange system (e.g. DAFNE "CHO" exchanges or European "Bread Units").</string>
<string name="breadgrams_decay">AAPS uses a dynamic model to estimate carb “decay” and calculate COB.</string>
<string name="breadgrams_calc">If blood glucose levels are outside acceptable values (too low or too high) the bolus calculator can be used to provide suggestions for carb or insulin corrections.</string>
<string name="breadgrams_hint1">https://wiki.aaps.app/en/latest/EN/Getting-Started/FAQ.html#insulin-to-carb-ratio-ic-g-u</string>
<string name="breadgrams_hint1">https://wiki.aaps.app/en/latest/Getting-Started/FAQ.html#insulin-to-carb-ratio-ic-g-u</string>
<string name="extendedcarbs_label">e-carbs</string>
<string name="extendedcarbs_handling">What could you use e-carbs (extended carbs) for?</string>
<string name="extendedcarbs_future">To schedule carbs in the future, possibly distributed over an interval (similar to an extended bolus distributing insulin over an interval).</string>
<string name="extendedcarbs_free">For logging \'free\' exercise carbs you want to hide from AAPS.</string>
<string name="extendedcarbs_fat">e-carbs (distributed in the future) can assist AAPS in dealing with high fat/protein meals.</string>
<string name="extendedcarbs_rescue">For logging rescue carbs you use to treat low blood glucose. </string>
<string name="extendedcarbs_hint1">https://wiki.aaps.app/en/latest/EN/Usage/Extended-Carbs.html</string>
<string name="extendedcarbs_hint1">https://wiki.aaps.app/en/latest/Usage/Extended-Carbs.html</string>
<string name="nsclient_label">Remote Monitoring</string>
<string name="nsclient_howcanyou">How can you monitor AAPS (for example for your child) remotely?</string>
<string name="nsclient_nightscout">AAPSClient app, Nightscout app and Nightscout webpage all allow you to follow AAPS remotely.</string>
<string name="nsclient_dexcomfollow">Other apps (e.g. Dexcom follow, xDrip running in follow mode) allow you to follow some parameters (e.g. blood glucose/sensor values) remotely, but use different algorithms so may have inaccurate IOB or COB values.</string>
<string name="nsclient_data">To follow AAPS remotely, both devices must have internet access (e.g. via Wi-Fi or mobile/cellular network data).</string>
<string name="nsclient_fullcontrol">AAPSClient used as a remote follower will both monitor and provide full control of AAPS.</string>
<string name="nsclient_hint1">https://wiki.aaps.app/en/latest/EN/Children/Children.html</string>
<string name="nsclient_hint1">https://wiki.aaps.app/en/latest/Children/Children.html</string>
<string name="isf_label_exam">Insulin Sensitivity Factor (ISF)</string>
<string name="isf_increasingvalue">Raising ISF values will lead to more insulin delivery to cover a specific amount of carbs.</string>
<string name="isf_decreasingvalue">Reducing ISF values lead to more insulin delivery to correct for an above target blood glucose.</string>
<string name="isf_noeffect">Raising or lowering ISF has no effect on insulin delivery when blood glucose levels are below target.</string>
<string name="isf_preferences">ISF should be entered in your AAPS Preferences.</string>
<string name="isf_profile">Changing the ISF value in your profile is enough to apply the change.</string>
<string name="isf_hint1">https://wiki.aaps.app/en/latest/EN/Getting-Started/FAQ.html#insulin-sensitivity-factor-isf-mmol-l-u-or-mg-dl-u</string>
<string name="isf_hint2">https://wiki.aaps.app/en/latest/EN/Usage/Profiles.html</string>
<string name="isf_hint1">https://wiki.aaps.app/en/latest/Getting-Started/FAQ.html#insulin-sensitivity-factor-isf-mmol-l-u-or-mg-dl-u</string>
<string name="isf_hint2">https://wiki.aaps.app/en/latest/Usage/Profiles.html</string>
<string name="ic_multiple">You can use more than one value for I:C ratio in your profile.</string>
<string name="ic_isf">If you change your ISF in your profile you should always change your I:C ratio too.</string>
<string name="ic_label_exam">Insulin to Carbohydrate Ratio (I:C ratio)</string>
@ -188,14 +188,14 @@
<string name="ic_noeffect">If you have 0 COB, changing the IC ratio will lead to a different amount of insulin to correct a given BG value.</string>
<string name="ic_different">IC will be different if you count bread (exchange) unit as 10g or 12g.</string>
<string name="ic_meaning">IC meaning is: How many bread (exchange) units are covered by 1U of insulin.</string>
<string name="ic_hint1">https://wiki.aaps.app/en/latest/EN/Getting-Started/FAQ.html#carbohydrate-to-insulin-ratio-cr-g-u</string>
<string name="ic_hint1">https://wiki.aaps.app/en/latest/Getting-Started/FAQ.html#carbohydrate-to-insulin-ratio-cr-g-u</string>
<string name="profileswitch_label">Profile Switching</string>
<string name="profileswitch_pctwillchange"> When specifying a 90% profile switch, which answers are true?</string>
<string name="profileswitch_basallower">Basal rates will be 10% lower.</string>
<string name="profileswitch_isfhigher">ISF will be 10% higher.</string>
<string name="profileswitch_iclower">The value of the I:C ratio will be a 10% lower number.</string>
<string name="profileswitch_unchanged">ISF and I:C ratios will be unchanged.</string>
<string name="profileswitch_hint1" formatted="false">https://wiki.aaps.app/en/latest/EN/Usage/Profiles.html?highlight=profile%20switch#profile-switch</string>
<string name="profileswitch_hint1" formatted="false">https://wiki.aaps.app/en/latest/Usage/Profiles.html#profile-switch</string>
<string name="profileswitch2_label">Profile Switching</string>
<string name="profileswitch2_pctwillchange"> When specifying a 120% profile switch, which answers are true?</string>
<string name="profileswitch2_bghigher">Target blood glucose will be 20% higher.</string>
@ -208,13 +208,13 @@
<string name="profileswitchtime__2">Initiate a profile switch with a timeshift of -2</string>
<string name="profileswitchtime_tt">Set an eating soon temporary target.</string>
<string name="profileswitchtime_100">Do a profile switch to more than 100%. </string>
<string name="profileswitchtime_hint1">https://wiki.aaps.app/en/latest/EN/Usage/Profiles.html?highlight=profile%20switch#timeshift</string>
<string name="profileswitchtime_hint1">https://wiki.aaps.app/en/latest/Usage/Profiles.html#timeshift</string>
<string name="profileswitch4_label">Changes to profiles</string>
<string name="profileswitch4_rates">Basal rates, ISF, I:C ratios, etc., should be set in profiles.</string>
<string name="profileswitch4_internet">Activating changes to your Nightscout Profile requires your AAPS phone to have an internet connection.</string>
<string name="profileswitch4_sufficient">Editing profiles to change values is sufficient to enact any changes made.</string>
<string name="profileswitch4_multi">Multiple profiles can be set up and selected to accommodate changing circumstances (e.g. hormonal changes, shift working, weekdays/weekend lifestyle).</string>
<string name="basalhelp_hint1">https://wiki.aaps.app/en/latest/EN/Module/module.html#good-individual-dosage-algorithm-for-your-diabetes-therapy</string>
<string name="basalhelp_hint1">https://wiki.aaps.app/en/latest/Module/module.html#good-individual-dosage-algorithm-for-your-diabetes-therapy</string>
<string name="basalhelp_label">Help with basal rates</string>
<string name="basalhelp_where">Where to go for help with basalrate etc.</string>
<string name="basalhelp_diabetesteam">Your diabetes team</string>

View file

@ -29,7 +29,7 @@
<string name="objectives_smb_gate">You must read the wiki and rise maxIOB to get SMBs working fine! A good start is maxIOB=average mealbolus + 3 x max daily basal</string>
<string name="objectives_smb_learned">Using SMB is your goal. Oref1 algorithm was designed to help you with your boluses as well. You should not give full bolus for your food but only part of it and let AAPS give you the rest if needed. This way you have more space for miscalculated carbs. Did you know that you can set a percentage of bolus calculator result to reduce the size of bolus?</string>
<string name="objectives_auto_objective">Enabling automation</string>
<string name="objectives_auto_gate">Read the docs on how automation works. Set up your first simple rules. Instead of action let AAPS display only notification. When you are sure automation is triggered at the right time replace notification by real action. (https://wiki.aaps.app/en/latest/EN/Usage/Automation.html)</string>
<string name="objectives_auto_gate">Read the docs on how automation works. Set up your first simple rules. Instead of action let AAPS display only notification. When you are sure automation is triggered at the right time replace notification by real action. (https://wiki.aaps.app/en/latest/Usage/Automation.html)</string>
<string name="objectives_auto_learned">Automation can be a good servant but a bad master. Don\'t overuse it. Do not try to replace underlying algorithm. Test the rule with message only before use. It depends on order.</string>
<string name="objectives_bgavailableinns">BG available in NS</string>
<string name="objectives_pumpstatusavailableinns">Pump status available in NS</string>
@ -76,10 +76,10 @@
<string name="unfinshed_button">Next unfinished</string>
<string name="requestcode">Request code: %1$s</string>
<string name="objectives_hint">(check all correct answers)</string>
<string name="disconnectpump_hint" formatted="false">https://wiki.aaps.app/en/latest/EN/Getting-Started/FAQ.html#what-to-do-when-taking-a-shower-or-bath</string>
<string name="usetemptarget_hint" formatted="false">https://wiki.aaps.app/en/latest/EN/Getting-Started/Screenshots.html#the-homescreen</string>
<string name="useaction_hint" formatted="false">https://wiki.aaps.app/en/latest/EN/Getting-Started/Screenshots.html#config-builder</string>
<string name="usescale_hint" formatted="false">https://wiki.aaps.app/en/latest/EN/Getting-Started/Screenshots.html#the-homescreen</string>
<string name="disconnectpump_hint" formatted="false">https://wiki.aaps.app/en/latest/Getting-Started/FAQ.html#what-to-do-when-taking-a-shower-or-bath</string>
<string name="usetemptarget_hint" formatted="false">https://wiki.aaps.app/en/latest/Getting-Started/Screenshots.html#the-homescreen</string>
<string name="useaction_hint" formatted="false">https://wiki.aaps.app/en/latest/Configuration/Config-Builder.html</string>
<string name="usescale_hint" formatted="false">https://wiki.aaps.app/en/latest/Getting-Started/Screenshots.html#the-homescreen</string>
<string name="notconnected">Not connected to the internet</string>
<string name="failedretrievetime">Failed retrieve time</string>
<string name="requirementnotmet">Objective requirements not met</string>

View file

@ -24,6 +24,7 @@ class SimpleUi @Inject constructor(
private val sp: SP,
private val dateUtil: DateUtil
) {
private var batteryReceiver: BroadcastReceiver? = null
private var mBackgroundPaint = Paint()
private lateinit var mTimePaint: Paint
@ -89,18 +90,14 @@ class SimpleUi @Inject constructor(
}
}
private fun isOutdated(singleBg: EventData.SingleBg): Boolean {
val timeSince = (System.currentTimeMillis() - singleBg.timeStamp).toDouble()
return singleBg.timeStamp > 0 && (timeSince <= 1000 * 60 * 12)
}
private fun isOutdated(singleBg: EventData.SingleBg): Boolean =
singleBg.timeStamp > 0 && (System.currentTimeMillis() - singleBg.timeStamp) > 1000 * 60 * 12
private fun getBgColour(level: Long): Int {
if (level == 1L) {
return colorDarkHigh
}
return if (level == 0L) {
colorDarkMid
} else colorDarkLow
private fun getBgColour(level: Long): Int =
when (level) {
1L -> colorDarkHigh
0L -> colorDarkMid
else -> colorDarkLow
}
private val isCharging: Boolean