Skip to content

Commit

Permalink
Release/0.1.23 (#53)
Browse files Browse the repository at this point in the history
* Correctly show future temp target

* Bolus UI updated

* Fix basal rounding if pump not set

* README and FAQ updated
  • Loading branch information
ivalkou authored Apr 29, 2021
1 parent 1066b92 commit 647f99f
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 36 deletions.
9 changes: 3 additions & 6 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## How to get the Medtronic pump ready?

- Set your temporary basal to units (not percents!).
- Turn on the remote control with any ID (for example 000000).
- Turn on the remote control with any ID (for example 00000).

## Can I use Bolus assistant on a Medtronic pump?

Expand All @@ -20,20 +20,17 @@

- Yes. For that you need to open the loop in settings and the button will appear on the main screen.

## how to run the loop on demand manually?
## How to run the loop on demand manually?

- There is no way of doing that. You can force the data update by long-tapping the loop icon. If this actions gets any new data, loop will be recalculated.

## How to change BG units?

- Preferences -> Glucose units. You will then have to set targets and insulin sensitivity and restart the application.

## How to get BG values from Spike/Diabox?

- Settings -> Nightscout -> Use Local Glucose Server, and set the port of a local server. Spike - 1979, Diabox - 17580

## How to see raw data that is used inside the app?

- Preferences -> Edit settings json. Set "debugOptions": true, and restart the app.
- In Files application on iPhone.
- You can also download all the data to your computer through iTunes or Finder.

7 changes: 2 additions & 5 deletions FAQ_RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Как подготовить помпу Medtronic?

- Установить временный базал в единицах (не в процентах!).
- Включить удаленный контроль с любым ID (например 000000).
- Включить удаленный контроль с любым ID (например 00000).

## Можно ли использовать Помощник болюса на помпе Medtronic?

Expand All @@ -24,16 +24,13 @@

- Такой возможности нет. Можно принудительно обновить данные помпы долгим нажатием на круг. Если новые данные доступны, петля выполнится.

## Как изменить единицы измерения глюкозы?

- Preferences -> Glucose units. Вам потребуется заново настроить цели и чувствительность к инсулину, затем перезапустить приложение.

## Как получать глюкозу из Spike/Diabox?

- Settings -> Nightscout -> Use Local Glucose Server, затем укажите порт внутреннего сервера. Spike - 1979, Diabox - 17580

## Как посмотреть сырые данные, с которыми работает приложение?

- Preferences -> Edit settings json. Установите параметр "debugOprions": true, затем перезапустите приложение.
- В приложении Файлы на iPhone.
- Также возможно скачать все данные на компьютер через iTunes или Finder.

4 changes: 2 additions & 2 deletions FreeAPS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2005,7 +2005,7 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = "$(CURRENT_PROJECT_VERSION)";
PRODUCT_BUNDLE_IDENTIFIER = "---CHANE-IT-TO-YOUR-OWN---";
PRODUCT_BUNDLE_IDENTIFIER = "---CHANGE-IT-TO-YOUR-OWN---";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -2031,7 +2031,7 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = "$(CURRENT_PROJECT_VERSION)";
PRODUCT_BUNDLE_IDENTIFIER = "---CHANE-IT-TO-YOUR-OWN---";
PRODUCT_BUNDLE_IDENTIFIER = "---CHANGE-IT-TO-YOUR-OWN---";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down
2 changes: 1 addition & 1 deletion FreeAPS/Resources/Config.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BUILD_VERSION = 0.1.22
BUILD_VERSION = 0.1.23
2 changes: 2 additions & 0 deletions FreeAPS/Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>
<key>AppGroupID</key>
<string>$(APP_GROUP_ID)</string>
<key>CFBundleDevelopmentRegion</key>
Expand Down
13 changes: 10 additions & 3 deletions FreeAPS/Sources/APS/Storage/TempTargetsStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,20 @@ final class BaseTempTargetsStorage: TempTargetsStorage, Injectable {
}

func current() -> TempTarget? {
guard let last = recent().last else {
guard let currentTarget = recent()
.last(where: {
$0.createdAt.addingTimeInterval(Int($0.duration).minutes.timeInterval) > Date()
&& $0.createdAt <= Date()
})
else {
return nil
}
guard last.createdAt.addingTimeInterval(Int(last.duration).minutes.timeInterval) > Date() else {

if let cancel = recent().last(where: { $0.createdAt <= Date() }), cancel.duration == 0 {
return nil
}
return last

return currentTarget
}

func nightscoutTretmentsNotUploaded() -> [NigtscoutTreatment] {
Expand Down
2 changes: 1 addition & 1 deletion FreeAPS/Sources/Models/BloodGlucose.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct BloodGlucose: JSON, Identifiable, Hashable {
var isStateValid: Bool { sgv ?? 0 >= 39 && noise ?? 1 != 4 }
}

enum GlucoseUnits: String, JSON {
enum GlucoseUnits: String, JSON, Equatable {
case mgdL = "mg/dL"
case mmolL = "mmol/L"

Expand Down
2 changes: 1 addition & 1 deletion FreeAPS/Sources/Models/FreeAPSSettings.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

struct FreeAPSSettings: JSON {
struct FreeAPSSettings: JSON, Equatable {
var units: GlucoseUnits
var closedLoop: Bool
var allowAnnouncements: Bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extension BasalProfileEditor {
}

override func subscribe() {
rateValues = provider.supportedBasalRates ?? stride(from: 0.05, to: 10.01, by: 0.05).map { Decimal($0) }
rateValues = provider.supportedBasalRates ?? stride(from: Decimal(0.05), to: 10.01, by: 0.05).map { $0 }
items = provider.profile.map { value in
let timeIndex = timeValues.firstIndex(of: Double(value.minutes * 60)) ?? 0
let rateIndex = rateValues.firstIndex(of: value.rate) ?? 0
Expand Down
8 changes: 3 additions & 5 deletions FreeAPS/Sources/Modules/Bolus/View/BolusRootView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,13 @@ extension Bolus {
Button { viewModel.add() }
label: { Text("Enact bolus") }
.disabled(viewModel.amount <= 0)
}

Section {
if viewModel.waitForSuggestionInitial {
Button { viewModel.showModal(for: nil) }
label: { Text("Continue without bolus") }
}
}

Section {
if !viewModel.waitForSuggestionInitial {
} else {
Button { isAddInsulinAlertPresented = true }
label: { Text("Add insulin without actually bolusing") }
.disabled(viewModel.amount <= 0)
Expand Down
10 changes: 6 additions & 4 deletions FreeAPS/Sources/Services/SettingsManager/SettingsManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ final class BaseSettingsManager: SettingsManager, Injectable {

var settings: FreeAPSSettings {
didSet {
save()
DispatchQueue.main.async {
self.broadcaster.notify(SettingsObserver.self, on: .main) {
$0.settingsDidChange(self.settings)
if oldValue != settings {
save()
DispatchQueue.main.async {
self.broadcaster.notify(SettingsObserver.self, on: .main) {
$0.settingsDidChange(self.settings)
}
}
}
}
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,21 @@ If you want to test it, there is a beta-version available
- Autosens
- Nightscout BG data source as a CGM (Online)
- Applications that mimic Nightscout as a CGM (apps like Spike and Diabox) (Offline)
- xDrip4iOS data source as a CGM via shared app gpoup (Offline)
- System state upload to Nightscout
- Remote carbs enter and temporary targets through Nightscout
- Remote bolusing and insulin pump control

## Not implemented (plans for future)

- Open loop mode
- Phone notifications of the system state
- Bolus cancelation possibility
- Phone notifications of the system and connected devices state
- Profile upload to Nightscout
- Desktop widget
- Apple Watch app
- Remote bolusing and insulin pump control
- Plugins
- Dexcom support
- Enlite support
- Apple Health support
- Detailed functions description inside the app

Expand Down
9 changes: 5 additions & 4 deletions README_RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,22 @@ FreeAPS X находится в состоянии активной разраб
- Autotune
- Autosens
- Использование Nightscout в качестве CGM
- Использование локального сервера в качестве CGM (программы Spike, Diabox)
- Использование оффлайн локального сервера в качестве CGM (программы Spike, Diabox)
- Использование xDrip4iOS оффлан в качестве CGM через shared app gpoup
- Загрузка состояния системы в Nightscout
- Удаленный ввод углеводов и временных целей через Nightscout
- Удаленный ввод болюса и управление помпой

## Не реализовано (планируется в будущих версиях)

- Режим открытой петли
- Уведомления на смартфоне о состоянии системы
- Возможность отмены болюса
- Уведомления на смартфоне о состоянии системы и подключенных к ней устройств
- Загрузка профиля в Nightscout
- Виджет на рабочий стол
- Приложение для часов
- Удаленный ввод болюса и управление помпой
- Плагины
- Поддержка Dexcom
- Поддержка Enlite
- Пооддержка программы Здоровье
- Поробное описание функций внутри приложения

Expand Down

0 comments on commit 647f99f

Please sign in to comment.