Commit graph

82 commits

Author SHA1 Message Date
Tim Gates 84a93b5441
docs: Fix a few typos (#606)
* docs: Fix a few typos

There are small typos in:
- doc/versioning.md
- src/components/ble/NimbleController.cpp
- src/libs/mynewt-nimble/CODING_STANDARDS.md
- src/libs/mynewt-nimble/docs/btshell/btshell_GAP.rst
- src/systemtask/SystemTask.cpp

Fixes:
- Should read `milliseconds` rather than `miliseconds`.
- Should read `unnecessary` rather than `uncesseray`.
- Should read `target` rather than `tharget`.
- Should read `project` rather than `projct`.
- Should read `preferred` rather than `prefered`.
- Should read `functioning` rather than `functionning`.
- Should read `forever` rather than `forver`.
- Should read `existing` rather than `exisiting`.
2021-09-13 20:02:53 +02:00
Riku Isokoski 21d37d1e23 Merge remote-tracking branch 'upstream/develop' into timer_battery_reading 2021-08-30 10:15:19 +03:00
Jean-François Milants 6c023785e5 Fix wake on tap/double tap. 2021-08-28 21:30:31 +02:00
Riku Isokoski 085c9ab2e1 Merge branch 'develop' into timer_battery_reading 2021-08-28 16:54:40 +03:00
Jean-François Milants 0313277ae6 Fix touchinfo typo in SystemTask. 2021-08-28 15:10:14 +02:00
Jean-François Milants 45e7638fc2 Merge branch 'twimaster_rework' of https://github.com/Riksu9000/InfiniTime into Riksu9000-twimaster_rework
# Conflicts:
#	src/systemtask/SystemTask.cpp
2021-08-28 15:08:50 +02:00
Riku Isokoski 85c99797da Merge branch 'develop' into new_touch_handler 2021-08-18 22:07:02 +03:00
Riku Isokoski 044036e884 Merge branch 'develop' into timer_battery_reading 2021-08-14 23:02:23 +03:00
Riku Isokoski 23bde0d18e Make battery reading periodic. Add events. Disable pullup 2021-08-14 21:18:11 +03:00
Riku Isokoski 6776776421 Make diff smaller and revert some changes in DisplayApp 2021-08-10 22:18:21 +03:00
Riku Isokoski 8a694adb09 Rework TouchHandler into not a task 2021-08-10 22:03:34 +03:00
Riku Isokoski 2194a339cf Only enable the bus when needed 2021-08-10 11:26:43 +03:00
Riku Isokoski f9319dfb91 Remove leftover 2021-08-01 21:19:33 +03:00
Riku Isokoski e6dcb3009f Improvements 2021-08-01 13:05:48 +03:00
Riku Isokoski 5bdef365f2 Merge branch 'develop' into HEAD 2021-08-01 11:47:26 +03:00
Riku Isokoski a1ba187c47 Merge branch 'develop' into new_touch_handler 2021-07-25 20:01:09 +03:00
Riku Isokoski 34949a47c5
Dim screen before sleep (#464)
* Implement dimming
2021-07-24 20:29:10 +02:00
Riku Isokoski d666c5004f
Merge branch 'develop' into new_touch_handler 2021-07-23 22:52:08 +03:00
Riku Isokoski 0a0f28fff4
Make firmware updating more foolproof (#469)
* 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-22 21:57:45 +02:00
Riku Isokoski 3e42297bd8 Update 2021-07-18 12:32:46 +03:00
Riku Isokoski 93ccbf38e8 Fix touch wakeup and code cleanup 2021-07-16 01:49:20 +03:00
Riku Isokoski 2a3e126390 Fix most issues 2021-07-16 00:07:55 +03:00
Riku Isokoski fe64176e7b New touch handler, with issues 2021-07-15 14:11:27 +03:00
Kozova1 57b3397078
Multiple wakeup sources (#290)
* 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-14 20:51:51 +02:00
Jean-François Milants e21f6a7f41 Notify battery level every 10 minutes when connected to a BLE host.
Refactor battery percent : only use uint8_t to store the battery % remaining.
2021-07-11 16:55:06 +02:00
joaquim.org 084123b752
Using littlefs (#438)
* add submodule littlefs
* base fs
* Save settings using littlefs
* Small fixes and suggestions from PR
* More small fixes from PR suggestions
* Code clean up
* Change SpiNorFlash functions to be private in FS
2021-07-11 15:06:06 +02:00
JF002 c6dca25b9f
Add support for BMA425 acceleration sensor. (#440)
* Add support for BMA425 acceleration sensor.
2021-06-19 20:27:59 +02:00
Jean-François Milants 6d524ebea2 Move most of the code from the constructor of the objects statically initialized in main() into Start()/Init() functions to avoid Static Initialization Order Fiasco (https://en.cppreference.com/w/cpp/language/siof). See https://github.com/JF002/InfiniTime/pull/415#issuecomment-859004238. 2021-06-12 10:58:28 +02:00
Jean-François Milants b1925ff286 Minor improvements: use std::make_unique when creating unique_ptr, check the code is running from an IRQ before calling xQueueSendFromISR or xQueueSend) 2021-06-10 21:20:27 +02:00
Jean-François Milants 7f9cc51b05 Initialize SystemTask, DisplayApp and HeartRateTask as global static variable instead of variables on the heap. We don't need them on the heap as we know their size at build time, it'll reduce memory fragmentation and it'll make memory analysis easier. 2021-06-06 15:56:03 +02:00
Florian 13e3463276
Timer App (#355)
* built timer app

* Style improvements

* making sure buttons stay hidden when the app is reopened and reappear after the timer runs out

* more sensible calculations of time deltas. eliminated that mysterious scaling factor

* changing the timer icon
2021-05-20 20:43:54 +02:00
Jean-François Milants 9ab298c09e Fix wrong initialization of 'pinPowerPresent' pin that would prevent the touchpanel from working correctly when the device boots while connected to the charger. 2021-05-17 09:52:31 +02:00
David Ventura 9342d62a44
Emit event on power-present toggle (#320)
* Emit event on power-present toggle

* clang-format on changes

* also update battery status on any event

* update comments; remove double battery update

* Fix formatting

* Vibrate shortly on charging event

* debounce charge event
2021-05-16 21:13:22 +02:00
Florian Kraupa 56af4a0b83 cleaned up the code and reduced the size of the diff by removing things like additional whitespaces 2021-05-16 00:42:31 +02:00
Florian Kraupa 5da65494b3 only activate the timeout on call notification previews after they have been interacted with 2021-05-16 00:42:31 +02:00
Florian Kraupa d13dd6dee3 implemented continuous vibration pattern for incoming calls 2021-05-16 00:42:31 +02:00
petter 6e1726d1d0 short vibration when enabling it 2021-05-02 11:48:05 +02:00
Avamander 40d45d923b Reformatted all the files according to clang-format style 2021-04-24 11:39:53 +03:00
Jean-François Milants 63635381b0 Disable the reading of the motion values in sleep mode when the wake up mode is not 'wrist rotation'. 2021-04-16 20:05:46 +02:00
Joaquim 3c413bdd52 In order to stabilize the battery reading,
I modified the process to make 5 consecutive readings,
as the process is asynchronous,
there is no interference in the main process.
2021-04-16 16:15:38 +01:00
Jean-François Milants 15b3b8e282 Merge branch 'develop' into motion-sensor
# Conflicts:
#	src/CMakeLists.txt
#	src/displayapp/Apps.h
#	src/displayapp/DisplayApp.cpp
#	src/displayapp/DisplayApp.h
#	src/displayapp/lv_pinetime_theme.c
#	src/displayapp/screens/ApplicationList.cpp
#	src/drivers/TwiMaster.cpp
#	src/systemtask/SystemTask.h
2021-04-09 21:16:21 +02:00
Jean-François Milants 9ac4be8b75 TwiMaster is now based on the NRFX TWI driver, as it handles more edge cases and workarounds for errors on the bus.
Reset the TWI bus after the soft-reset of the motion sensor to workaround issues on the TWI bus.
2021-04-08 20:07:24 +02:00
Joaquim 365e68e6cc Fix wake up lock in twi
optimize battery code
2021-04-05 15:22:10 +01:00
Joaquim José Almeida Pereira 96961709f3 array in SettingWakeUp wrong size 2021-04-05 11:01:44 +01:00
Jean-François Milants 1d7576de64 Reset the step count every day at midnight. 2021-04-04 15:56:40 +02:00
Jean-François Milants 52a90288fd Handle return code from BMA driver, and set a flag is the initialization fails. This allows to boot InfiniTime even if the device cannot initialize. 2021-04-04 15:56:11 +02:00
Jean-François Milants c7cc47ae30 Code cleaning in BMA421 driver. Do the axis inversion in the driver and not in the application.
NOTE: Axis remapping from the SDK do not apply to the "raw" X/Y/Z values returned to the sensor. According to the doc, the remapping is only applied to features, but I cannot check if it has any effect on step counting (I'm not sure I use it correctly, doc is not complete enough about this feature).
2021-04-04 15:56:11 +02:00
Jean-François Milants 68bdaee1cc First integration of the motion sensor (bma 421) : step counting + wake on wrist rotation + app to see the value of the 3 axis in "real time". 2021-04-04 15:56:04 +02:00
Joaquim bb7531e208 double tap wakeup error fix
battery nonblocking read
2021-04-04 13:51:22 +01:00
Joaquim 1d3742e14f Big UI and navigation Rewrite
new navigation
add some color to the apps
redesign menus
new settings menu
new quick settings
code clean up
size reduction by converting navigation images to font
and more...
2021-04-04 03:08:51 +01:00