summaryrefslogtreecommitdiff
path: root/src/systemtask
AgeCommit message (Collapse)AuthorFilesLines
2022-06-06Switch to freertos timers (#1095)Michele Bini1-3/+0
* Use FreeRTOS timer for AlarmController * Use FreeRTOS timer for MotorController * Remove app_timer component from compilation as we now solely use FreeROTS timer * Simplify variable and text names for AlarmController and MotorController timers * Call ScheduleAlarm directly from StopAlerting, for recurring timers Co-authored-by: Riku Isokoski <riksu9000@gmail.com> Co-authored-by: NeroBurner <pyro4hell@gmail.com>
2022-06-05System: Refactor pin and interrupt setupChristoph Honal1-19/+9
This should ensure better readability of the pin setup procedure, as well as allow the configuration of the hardware button enable pin and the accelerometer interrupt pin via the pin mapping header.
2022-06-05SystemTask: Use "&&" instead of "and" for operatorsChristoph Honal1-5/+6
As per the coding style, only primary spelling should be used for operators.
2022-06-05Fix various typosluz paz1-1/+1
Found via `codespell -q 3 -S ./src/libs -L ans,doubleclick,trough`
2022-06-05Apply clang-format to all C++ filesFinlay Davidson2-39/+40
2022-05-08Fix and test workflowRiku Isokoski1-2/+2
2022-05-08Systemtask : replace enum SystemTaskState by an enum class.Jean-François Milants2-25/+25
2022-05-08Simplify systemtask statesRiku Isokoski2-37/+34
2022-04-25Replace app_timer with FreeRTOS timersRiku Isokoski1-3/+2
2022-04-13Let TouchHandler return TouchEvents instead of driver specific enumReinhold Gschweicher1-3/+4
Let the TouchHandler::GestureGet() function return a TouchEvent instead of the touchpanel-driver specific enum. This helps to move the driver specific helper function `ConvertGesture` from `DisplayApp` into `TouchHandler`.
2022-03-21In current configuration, the timer task (the one from FreeRTOS) has the ↵Jean-François Milants1-1/+1
lowest priority (0). Both display and system tasks are also set on priority 0. In cases where any other task takes too much time to execute (it can happen in Display Task, see https://github.com/InfiniTimeOrg/InfiniTime/issues/825), the timer task does not have the opportunity to run fast enough to detect and debounce presses on the button. This commit sets the following priorities: - [0] : Display Task - [1] : Timer and System tasks - [2] : BLE Host - [3] : BLE LL This way, we ensure that button presses will always be detected, even if the rendering of the display takes a huge amount of time.
2022-03-08SystemMonitor: implement FreeRtosMonitor only if trace facility is setReinhold Gschweicher3-39/+33
Split SystemMonitor into h and cpp file and move the logging code of the `Process` function into the cpp file. Depending of the `configUSE_TRACE_FACILITY` define from `src/FreeRTOSConfig.h` create either a "FreeRtosMonitor" or a "DummyMonitor". Make the `Process()` function non-const, as the FreeRtosMonitor changes the member variable `lastTick`. In `SystemTask.h` we then only need to use `SystemMonitor`, without knowledge of the `configUSE_TRACE_FACILITY` define.
2022-02-20Merge branch 'airplane-mode' of https://github.com/evergreen22/InfiniTime ↵Jean-François Milants2-4/+8
into evergreen22-airplane-mode Apply a few changes that were requested in the PR during the review. # Conflicts: # src/CMakeLists.txt # src/displayapp/Apps.h # src/displayapp/DisplayApp.cpp # src/displayapp/Messages.h # src/displayapp/screens/settings/Settings.cpp
2022-02-20Merge branch 'airplane-mode' of https://github.com/evergreen22/InfiniTime ↵Jean-François Milants2-2/+5
into evergreen22-airplane-mode # Conflicts: # src/CMakeLists.txt # src/displayapp/Apps.h # src/displayapp/DisplayApp.cpp # src/displayapp/Messages.h # src/displayapp/screens/settings/Settings.cpp
2022-02-19SystemTask: forward declare BatteryController to fix of cyclic dependencyReinhold Gschweicher2-1/+2
SystemTask.h included BatteryController.h, and BatteryController.h included SystemTask.h. If unlucky the class SystemTask isn't created yet when BatteryController wants to use it. Fix that cyclic dependency by forward declaring the BatteryController class and including it in the SystemTask.cpp file, where it is needed.
2022-02-19SystemTask: remove unused ble includesReinhold Gschweicher1-9/+0
Remove unused includes. The firmware still compiles fine without the includes.
2022-02-12SystemTask: fix static cast missing brackets syntaxReinhold Gschweicher1-2/+2
The static_cast syntax requires brackets around the input variable. The implementation worked because the used input are defines, which add the missing brackets like the following: ```cpp #define GPIO_PIN_CNF_SENSE_Low (3UL) ```
2022-01-26Merge pull request #949 from Riksu9000/fix_alarmJF1-0/+3
Fix alarm on time change
2022-01-26Merge pull request #903 from Riksu9000/improved_notif_timeoutJF1-0/+1
Improved notification timeout
2022-01-22Fix alarm on time changeRiku Isokoski1-0/+3
2022-01-16SystemTask: add missing queue.h include for QueueHandle_tReinhold Gschweicher1-0/+1
2022-01-04Merge branch 'ShakeWake' of https://github.com/geekbozu/InfiniTime into ↵Jean-François Milants1-7/+13
geekbozu-ShakeWake # Conflicts: # src/CMakeLists.txt # src/displayapp/Apps.h # src/displayapp/DisplayApp.cpp # src/displayapp/screens/settings/Settings.cpp
2022-01-04Adds enum class for chimes optionSteveAmor1-2/+2
2022-01-04Add start of settings app for senstivity.Tim Keller1-1/+2
really just debugging. I want to make it more configurable then high med low. Position of setting needs a new location...dynamicly adding it currently at the end. Which honestly im fine with.
2022-01-04CleanupTim Keller1-1/+1
2022-01-04Added Shake to wakeTim Keller1-7/+12
2022-01-02resolves conflictsSteveAmor3-43/+138
2022-01-01Improved notification timeoutRiku Isokoski1-0/+1
2021-12-23Add airplane mode featureJames A. Jerkins2-2/+5
Implements 'Airplane mode' feature to disable and enable bluetooth/ble Adds airplaneMode as a non-persisted setting Adds a setting menu for switching airplane mode on and off Displays an airplane symbol on the Digital watch face and the PineTimeStyle watch face when airplane mode is enabled Always enables bluetooth/ble on boot (disable airplane mode) Alphabetizes the settings menu options Style cleanups Closes #632
2021-12-10List Dir works?Tim Keller2-0/+15
2021-12-09Fixed unpopped diagnosticAvamander1-1/+1
2021-12-09Improved format specifiers, bracing, removed C-style casts, whitespace fixes ↵Avamander1-17/+28
and removed Tiles shadowing
2021-12-09Break not return thanks @FintasticManTim Keller1-1/+1
2021-12-09Adjust systemtask to respect doNotGoToSleep.Tim Keller1-1/+4
2021-12-09Adjust BLE/LL stacks, style, comments, refactoringJames A. Jerkins1-1/+2
Increase BLE task stack +200 and decrease LL task stack -200 more braces!
2021-12-09Persist bond between rebootsJames A. Jerkins1-1/+2
Save bond information in the FS after a disconnect or encryption change if the bond is not already stored. The bond is restored on boot enabling automatic reconnection to a previously bonded central. Two consecutive watch reboots with the central out of range (or BLE off) will remove the stored bond from the watch.
2021-12-09Connect and bond with a passkeyJames A. Jerkins2-0/+8
This commit adds the following: Passkey pairing - passkey is displayed on watch Swipe down to clear passkey screen Connection encryption Connection bonding Automatic reconnects to a bonded peripheral Trusted device on Android Note that persisting the bond between reboots is NOT included in this commit. Therefore, rebooting the watch will cause reconnect failures. You must delete the bond from the phone to reconnect/pair.
2021-11-15Update includes to to be relative to src directoryReinhold Gschweicher2-3/+3
Don't use relative imports like `../foo.h` as those depend on the relative position of both files. Rather than that use imports relative to the `src` directory, which explicitly is part of the include directories.
2021-11-07Fix previous commit, call touchPanel.Init() even if we disabled the touch ↵Jean-François Milants1-0/+1
controller boot error.
2021-11-07Disable the warning that is displayed when the initialization of the touch ↵Jean-François Milants1-0/+5
controller fails, as some users reported that it was displayed when a valid touch controller was installed.
2021-11-07format changesSteveAmor1-2/+2
2021-11-07Chimes optionSteveAmor2-0/+22
2021-10-25Make it so special actions can be input while sleeping, like in #480Riku Isokoski2-4/+10
2021-10-25Only wake up on press. Fixes issue with longer press and sleepRiku Isokoski1-5/+4
2021-10-25Return button action instead of pushing messagesRiku Isokoski3-31/+47
2021-10-25Use enum classes, remove old commentRiku Isokoski1-2/+2
2021-10-25Newer buttonhandlerRiku Isokoski3-24/+53
2021-10-17Add MotionService : expose step count and RAW X/Y/Z values to the host.Jean-François Milants1-1/+2
2021-10-14Make new notifications refresh idle timerFederico Igne1-5/+8
2021-10-10Merge branch 'update_touch_driver' of git://github.com/Riksu9000/InfiniTime ↵Jean-François Milants1-2/+7
into Riksu9000-update_touch_driver # Conflicts: # src/displayapp/Apps.h