Commit Graph

28 Commits

Author SHA1 Message Date
gornekich
d3b58f732f
[FL-1783] Power service refactoring (#718)
* settings power: introduce power settings app
* power: move power API to separate file
* settings power: implement reboot scene
* settings power: add power off scene
* assets: add crying dolphin, fix Subghz assets names
* settings power: fix power off scene GUI
* settings power: add battery info scene
* power: add cli to application on start hook
* power: remove power from main menu
* power: move to power service folder
* power service: rework power off logic
* power: add pubsub events
* bt: subscribe to battery level change, update characteristic
* application: change order of Settings applications
* gui: add bubble element
* power: gui improvements
* application: rename Notification -> LCD and notifications
* Applications: menu order according to documentation and add missing power cli init
* settings power: add disconnect USB scene
* power cli: notify user to disconnect USB after poweroff
* Power: update poweroff message in cli

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-09-24 19:28:02 +03:00
gornekich
0e1922db4d
BT: stop advertising in bt test cli commands (#712)
* bt: stop advertising in bt test cli commands
* furi-hal-bt: add switch context in furi_hal_bt_lock_flash
* Lib: update STM32CubeWB to latest version. Scripts: update supported copro binaries version
* Scripts: proper version extraction from Cube manifest
* bt: add debug application and comment it
* bt: fix stop advertising command
* bt: debug on f7 target
* furi-hal-console: add console tx + new line
* bt: fix debug trace function

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-09-21 12:48:08 +03:00
tonyfreeman
69f54973cc
Nfc: fix incorrect type castings. Global: fix printf usage, types casting, overall cleanup. Drivers: incorrect array index in cc1101 driver. (#713)
* fix 'function cannot return qualified void/bool type'
* Fix variable 'consumed' is used uninitialized
* Fix format string is not a string literal (potentially insecure)
* Fix conflicting types for 'menu_item_get_type'
* Fix implicit conversion from enumeration type 'NfcDeviceType' to different enumeration type 'rfalNfcDevType'
* Fix hal_gpio_init incorrect arguments order
* Fix nfc->dev.dev_name condition will always evaluate to 'true'
* Fix explicitly assigning value of variable to itself
* Fix furi_hal_bt_wait_startup counter overflow
* Fix implicit conversion from 'StorageStatus' to 'SDError'
* Remove #include <sys/param.h>
* Add FIXME
* Fix syntax
* Fixup for 'furi_hal_bt_wait_startup counter overflow'
* nfc: fix different nfc device types
* Drivers: fix incorrect offset in cc1101_read_fifo
* Remove obsolete comment

Co-authored-by: Tony Freeman <tonyfreeman@users.noreply.github.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2021-09-21 12:34:16 +03:00
gornekich
f05153ed5c
[FL-1816] Fix ble radio stack is alive check (#707)
* bt: fix bt_is_alive return, add bt_is_active
* bt: fix bt_is_alive return
* Cli: show heap usage in ps.
* FuriHal: strict sequence for flash operations
* Scripts: add stress test
* Core: proper heap calculation.

Co-authored-by: あく <alleteam@gmail.com>
2021-09-16 19:12:07 +03:00
gornekich
4768177cf5
[FL-1796] Disable bluetooth (#703)
* bt: add authentication for all characteristics
* bt: app_ble cleanup
* bt: add start and stop advertising API
* bt: rework application with start and stop advertising API
* bt: support f7 target
* bt: f7 target remove unused files
* bt: stop advertising in bt debug application
* bt: fix bt status bar update
* bt: change bluetooth On Off order
2021-09-15 19:58:32 +03:00
あく
72ca76097a
[FL-1811] FuriHal: move core2 startup to hal init stage, prevent working with flash controller till core2 startup finish. #704 2021-09-15 17:40:09 +03:00
gornekich
95d9140d24
[FL-1795] BLE GAP refactoring (#694)
* ble: remove heart rate profile
* ble-glue: delete dead code
* ble-glue: dis refactoring
* ble-glue: add battery service
* broken ble_common refactoring
* ble-glue: advertise 128 bit service uid
* ble-glue: remove dead code
* ble: advertise service 16 bit uid depending on flipper color
* ble-glue: remove debug
* ble: intriduce serial service
* ble: serial over ble
* bt: serial echo server
* bt: serial service process indicate acknowledge
* bt: serial service event handler update
* bt: refactore battery service
* bt: add battery level apdate API
* power: update battery level on change
* bt: refactore device information service
* app_ble: pairing configuration
* bt: display pin code
* bt: refactor battery service
* bt: refactor device info service
* bt: change advertise timer to freertos one
* bt: separate app_ble to hci and gap
* bt: increase max ble packet size
* gap: refactoring
* bt: refactor serial service
* bt: support f7 target
* bt: not blocking pin code show request

Co-authored-by: Anna Prosvetova <anna@prosvetova.me>
Co-authored-by: あく <alleteam@gmail.com>
2021-09-13 14:25:37 +03:00
gornekich
9bce160ca6
[FL-1722] BLE custom serial service (#685)
* ble: remove heart rate profile
* ble-glue: delete dead code
* ble-glue: dis refactoring
* ble-glue: add battery service
* broken ble_common refactoring
* ble-glue: advertise 128 bit service uid
* ble-glue: remove dead code
* ble: advertise service 16 bit uid depending on flipper color
* ble-glue: remove debug
* ble: intriduce serial service
* ble: serial over ble
* bt: serial echo server
* bt: serial service process indicate acknowledge
* bt: serial service event handler update
* bt: refactore battery service
* bt: add battery level apdate API
* power: update battery level on change
* bt: refactore device information service

Co-authored-by: あく <alleteam@gmail.com>
2021-09-10 00:11:32 +03:00
its your bedtime
ae08c88bd6
[FL-1472] Infrared: long names fix (#679)
* Infrared app: fix long button names
* Ble: fix missing icon on start without config.
* Gui: slow but nice string fitting.
* Gui: fit header string in button menu

Co-authored-by: あく <alleteam@gmail.com>
2021-09-02 12:02:34 +03:00
gornekich
420c03bb58
[FL-1720] BLE GUI refactoring (#678)
* dialog_ex: add clean method, fix documentation
* application: add bt debug and settings application
* bt: add debug application
* bt: add settings application
* bt: rework bt service
* bt debug: fix carrier debug app
* assets: add debug animation to main menu
* bt debug: fix bt packet test
* bt service: rework bt service
* bt: cleanup
* Assets: fix spelling
* Ble: wait for core 2 startup complete before initializing radio stack.
* Accessor: remove dead code, switch port PA6 to PA4, because interrupt line 6 is used by down button.
* FuriHal: assert interrupt line on add_int_callback.
* Bt: update icon on core2 startup complete.

Co-authored-by: あく <alleteam@gmail.com>
2021-09-02 02:22:40 +03:00
あく
0a97d6913c
Rename api-hal to furi-hal (#629) 2021-08-08 21:03:25 +03:00
あく
7907cb232b
Applications: unified entry point naming scheme, drop dead code, cleanup. (#628) 2021-08-07 19:54:42 +03:00
あく
421a0f6b97
[FL-1546, FL-1534, FL-1550] Drop F5, Certification preparation, Global application start lock (#585)
* Firmware: drop F5 target
* Rename app-loader to loader
* Update code owners file
* Loader: global application start lock API, minor refactoring
* Archive: update loader usage
* Cli: Command flags, global application start lock
* Apps: update cli API usage
* Bootloader: minor refactoring
* Firmware: minor build refactoring
* SubGhz: GUI packet test
* SubGhz: drop packet transmission and unused presets
* Github: drop F5 from build
* Archive: favorites
* Archive: a little bit more of Favorites
2021-07-18 21:09:00 +03:00
あく
a7283280ef
GUI: Icons and IconsAnimation refactoring. Switch assets to new Icon Api (#566)
* GUI: Icons and IconsAnimation refactoring. Switch assets to new Icon API.
* Gui: icon and animation draw now do not accept null pointer
* Format Sources
* Fix no debug build
* Furi: stricter checks in memmgr
2021-07-07 11:57:49 +03:00
あく
607e873404
BLE: fix incorrect RSSI calculation. Firmware: don't mark system as tainted on test releases. (#567)
* BLE: correct RSSI calculation routine.
* Firmware: only guard boot on production releases.
* BLE: proper float formatting in cli
* BLE: faster RSSI refresh
2021-07-07 00:23:59 +03:00
gornekich
d040515f84
[FL-1363] BLE GUI tests (#505)
* bt: introduce bt CLI commands

* api-hal-bt: add get rssi

* bt: fix cli commands

* bt: fix typos

* bt: refacrote bt test names

* ble gui continue

* bt: rework carrier test gui

* bt: rework send packets test gui

* bt: rework receive packets test

* api-hal-bt: change rssi return

* bt: refactore bt gui

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Co-authored-by: SG <who.just.the.doctor@gmail.com>
2021-06-02 17:09:02 +03:00
gornekich
205932b24c
Add BLE CLI tests (#502)
* bt: introduce bt CLI commands
* api-hal-bt: add get rssi
* bt: fix cli commands
* bt: fix typos
* Bt: add missing newline in console message

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-05-29 01:57:11 +03:00
あく
6d648da003
[FL-835] Factory reset. Cli refactoring. (#466)
* ApiHal: add boot flags. Internal storage: add factory reset.
* Bootloader: correct doxygen comment format.
* Cli: change cli callback signature. Applications: update API usage. Add factory_reset cli command.
2021-05-18 16:57:39 +03:00
gornekich
0af6c9882e
[FL-580] Prepare BLE for certification (#376)
* api-hal-bt: separate bt init to core init and app start

* bt: add continuous TX and RX tests

* bt: finish rx test on Back button click

* api-hal-bt: check core 2 started, same f4 and f5 implementation

* bt: refactoring, move hopping test logic to main thread

Co-authored-by: あく <alleteam@gmail.com>
2021-03-11 12:31:07 +03:00
あく
1b2c31da6f
Power subsystem improvements and bug fixes (#353)
* BT: render icon statically.
* Move API HAL Power init call to api_hal_init.
* API HAL Power: replace stop2 mode with stop1 to ensure usb and lptim2 proper work.
2021-02-25 13:22:46 +03:00
あく
68a3f6b4b7
[FL-873] Add F5 target, lp5562 driver and api-hal-light (#347)
* Add F5 target, lp5562 driver and api-hal-light. Update api-usage, switch to F5 by default.
* API HAL: add i2c and hardware version api. Dolphin: show hardware version.
* OTP version generator and flashing utility.
* Assets script: fix code formatting
* Backport F5 changes to F4
* F4: disable insomnia, prevent damage to BLE RX path
* F5 HAL API Light: remove magic delay to fix magic BLE
* Dolphin: HW target validation on start
* invert RSSI indication in sub-1
* API HAL: rename board to body in version api
* Gpio tester: detach and release viewport on exit

Co-authored-by: aanper <mail@s3f.ru>
2021-02-18 15:49:32 +03:00
あく
b835d7a451
[FL-872] Furi, API-HAL, App-Loader cleanup and improvements (#334)
* Furi: replace obsolete furiac_exit with osThreadExit, drop obsolete apis and test. Rename systemd to flipper and move to separate file, cleanup. ApiHal: Rename timebase to os and move freertos hooks there, move insomnia api to power module.
* Furi: new thread helper
* Furi: cleanup thread documentation
* Flipper, AppLoader: update to use FuriThread. Update tasks signatures to match FuriThreadCallback signature.
* F4: rename API_HAL_TIMEBASE_DEBUG to API_HAL_OS_DEBUG
* Applications: rename FuriApplication to FlipperApplication, use FuriThreadCallback signature for apps.
* C++ app template sample, new exit method
2021-02-12 20:24:34 +03:00
あく
2d09b8e318
[FL-867] GUI: ViewPort arrangement API, better input and draw dispatching (#333)
* Input: refactoring, platform agnostic key configuration, update usage across project. Minor queue usage fixes and tick timings.
* Gui: lighter and more efficient input and draw call dispatching, ViewPort rearranging API. View: conditional model updates, API usage update.
* BT: smaller update delay
* GUI: ViewPort visibility check
2021-02-10 12:06:29 +03:00
あく
523f99f154
GUI: rename widget to ViewPort. Update GUI API usage. (#317) 2021-01-29 16:52:16 +03:00
あく
584c0962d8
[FL-781] FURI, CLI, stdlib: stdout hooks, integration between subsystems, uniform printf usage (#311)
* FURI stdglue: stdout hooks, local and global, ISR safe printf. Uniform newlines for terminal/debug output. Power: prevent sleep while core 2 has not started.
* Furi record, stdglue: check mutex allocation
* remove unused test
* Furi stdglue: buferized output, dynamically allocated state. Furi record: dynamically allocated state. Input dump: proper line ending. Hal VCP: dynamically allocated state.
* Interrupt manager: explicitly init list.
* Makefile: cleanup rules, fix broken dfu upload. F4: add compiler stack protection options.
* BLE: call debug uart callback on transmission complete
* FreeRTOS: add configUSE_NEWLIB_REENTRANT
* API HAL Timebase: fix issue with idle thread stack corruption caused by systick interrupt. BT: cleanup debug info output. FreeRTOS: disable reentry for newlib.
* F4: update stack protection CFLAGS to match used compiller
* F4: disable compiller stack protection because of incompatibility with current compiller
* Makefile: return openocd logs to gdb
* BLE: fixed pin, moar power, ble trace info.
* Prevent sleep when connection is active
* Makefile: return serial port to upload rule, add workaround for mac os
* Furi: prevent usage of stack for cmsis functions.
* F4: add missing includes, add debugger breakpoints
* Applications: per app stack size.
* Furi: honor kernel state in stdglue
* FreeRTOS: remove unused hooks
* Cleanup and format sources

Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
2021-01-29 03:09:33 +03:00
DrZlo13
8f9b2513ff
[FL-140] Core api dynamic records (#296)
* SYSTEM: tickless mode with deep sleep.
* Move FreeRTOS ticks to lptim2
* API: move all sumbodules init routines to one place. Timebase: working lptim2 at tick source.
* API Timebase: lp-timer routines, timer access safe zones prediction and synchronization. FreeRTOS: adjust configuration for tickless mode.
* NFC: support for tickless mode.
* API Timebase: improve tick error handling in IRQ. Apploader: use insomnia mode to run applications.
* BLE: prevent sleep while core2 starting
* HAL: nap while in insomnia mode
* init records work
* try to implement record delete
* tests and flapp
* flapp subsystem
* new core functions to get app stat, simplify core code
* fix thread termination
* add strdup to core
* fix tests
* Refactoring: remove all unusued parts, update API usage, aggreagate API sources and headers, new record storage
* Refactoring: update furi record api usage, cleanup code
* Fix broken merge for freertos apps
* Core, Target: fix compilation warnings
* Drop firmware target local
* HAL Timebase, Power, Clock: semaphore guarded access to clock and power modes, better sleep mode.
* SD-Filesystem: wait for all deps to arrive before adding widget. Core, BLE: disable debug dump to serial.
* delete old app example-ipc
* delete old app fatfs list
* fix strobe app, add input header
* delete old display driver
* comment old app qr-code
* fix sd-card test, add forced widget update
* remove unused new core test
* increase heap to 128k
* comment and assert old core tests
* fix syntax

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-01-20 19:09:26 +03:00
あく
d3ff787864
GUI: abolish API injection into instances. (#265)
* GUI: abolish API injection into instances. Update usage by 3rd party apps.
* GUI: update documentation. Cleanup api usage. Adjust status bar item spacing.
2020-12-14 13:50:32 +03:00
あく
2f2f6b5f50
BLE: F3 integration (#260)
* BLE: working version
* BLE: cleanup
* BLE: update device description and DIS.
* BLE: explicitly take semaphore and configure CLK48, bt subsystem status, remove LPM.
* HAL: add missing api_hal_bt_is_alive symbol
* TODO about valuemutex
* duplicate f3-1 (f4) ioc from f3
* regenerate project
* use target dir for ble glue path
* update f4 from f3

Co-authored-by: coreglitch <mail@s3f.ru>
2020-12-10 17:25:20 +03:00