Commit Graph

200 Commits

Author SHA1 Message Date
Derek Jamison
e682b6b19e JavaScript: Add I2C support (#259)
* JavaScript: Add I2C support

* Format

* Check input bytes, allow arraybuf write input

* Add comment

* Return arraybuf, remove unnecessary malloc and memset

* More meaningful var names for code readability, fix some bugs

* Remove unnecessary state

* Fix build

* Update changelog

* Add typedefs

* toString() updates in example script

---------

Co-authored-by: Willy-JL <49810075+Willy-JL@users.noreply.github.com>
2024-10-20 07:24:44 +02:00
Willy-JL
bb6c015235 JS: Second batch of OFW PR changes 2024-10-19 01:17:22 +01:00
Willy-JL
4a0dfa8de9 JS: First batch of OFW PR review changes 2024-10-18 04:35:27 +01:00
Willy-JL
ba74e953c4 JS: C define to move JS runner to flash (still external for now) 2024-10-18 02:56:06 +01:00
Willy-JL
799ff282f4 JS: Sync small differences from OFW PR 2024-10-17 23:43:21 +01:00
Willy-JL
75d4cf36f1 JS: Custom scope param in load() typedef 2024-10-17 21:33:09 +01:00
Willy-JL
685e06b4d6 JS: Improve REPL script 2024-10-17 21:32:31 +01:00
Willy-JL
908461a3c2 JS: Add numpad keys to badusb typedefs 2024-10-17 17:11:27 +01:00
Willy-JL
73b53ee3f9 JS: Add way to check if view has prop 2024-10-17 17:00:08 +01:00
Willy-JL
5d2bb9af5e JS: Backport file picker as new module 2024-10-16 19:35:42 +01:00
Willy-JL
d9d06b9a2b JS: Backport virtualMount storage API 2024-10-16 18:16:27 +01:00
Willy-JL
75ebfdb4fe JS: Fix toString() with negative numbers 2024-10-16 15:11:56 +01:00
Willy-JL
7d21bdfb7d JS: Update interactive.js REPL example 2024-10-16 14:39:22 +01:00
Willy-JL
72d47cfacd JS: Expose currentView in gui.viewDispatcher 2024-10-16 14:38:53 +01:00
Willy-JL
51d0fdc5fa JS: Byte/Text Input fixes, gui example improvements 2024-10-16 14:38:00 +01:00
Willy-JL
3b86248288 JS: Fix load.js example path 2024-10-16 14:16:19 +01:00
Willy-JL
6b4e94ec58 JS: More fixes 2024-10-16 11:53:07 +01:00
Willy-JL
f5e4b4bef4 JS: Types for chr(), .indexOf(), .slice() 2024-10-16 11:52:44 +01:00
Willy-JL
270e97ff66 JS: Update storage example 2024-10-16 11:32:01 +01:00
Willy-JL
f96c538efe JS: Port byte input example (WIP, has some bugs in C code, JS is fine) 2024-10-16 05:26:19 +01:00
Willy-JL
f8596638ae JS: Docs and types for additions on top of OFW modules 2024-10-16 05:25:01 +01:00
Willy-JL
c8b3bf1869 JS: camelCase changes 2024-10-16 01:55:00 +01:00
Willy-JL
a85819f37e JS: Merge fixes 2024-10-16 00:57:09 +01:00
Willy-JL
2f6faa1b7b Merge remote-tracking branch 'ul/dev' into mntm-dev 2024-10-16 00:56:19 +01:00
Willy-JL
97d58c500f Merge remote-tracking branch 'ofw/dev' into mntm-dev 2024-10-15 23:49:41 +01:00
Willy-JL
88dfe97a89 Merge remote-tracking branch 'ofw/dev' into mntm-dev 2024-10-15 23:43:33 +01:00
MX
a1993a528d badusb js paritally fix 2024-10-16 01:11:34 +03:00
MX
ac3c6dc4f9 move examples 2024-10-16 01:07:03 +03:00
MX
7de26fb99b Merge remote-tracking branch 'OFW/dev' into dev 2024-10-16 01:06:19 +03:00
MX
004d8382d3 implement byte input, add missing args in text input
TODO: add missing filebrowser dialog
2024-10-16 00:57:44 +03:00
porta
a6cf08523c Small JS fixes (#3950) 2024-10-15 18:03:15 +01:00
MX
8233534d6a merge p3 2024-10-15 03:27:04 +03:00
MX
edc58c5a0e merge p2 2024-10-15 03:16:21 +03:00
porta
8a95cb8d6b [FL-3893] JS modules (#3841)
* feat: backport js_gpio from unleashed
* feat: backport js_keyboard, TextInputModel::minimum_length from unleashed
* fix: api version inconsistency
* style: js_gpio
* build: fix submodule ._ .
* refactor: js_gpio
* docs: type declarations for gpio
* feat: gpio interrupts
* fix: js_gpio freeing, resetting and minor stylistic changes
* style: js_gpio
* style: mlib array, fixme's
* feat: js_gpio adc
* feat: js_event_loop
* docs: js_event_loop
* feat: js_event_loop subscription cancellation
* feat: js_event_loop + js_gpio integration
* fix: js_event_loop memory leak
* feat: stop event loop on back button
* test: js: basic, math, event_loop
* feat: js_event_loop queue
* feat: js linkage to previously loaded plugins
* build: fix ci errors
* feat: js module ordered teardown
* feat: js_gui_defer_free
* feat: basic hourglass view
* style: JS ASS (Argument Schema for Scripts)
* fix: js_event_loop mem leaks and lifetime problems
* fix: crashing test and pvs false positives
* feat: mjs custom obj destructors, gui submenu view
* refactor: yank js_gui_defer_free (yuck)
* refactor: maybe_unsubscribe
* empty_screen, docs, typing fix-ups
* docs: navigation event & demo
* feat: submenu setHeader
* feat: text_input
* feat: text_box
* docs: text_box availability
* ci: silence irrelevant pvs low priority warning
* style: use furistring
* style: _get_at -> _safe_get
* fix: built-in module name assignment
* feat: js_dialog; refactor, optimize: js_gui
* docs: js_gui
* ci: silence pvs warning: Memory allocation is infallible
* style: fix storage spelling
* feat: foreign pointer signature checks
* feat: js_storage
* docs: js_storage
* fix: my unit test was breaking other tests ;_;
* ci: fix ci?
* Make doxygen happy
* docs: flipper, math, notification, global
* style: review suggestions
* style: review fixups
* fix: badusb demo script
* docs: badusb
* ci: add nofl
* ci: make linter happy
* Bump api version

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-10-14 19:42:11 +01:00
Willy-JL
574304f715 Final merge fixes 2024-08-14 02:01:04 +02:00
Willy-JL
5f98c5d986 Merge remote-tracking branch 'ofw/dev' into yeet-lfs 2024-08-13 02:27:09 +02:00
Willy-JL
98e2a221d5 Format images 2024-08-12 18:34:41 +02:00
MX
821f5bab18 Merge remote-tracking branch 'OFW/dev' into dev 2024-08-10 14:47:38 +03:00
MX
6c0dadad3f after merge fixes 2024-08-10 14:42:11 +03:00
MX
bf6c6c231f [FL-3841] FuriEventLoop Pt.2 (#3703)
* Abstract primitive type from main logic in FuriEventLoop
* Remove message_queue_i.h
* Add stream buffer support for event loop
* Add semaphore support for event loop
* Add temporary unit test workaround
* Make the linter happy
* Add mutex support for event loop
* Implement event subscription and unsubscription while the event loop is running
* Implement edge events
* Fix leftover logical errors
* Add event loop timer example application
* Implement flag-based edge trigger and one-shot mode
* Add event loop mutex example application
* Only notify the event loop if stream buffer is at or above its trigger level
* Reformat comments
* Add event loop stream buffer example application
* Add event loop multiple elements example application
* Improve event loop flag names
* Remove redundant signal handler as it is already handled by the event loop
* Refactor Power service, improve ViewHolder
* Use ViewHolder instead of ViewDispatcher in About app
* Enable ViewDispatcher queue on construction, deprecate view_dispatcher_enable_queue()
* Remove all invocations of view_dispatcher_enable_queue()
* Remove app-scened-template
* Remove missing library from target.json
* Port Accessor app to ViewHolder
* Make the linter happy
* Add example_view_holder application, update ViewHolder docs
* Add example_view_dispatcher application, update ViewDispatcher docs
* Replace FuriSemaphore with FuriApiLock, remove workaround delay
* Fix logical error
* Fix another logical error
* Use the sources directive to speed up compilation
* Use constant define macro
* Improve FuriEventLoop documentation
* Improve FuriEventLoop documentation once more
* Bump API Version
* Gui: remove redundant checks from ViewDispatcher
* Gui: remove dead ifs from ViewDispatcher

Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-08-10 14:32:27 +03:00
Georgii Surkov
f4122a924a [FL-3841] FuriEventLoop Pt.2 (#3703)
* Abstract primitive type from main logic in FuriEventLoop
* Remove message_queue_i.h
* Add stream buffer support for event loop
* Add semaphore support for event loop
* Add temporary unit test workaround
* Make the linter happy
* Add mutex support for event loop
* Implement event subscription and unsubscription while the event loop is running
* Implement edge events
* Fix leftover logical errors
* Add event loop timer example application
* Implement flag-based edge trigger and one-shot mode
* Add event loop mutex example application
* Only notify the event loop if stream buffer is at or above its trigger level
* Reformat comments
* Add event loop stream buffer example application
* Add event loop multiple elements example application
* Improve event loop flag names
* Remove redundant signal handler as it is already handled by the event loop
* Refactor Power service, improve ViewHolder
* Use ViewHolder instead of ViewDispatcher in About app
* Enable ViewDispatcher queue on construction, deprecate view_dispatcher_enable_queue()
* Remove all invocations of view_dispatcher_enable_queue()
* Remove app-scened-template
* Remove missing library from target.json
* Port Accessor app to ViewHolder
* Make the linter happy
* Add example_view_holder application, update ViewHolder docs
* Add example_view_dispatcher application, update ViewDispatcher docs
* Replace FuriSemaphore with FuriApiLock, remove workaround delay
* Fix logical error
* Fix another logical error
* Use the sources directive to speed up compilation
* Use constant define macro
* Improve FuriEventLoop documentation
* Improve FuriEventLoop documentation once more
* Bump API Version
* Gui: remove redundant checks from ViewDispatcher
* Gui: remove dead ifs from ViewDispatcher

Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-08-07 12:49:41 +09:00
Sean Skyhawk
41fcead710 Images linting: ensure that all images conform specification (#3802)
* Change all icons to be white background
* assets: re-processed all *.png images to 1-bit
* assets: also stripped profile data from .pngs
* assets: also stripped datetime from metadata (`-define png:exclude-chunks=date,time`)
* scripts: added image linter and formatter; fbt: added `lint_img` && `format_img` targets; github: integrated image lint step into CI
* scripts: imglint: fixed deprecation warning
* images: applied `format_img`
* fbt: added `lint_all` and `format_all` targets; docs: updated for new targets

Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-08-07 11:57:32 +09:00
MX
57f3bce8e3 merge manually formatted stuff too 2024-07-16 01:01:17 +03:00
Willy-JL
2eaf1ffc95 New formatting 2024-07-15 22:32:17 +01:00
Willy-JL
02f7207d28 Merge remote-tracking branch 'ofw/dev' into mntm-dev 2024-07-15 22:18:35 +01:00
MX
726cb770d0 formatting 2024-07-15 20:02:45 +03:00
hedger
ffa3996a5e [FL-3867] Code formatting update (#3765)
* clang-format: AllowShortEnumsOnASingleLine: false
* clang-format: InsertNewlineAtEOF: true
* clang-format: Standard:        c++20
* clang-format: AlignConsecutiveBitFields
* clang-format: AlignConsecutiveMacros
* clang-format: RemoveParentheses: ReturnStatement
* clang-format: RemoveSemicolon: true
* Restored RemoveParentheses: Leave, retained general changes for it
* formatting: fixed logging TAGs
* Formatting update for dev

Co-authored-by: あく <alleteam@gmail.com>
2024-07-15 13:38:49 +09:00
MX
01a1767f61 upd subghz js module
by Willy-JL
2024-07-15 04:45:45 +03:00
Willy-JL
22fd786abf JS: Fix repeats for multi-packet protocols 2024-07-09 16:23:20 +01:00
MX
ed767b8286 oops 2024-07-08 08:01:12 +03:00