summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-09-05Revert "Linear decrease of advert rate to conserve battery"James A. Jerkins
This reverts commit c32ba844e04017a3fd31444c384deb3542bd76be.
2021-09-04Linear decrease of advert rate to conserve batteryJames A. Jerkins
Start advertising aggressively when powered on then slow down linearly over 75 seconds. This will conserve battery by not advertising rapidly the whole time we are seeking a connection. The slowest rate is approximately once every 4.5 seconds to balance responsiveness and battery life. We use a fixed advertising duration of 5 seconds and start with a 62.5 ms advertising interval. Every 5 seconds (the advertising duration) we step up to a larger advertising interval (slower advertising). We continue to increase the advertising interval linearly for 75 seconds from the start of advertising. At 75 seconds we have an advertising interval of 4.44 seconds which we keep until connected. A reboot will restart the sequence. When we receive a disconnect event we restart the sequence with fast advertising and then slow down as described above. Note that we are not using the BLE high duty cycle setting to change the advertising rate. The rate is managed by repeatedly setting the minimum and maximum intervals. The linear rate of decrease and the slowest interval size were determined experimentally by the author. The 5.3 Core spec suggests that you not advertise slower than once every 1.2 seconds to preserve responsiveness but we ignored that suggestion.
2021-09-02Fix styles issues - no change to functionalityJames A. Jerkins
2021-09-02Fix race condition, connect->disconnect->discoveryJames A. Jerkins
2021-08-31Completely reset connection state on failJames A. Jerkins
2021-08-29WIP Refactor ble advertisingJames A. Jerkins
Refactor ble advertising based on ble standards and conventions. Changes are based on the bleprph example code, bluetooth docs, and nimble docs.
2021-08-18Add memory print usagehubmartin
2021-08-18Fix music app buttonsRiku Isokoski
2021-08-15Adjust inner padding in applistRiku Isokoski
2021-08-15Clean up using variablesRiku Isokoski
2021-08-15Adjust previously missed scrollbar and firmware validation buttonsRiku Isokoski
2021-08-15Ui updateRiku Isokoski
2021-08-14Merge branch 'call-improvements' of https://github.com/Riksu9000/InfiniTime ↵Jean-François Milants
into Riksu9000-call-improvements # Conflicts: # src/displayapp/screens/Metronome.cpp
2021-08-14Improve metronomeRiku Isokoski
2021-08-14Set pin before loopRiku Isokoski
2021-08-14Better pin configurationRiku Isokoski
2021-08-14Try to fix bootloopRiku Isokoski
2021-08-10Merge pull request #483 from Riksu9000/fix_adcJF002
Fix misconfigured ADC and remove now unnecessary filtering
2021-08-10Merge branch 'improve-battery-percentage-to-battery-icon-mapping' of ↵Jean-François Milants
https://github.com/hassless/InfiniTime into hassless-improve-battery-percentage-to-battery-icon-mapping # Conflicts: # src/displayapp/screens/BatteryIcon.cpp
2021-08-10Code cleaning in Clock, WatchFaceAnalog, WatchFaceDigital and PineTimeStyle, ↵Jean-François Milants
inspired by PR #232 by nscooling.
2021-08-01Remove leftoverRiku Isokoski
2021-08-01Remove floating point calculationRiku Isokoski
2021-08-01FixesRiku Isokoski
2021-08-01ImprovementsRiku Isokoski
2021-08-01Merge branch 'develop' into HEADRiku Isokoski
2021-07-27Increase ADC precisionRiku Isokoski
2021-07-27Merge branch 'develop' into fix_adcRiku Isokoski
2021-07-25Tile event handler : read the event data only if the event is a "value ↵Jean-François Milants
changed event". LVGL sends many other event and some of them do not set the event data (global static variable) to a valid address, which may cause an invalid read. I noticed that when porting this class on RISC-V platform (BL602).
2021-07-25Fix compile warningsJonathan Vander Mey
2021-07-25Fix slow scrollRiku Isokoski
2021-07-25Fix cases where Get() isn't usedRiku Isokoski
2021-07-25Add new unique icons for some appsRiku Isokoski
2021-07-25Add task state info to SystemInfoRiku Isokoski
2021-07-25Code cleanup (#466)Riku Isokoski
* Code cleanup * Remove override again
2021-07-24Dim screen before sleep (#464)Riku Isokoski
* Implement dimming
2021-07-24Merge branch 'fix_touchevent_tap' of git://github.com/Riksu9000/InfiniTime ↵Jean-François Milants
into Riksu9000-fix_touchevent_tap # Conflicts: # src/displayapp/DisplayApp.cpp
2021-07-22Make firmware updating more foolproof (#469)Riku Isokoski
* Make firmware updating more foolproof and fix bugs * No need to manually handle overflow * Make startTime TickType_t * Don't process TouchEvents::None * Fix sleep getting re-enabled issue more directly
2021-07-14Multiple wakeup sources (#290)Kozova1
* Allow multiple wakeup modes at the same time. This commit adds multiple wakeup modes support. It does so by storing them as a uint8_t bitfield enum. It changes the following functions: Since multiple modes can be on now, older version would not cut it: WakeUpMode getWakeupMode() -> std::bitset<3> getWakeUpModes() Where each bit corresponds to a WakeUpMode We still need a way to check whether a specific wakeup mode is on, so: bool isWakeUpModeOn(const WakeUpMode mode) This function was changed to work correctly with the new implementation. setWakeUpMode(WakeupMode mode, bool enable) Previously, systemtask would exit SystemTask::OnTouchEvent() if the wake up mode was None or RaiseWrist, to prevent waking up when a touch was received. However, after enabling using multiple WakeUpModes, this caused a bug where when RaiseWrist was checked with SingleTap or DoubleTap, the tap detection wouldn't work. This commit fixes that bug. Next commit will update the settings WakeUpMode select UI to reflect these changes. Signed-off-by: Kozova1 <mug66kk@gmail.com> * Updated UI to reflect multiple WakeUp sources being available. Signed-off-by: Kozova1 <mug66kk@gmail.com>
2021-07-14Set correct refresh times for lvgl (#488)Riku Isokoski
2021-07-14Merge branch 'develop' into fix_touchevent_tapRiku Isokoski
2021-07-13Merge branch 'develop' into fix_adcRiku Isokoski
2021-07-13Merge branch 'develop' of github.com:JF002/Pinetime into developJean-François Milants
2021-07-13Merge branch 'lvgl_use_system_tick' of ↵Jean-François Milants
https://github.com/Riksu9000/InfiniTime into Riksu9000-lvgl_use_system_tick # Conflicts: # src/displayapp/screens/BatteryInfo.cpp # src/displayapp/screens/BatteryInfo.h
2021-07-13Adjust displayapp delay to compensate time spent (#482)Riku Isokoski
2021-07-13Merge branch 'develop' into notify-battery-levelJean-François Milants
# Conflicts: # src/displayapp/screens/BatteryInfo.cpp
2021-07-12Fix misconfigured ADC and remove now unnecessary filteringRiku Isokoski
2021-07-11Refactor trig functions into LUT (#476)Jonathan Vander Mey
Replaced the use of the standard library trig functions with a LUT-based implementation instead. The standard library implementations produce more accurate results but the usage here doesn't need that. This ends up saving nearly 7kB of binary size.
2021-07-11Modify status text in BatteryInfo so it fits on screen (#437)kieranc
* Modify status text in BatteryInfo so it fits on screen
2021-07-11Notify battery level every 10 minutes when connected to a BLE host.Jean-François Milants
Refactor battery percent : only use uint8_t to store the battery % remaining.
2021-07-11Change step gauge range to 100 and calculate progress as percantage (#468)kieranc