lelandjansen / fatigue

Pilot fatigue self-assessment app.
https://apps.apple.com/app/fatigue/id1211561428
Apache License 2.0
2 stars 0 forks source link

Fix initial previousToday24HoursSleep value #142

Closed lelandjansen closed 6 years ago

lelandjansen commented 6 years ago

Initially set previousToday24HoursSleep to nil. The app will now use yesterday24HoursSleep + today24HoursSleep for the original smart suggestion calculation, then use today48HoursSleep + today24HoursSleep - previousToday24HoursSleep for subsequent calculations.

This fixes the issue where the app acted as if yesterday's sleep in past 24 value was always 7.