Jelajahi Sumber

backported ported and added kostily and velosipedy

i sinij izolenty dobavleno nemnogo :)

added small version of old nfc stack into two apps to make them work again?!?!?
some things are not good, and could be removed, redone in better way etc
send your suggestions and PRs
MX 1 tahun lalu
induk
melakukan
1e5c189821
100 mengubah file dengan 5 tambahan dan 9390 penghapusan
  1. 0 146
      .drone.yml
  2. 0 2
      .gitignore
  3. 0 6
      .gitmodules
  4. 0 7
      CHANGELOG.md
  5. 0 674
      LICENSE
  6. 0 0
      LICENSE.md
  7. 0 0
      README.md
  8. 0 287
      ReadMe.md
  9. 0 0
      TODO.md
  10. 5 8
      application.fam
  11. 0 1
      apps_broken_by_last_refactors/bt_serial_example/README.md
  12. 0 13
      apps_broken_by_last_refactors/bt_serial_example/application.fam
  13. 0 108
      apps_broken_by_last_refactors/bt_serial_example/fbs.c
  14. 0 21
      apps_broken_by_last_refactors/bt_serial_example/fbs.h
  15. TEMPAT SAMPAH
      apps_broken_by_last_refactors/bt_serial_example/uart_10px.png
  16. 0 674
      apps_broken_by_last_refactors/cli_bridge/LICENSE
  17. 0 10
      apps_broken_by_last_refactors/cli_bridge/application.fam
  18. 0 104
      apps_broken_by_last_refactors/cli_bridge/cli_control.c
  19. 0 8
      apps_broken_by_last_refactors/cli_bridge/cli_control.h
  20. TEMPAT SAMPAH
      apps_broken_by_last_refactors/cli_bridge/cligui.png
  21. 0 147
      apps_broken_by_last_refactors/cli_bridge/cligui_main.c
  22. 0 41
      apps_broken_by_last_refactors/cli_bridge/cligui_main_i.h
  23. 0 12
      apps_broken_by_last_refactors/cli_bridge/console_output.c
  24. 0 4
      apps_broken_by_last_refactors/cli_bridge/console_output.h
  25. 0 101
      apps_broken_by_last_refactors/cli_bridge/internal_defs.h
  26. 0 34
      apps_broken_by_last_refactors/cli_bridge/text_input.c
  27. 0 5
      apps_broken_by_last_refactors/cli_bridge/text_input.h
  28. 0 21
      apps_broken_by_last_refactors/tas_playback/LICENSE
  29. 0 11
      apps_broken_by_last_refactors/tas_playback/README.md
  30. 0 767
      apps_broken_by_last_refactors/tas_playback/WString.cpp
  31. 0 240
      apps_broken_by_last_refactors/tas_playback/WString.h
  32. 0 15
      apps_broken_by_last_refactors/tas_playback/application.fam
  33. 0 51
      apps_broken_by_last_refactors/tas_playback/avr_functions.h
  34. 0 2
      apps_broken_by_last_refactors/tas_playback/changelog.md
  35. TEMPAT SAMPAH
      apps_broken_by_last_refactors/tas_playback/images/Pin_back_arrow_10x8.png
  36. TEMPAT SAMPAH
      apps_broken_by_last_refactors/tas_playback/images/tas_playback.png
  37. 0 108
      apps_broken_by_last_refactors/tas_playback/nonstd.c
  38. TEMPAT SAMPAH
      apps_broken_by_last_refactors/tas_playback/screenshots/file-select.png
  39. TEMPAT SAMPAH
      apps_broken_by_last_refactors/tas_playback/screenshots/running.png
  40. 0 494
      apps_broken_by_last_refactors/tas_playback/tas_playback.cxx
  41. 0 264
      apps_broken_by_last_refactors/tas_playback/teensy/crc_table.h
  42. 0 1295
      apps_broken_by_last_refactors/tas_playback/teensy/teensy.ino
  43. 0 325
      apps_source_code/4inrow_game/4inrow.c
  44. TEMPAT SAMPAH
      apps_source_code/4inrow_game/4inrow_10px.png
  45. 0 1
      apps_source_code/4inrow_game/ReadMe.md
  46. 0 17
      apps_source_code/4inrow_game/application.fam
  47. TEMPAT SAMPAH
      apps_source_code/4inrow_game/img/1.png
  48. TEMPAT SAMPAH
      apps_source_code/4inrow_game/img/2.png
  49. TEMPAT SAMPAH
      apps_source_code/4inrow_game/img/3.png
  50. 0 52
      apps_source_code/Snake_2/.gitignore
  51. 0 28
      apps_source_code/Snake_2/ReadMe.md
  52. TEMPAT SAMPAH
      apps_source_code/Snake_2/Snake 2.0.png
  53. 0 16
      apps_source_code/Snake_2/application.fam
  54. TEMPAT SAMPAH
      apps_source_code/Snake_2/img/1.png
  55. TEMPAT SAMPAH
      apps_source_code/Snake_2/img/2.png
  56. TEMPAT SAMPAH
      apps_source_code/Snake_2/img/3.png
  57. TEMPAT SAMPAH
      apps_source_code/Snake_2/snake_10px.png
  58. 0 528
      apps_source_code/Snake_2/snake_20.c
  59. 0 66
      apps_source_code/airmon/.gitignore
  60. 0 674
      apps_source_code/airmon/LICENSE
  61. 0 45
      apps_source_code/airmon/README.md
  62. 0 265
      apps_source_code/airmon/airmon.c
  63. TEMPAT SAMPAH
      apps_source_code/airmon/airmon_10px.png
  64. 0 59
      apps_source_code/airmon/airmon_aqi.c
  65. 0 4
      apps_source_code/airmon/airmon_aqi.h
  66. 0 264
      apps_source_code/airmon/airmon_pms.c
  67. 0 40
      apps_source_code/airmon/airmon_pms.h
  68. 0 15
      apps_source_code/airmon/application.fam
  69. TEMPAT SAMPAH
      apps_source_code/airmon/icons/Battery_26x8.png
  70. TEMPAT SAMPAH
      apps_source_code/airmon/icons/Density_33x11.png
  71. TEMPAT SAMPAH
      apps_source_code/airmon/images/screen_aqi.png
  72. TEMPAT SAMPAH
      apps_source_code/airmon/images/screen_pm25.png
  73. TEMPAT SAMPAH
      apps_source_code/airmon/images/wiring.png
  74. TEMPAT SAMPAH
      apps_source_code/airmon/img/1.png
  75. TEMPAT SAMPAH
      apps_source_code/airmon/img/2.png
  76. 0 11
      apps_source_code/bluetooth-trigger/README-catalog.md
  77. 0 15
      apps_source_code/bluetooth-trigger/README.md
  78. 0 17
      apps_source_code/bluetooth-trigger/application.fam
  79. TEMPAT SAMPAH
      apps_source_code/bluetooth-trigger/assets/Ble_connected_15x15.png
  80. TEMPAT SAMPAH
      apps_source_code/bluetooth-trigger/assets/Ble_disconnected_15x15.png
  81. TEMPAT SAMPAH
      apps_source_code/bluetooth-trigger/assets/ButtonDown_7x4.png
  82. TEMPAT SAMPAH
      apps_source_code/bluetooth-trigger/assets/ButtonLeft_4x7.png
  83. TEMPAT SAMPAH
      apps_source_code/bluetooth-trigger/assets/ButtonRight_4x7.png
  84. TEMPAT SAMPAH
      apps_source_code/bluetooth-trigger/assets/ButtonUp_7x4.png
  85. TEMPAT SAMPAH
      apps_source_code/bluetooth-trigger/assets/Ok_btn_9x9.png
  86. TEMPAT SAMPAH
      apps_source_code/bluetooth-trigger/assets/WarningDolphin_45x42.png
  87. TEMPAT SAMPAH
      apps_source_code/bluetooth-trigger/assets/dir_10px.png
  88. 0 249
      apps_source_code/bluetooth-trigger/bt_trigger.c
  89. 0 53
      apps_source_code/bluetooth-trigger/bt_trigger.h
  90. TEMPAT SAMPAH
      apps_source_code/bluetooth-trigger/bt_trigger_logo.png
  91. TEMPAT SAMPAH
      apps_source_code/bluetooth-trigger/img/1.png
  92. TEMPAT SAMPAH
      apps_source_code/bluetooth-trigger/img/2.png
  93. 0 674
      apps_source_code/bpmtapper/LICENSE
  94. 0 14
      apps_source_code/bpmtapper/README.md
  95. 0 17
      apps_source_code/bpmtapper/application.fam
  96. 0 260
      apps_source_code/bpmtapper/bpm.c
  97. TEMPAT SAMPAH
      apps_source_code/bpmtapper/bpm_10px.png
  98. TEMPAT SAMPAH
      apps_source_code/bpmtapper/icons/DolphinCommon_56x48.png
  99. TEMPAT SAMPAH
      apps_source_code/bpmtapper/images/DolphinCommon_56x48.png
  100. TEMPAT SAMPAH
      apps_source_code/bpmtapper/img/1.png

+ 0 - 146
.drone.yml

@@ -1,146 +0,0 @@
-kind: pipeline
-type: docker
-name: "Build apps"
-
-platform:
-  os: linux
-  arch: amd64
-
-steps:
-  - name: "Update submodules"
-    image: alpine/git
-    commands: 
-      - git submodule sync
-      - git -c protocol.version=2 submodule update --init --force --recursive --jobs 4
-      - git submodule foreach git config --local gc.auto 0
-      - git log -1 --format='%H'
-
-  - name: "Build base pack"
-    image: hfdj/fztools
-    pull: never
-    commands:
-      - git clone --branch dev https://github.com/DarkFlippers/unleashed-firmware.git
-      - rm -rf unleashed-firmware/build/
-      - rm -rf unleashed-firmware/dist/
-      - rm -rf unleashed-firmware/.sconsign.dblite
-      - mv base_pack/* unleashed-firmware/applications_user/
-      - ./parse_api_ver.sh
-      - cd unleashed-firmware
-      - export FBT_GIT_SUBMODULE_SHALLOW=1
-      - ./fbt COMPACT=1 DEBUG=0 updater_package
-      - mkdir artifacts-base
-      - mkdir artifacts-totp
-      - mkdir artifacts-mfkey
-      - mkdir dist/f7-C/f7-update-local/resources
-      - tar xf dist/f7-C/f7-update-local/resources.tar -C dist/f7-C/f7-update-local/resources
-      - mv dist/f7-C/f7-update-local/resources/apps/* artifacts-base/
-      - mv dist/f7-C/f7-update-local/resources/apps_data/totp/* artifacts-totp/
-      - mv dist/f7-C/f7-update-local/resources/apps_data/mfkey/* artifacts-mfkey/
-      - ls -laS artifacts-base
-      - ls -laS artifacts-totp/plugins
-      - ls -laS artifacts-mfkey/plugins
-      - rm -f artifacts-base/GPIO/gpio.fap
-      - rm -f artifacts-base/iButton/ibutton.fap
-      - rm -f artifacts-base/Infrared/infrared.fap
-      - rm -f artifacts-base/NFC/nfc.fap
-      - rm -f artifacts-base/RFID/lfrfid.fap
-      - rm -f artifacts-base/Sub-GHz/subghz_remote.fap
-      - rm -f artifacts-base/Tools/clock.fap
-      - rm -f artifacts-base/USB/bad_usb.fap
-      - rm -f artifacts-base/USB/u2f.fap
-      - rm -f artifacts-base/Games/snake.fap
-      - rm -f artifacts-base/USB/hid_usb.fap
-      - rm -f artifacts-base/Bluetooth/hid_ble.fap
-      - rm -rf artifacts-base/Scripts/
-      - cd ..
-      - mkdir base_pack_build
-      - mv unleashed-firmware/artifacts-base/ base_pack_build
-      - mkdir -p base_pack_build/apps_data/totp
-      - mkdir -p base_pack_build/apps_data/mfkey
-      - mv unleashed-firmware/artifacts-totp/* base_pack_build/apps_data/totp/
-      - mv unleashed-firmware/artifacts-mfkey/* base_pack_build/apps_data/mfkey/
-    environment:
-      FBT_TOOLS_CUSTOM_LINK:
-        from_secret: fbt_link
-
-  - name: "Build extra apps"
-    image: hfdj/fztools
-    pull: never
-    commands:
-      - rm -rf unleashed-firmware/build/
-      - rm -rf unleashed-firmware/dist/
-      - rm -rf unleashed-firmware/.sconsign.dblite
-      - rm -rf unleashed-firmware/applications_user/*
-      - mv apps_source_code/* unleashed-firmware/applications_user/
-      - mv non_catalog_apps/* unleashed-firmware/applications_user/
-      - cd unleashed-firmware
-      - export FBT_GIT_SUBMODULE_SHALLOW=1
-      - ./fbt COMPACT=1 DEBUG=0 updater_package
-      - mkdir artifacts-extra
-      - mkdir dist/f7-C/f7-update-local/resources
-      - tar xf dist/f7-C/f7-update-local/resources.tar -C dist/f7-C/f7-update-local/resources
-      - mv dist/f7-C/f7-update-local/resources/apps/* artifacts-extra/
-      - ls -laS artifacts-extra
-      - rm -f artifacts-extra/GPIO/gpio.fap
-      - rm -f artifacts-extra/iButton/ibutton.fap
-      - rm -f artifacts-extra/Infrared/infrared.fap
-      - rm -f artifacts-extra/NFC/nfc.fap
-      - rm -f artifacts-extra/RFID/lfrfid.fap
-      - rm -f artifacts-extra/Sub-GHz/subghz_remote.fap
-      - rm -f artifacts-extra/Tools/clock.fap
-      - rm -f artifacts-extra/USB/bad_usb.fap
-      - rm -f artifacts-extra/USB/u2f.fap
-      - rm -f artifacts-extra/Games/snake.fap
-      - rm -f artifacts-extra/USB/hid_usb.fap
-      - rm -f artifacts-extra/Bluetooth/hid_ble.fap
-      - rm -rf artifacts-extra/Scripts/
-      - cd ..
-      - mkdir extra_pack_build
-      - mv unleashed-firmware/artifacts-extra/ extra_pack_build
-    environment:
-      FBT_TOOLS_CUSTOM_LINK:
-        from_secret: fbt_link
-
-  - name: "Bundle packages"
-    image: kramos/alpine-zip
-    commands:
-      - zip -r all-the-apps-extra.zip extra_pack_build
-      - zip -r all-the-apps-base.zip base_pack_build
-      - tar czpf all-the-apps-extra.tgz extra_pack_build
-      - tar czpf all-the-apps-base.tgz base_pack_build
-      - mkdir ${DRONE_TAG}
-      - mv all-the-apps-extra.zip ${DRONE_TAG}/
-      - mv all-the-apps-base.zip ${DRONE_TAG}/
-      - mv all-the-apps-extra.tgz ${DRONE_TAG}/
-      - mv all-the-apps-base.tgz ${DRONE_TAG}/
-      - rm -rf extra_pack_build
-      - rm -rf base_pack_build
-      - rm -rf unleashed-firmware
-      - ls -laS
-      - ls -laS ${DRONE_TAG}
-
-  - name: "Do Github release"
-    image: ddplugins/github-release
-    pull: never
-    settings:
-      github_url: https://github.com
-      repo_owner:
-        from_secret: github_repoowner
-      api_key:
-        from_secret: github_apikey
-      files:
-        - ${DRONE_TAG}/*.tgz
-        - ${DRONE_TAG}/*.zip
-      title: ${DRONE_TAG}
-      note: CHANGELOG.md
-      checksum:
-        - md5
-        - sha1
-        - crc32
-
-trigger:
-  event:
-    - tag
-
-node:
-  typ: dev1

+ 0 - 2
.gitignore

@@ -1,2 +0,0 @@
-
-.DS_Store

+ 0 - 6
.gitmodules

@@ -1,6 +0,0 @@
-[submodule "base_pack/subbrute"]
-	path = base_pack/subbrute
-	url = https://github.com/DarkFlippers/flipperzero-subbrute.git
-[submodule "base_pack/multi_fuzzer"]
-	path = base_pack/multi_fuzzer
-	url = https://github.com/DarkFlippers/Multi_Fuzzer.git

+ 0 - 7
CHANGELOG.md

@@ -1,7 +0,0 @@
-# Flipper Application Files (FAPs)
-
-Base pack = apps that was in Unleashed FW by default
-Extra pack = all apps that was in `e`(extra pack) builds of Unleashed FW (all-the-apps-extra archive does not contain Base Pack apps)
-
-### This release contains almost all working apps for Flipper Zero, compare your firmware API version with version below
-

+ 0 - 674
LICENSE

@@ -1,674 +0,0 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <https://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program>  Copyright (C) <year>  <name of author>
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<https://www.gnu.org/licenses/>.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-<https://www.gnu.org/licenses/why-not-lgpl.html>.

+ 0 - 0
apps_broken_by_last_refactors/mifare_nested/LICENSE.md → LICENSE.md


+ 0 - 0
apps_broken_by_last_refactors/mifare_nested/README.md → README.md


+ 0 - 287
ReadMe.md

@@ -1,287 +0,0 @@
-# Flipper Application Files (FAPs)
-## Compare your firmware API version with API version in releases to avoid compatibility issues
-
-#### [Download .zip file by using this link, unpack, and copy only specific apps folders or specific apps onto your microSD into apps folder](https://github.com/xMasterX/all-the-plugins/releases/latest)
-
-
----
-
-Apps contains changes needed to compile them on latest firmware, fixes has been done by @xMasterX
-
-
-## Thank you to the authors!
-
-The Flipper and its community wouldn't be as rich as it is without your contributions and support. Thank you for all you have done.
-
-### Apps checked & updated at `3 May 18:42 GMT +3`
-
-
-# Default pack
-
-<details>
- <summary>Legend</summary>
-  <img src="https://img.shields.io/badge/by_UFW-%2314D411?style=flat-square"> - published by Unleashed team <br>
-  <img src="https://img.shields.io/badge/by_OFW-%23FF8200?style=flat-square"> - published by OFW developers <br>
-  <img src="https://img.shields.io/badge/by_author-%23FFFF00?style=flat-square"> - published by original Author <br>
-  <img src="https://img.shields.io/badge/None-%23FF0000?style=flat-square"> - not in the catalog
-</details>
-
-### The default package includes all applications from [official](https://github.com/flipperdevices/flipperzero-good-faps) developers:
-
-| Name | <div style="width:100px">Category</div> | Remark | <div style="width:70px">Catalog</div> |
-|---|:---:|---|:---:|
-| AVR Flasher | ![GPIO Badge] |  | [![Official Badge]](https://lab.flipper.net/apps/avr_isp) |
-| DAP Link | ![GPIO Badge] |  | [![Official Badge]](https://lab.flipper.net/apps/dap_link) |
-| SPI Mem Manager | ![GPIO Badge] |  | [![Official Badge]](https://lab.flipper.net/apps/spi_mem_manager) |
-| Signal Generator | ![GPIO Badge] |  | [![Official Badge]](https://lab.flipper.net/apps/signal_generator) |
-| Video Game Module Tool | ![GPIO Badge] | [by gsurkov](https://github.com/flipperdevices/flipperzero-good-faps/pull/127/files) | [![Official Badge]](https://lab.flipper.net/apps/video_game_module_tool) |
-| Mfkey32 | ![NFC Badge] |  | [![Official Badge]](https://lab.flipper.net/apps/mfkey32) |
-| PicoPass | ![NFC Badge] |  | [![Official Badge]](https://lab.flipper.net/apps/picopass) |
-| Nfc Magic | ![NFC Badge] |  | [![Official Badge]](https://lab.flipper.net/apps/nfc_magic) |
-| NFC/RFID detector | ![Tools Badge] |  | [![Official Badge]](https://lab.flipper.net/apps/nfc_rfid_detector) |
-| Simple Clock | ![Tools Badge] | [original by CompaqDisc](https://gist.github.com/CompaqDisc/4e329c501bd03c1e801849b81f48ea61), timer by GMMan, included in OFW<br>Part of UFW as main app [sources](https://github.com/DarkFlippers/unleashed-firmware/tree/dev/applications/main/clock_app) | [![Official Badge]](https://lab.flipper.net/apps/clock) |
-| Weather Station | ![SubGhz Badge] | added External Radio Support | [![Official Badge]](https://lab.flipper.net/apps/weather_station) |
-| USB Keyboard & Mouse | ![USB Badge] | Renamed, added Mouse `Clicker`/`Jiggler`, Added `PTT`, `Movie` by @hryamzik - Moved back to [firmware repo](https://github.com/DarkFlippers/unleashed-firmware/tree/dev/applications/system) | ![None Badge] |
-| Bluetooth Remote | ![BT Badge] | Renamed, added Mouse `Clicker`/`Jiggler` & `Tikshorts`, Added `PTT`, `Movie` by @hryamzik - Moved back to [firmware repo](https://github.com/DarkFlippers/unleashed-firmware/tree/dev/applications/system) | ![None Badge] |
-| USB Mass Storage | ![USB Badge] | [by hedger & nminaylov](https://github.com/flipperdevices/flipperzero-good-faps) | [![Official Badge]](https://lab.flipper.net/apps/mass_storage) |
-| Snake Game | ![Games Badge] | Moved back to [firmware repo](https://github.com/DarkFlippers/unleashed-firmware/tree/dev/applications/system) | ![None Badge] |
-| Air Arkanoid | ![Games Badge] | [by DrZlo13](https://github.com/flipperdevices/flipperzero-good-faps/pull/141/files) | [![Official Badge]](https://lab.flipper.net/apps/air_arkanoid) |
-| Music Player | ![Media Badge] |  | [![Official Badge]](https://lab.flipper.net/apps/music_player) |
-
-### Community and Unleashed Apps in default pack:
-
-| Name | <div style="width:100px">Category</div> | Author | Remark | <div style="width:70px">Catalog</div> |
-|---|:---:|---|---|:---:|
-| **Sub-GHz bruteforcer** | ![SubGhz Badge] | [by @derskythe & xMasterX](https://github.com/derskythe/flipperzero-subbrute) | [original by Ganapati & xMasterX](https://github.com/DarkFlippers/unleashed-firmware/pull/57) | ![None Badge] |
-| **Sub-GHz playlist** | ![SubGhz Badge] | [by darmiel](https://github.com/DarkFlippers/unleashed-firmware/pull/62) |  | ![None Badge] |
-| **Sub-GHz Remote** | ![SubGhz Badge] | [by @gid9798](https://github.com/gid9798) | Part of UFW as main app [sources](https://github.com/DarkFlippers/unleashed-firmware/tree/dev/applications/main/subghz_remote)<br>Using version from flipper catalog on CFW can break your .sub files | [![UFW Badge]](https://lab.flipper.net/apps/subghz_remote_ofw) |
-| Spectrum Analyzer (with changes) | ![SubGhz Badge] | [by jolcese](https://github.com/jolcese/flipperzero-firmware/tree/spectrum/applications/spectrum_analyzer) | [Ultra Narrow mode & scan channels non-consecutively](https://github.com/theY4Kman/flipperzero-firmware/commits?author=theY4Kman) + Many improvements by @ALEEF02 | [![UFW Badge]](https://lab.flipper.net/apps/spectrum_analyzer) |
-| POCSAG Pager | ![SubGhz Badge] | [by xMasterX & Shmuma](https://github.com/xMasterX/flipper-pager) | Better decoder by htotoo | [![UFW Badge]](https://lab.flipper.net/apps/pocsag_pager) |
-| **ProtoView** | ![SubGhz Badge] | [by antirez](https://github.com/antirez/protoview) |  | [![UFW Badge]](https://lab.flipper.net/apps/protoview) |
-| Rolling Flaws | ![SubGhz Badge] | [by CodeAllNight & jamisonderek](https://github.com/jamisonderek/flipper-zero-tutorials/tree/main/subghz/apps/rolling-flaws) |  | ![None Badge] |
-| **Mifare Nested** | ![NFC Badge] | [by AloneLiberty](https://github.com/AloneLiberty/FlipperNested) | Works with PC and python app `FlipperNested` | [![Author Badge]](https://lab.flipper.net/apps/mifare_nested) |
-| **NFC Maker** plugin | ![NFC Badge] | [by Willy-JL](https://github.com/Flipper-XFW/Xtreme-Firmware/tree/dev/applications/external/nfc_maker) | make tags with URLs, Wifi and other things | ![None Badge] |
-| **MFKey** with nested | ![NFC Badge] | [by noproto](https://github.com/noproto/FlipperMfkey) | mfkey32 upgrade | ![None Badge] |
-| MIFARE Classic Editor | ![NFC Badge] | [by TollyH](https://github.com/TollyH/flipper-apps/tree/main/mfc-editor) | edit dumps on flipper | [![Author Badge]](https://lab.flipper.net/apps/mfc_editor) |
-| **RFID Fuzzer** | ![RFID Badge] | [by @gid9798](https://github.com/DarkFlippers/Multi_Fuzzer) | original by Ganapati & xMasterX | [![UFW Badge]](https://lab.flipper.net/apps/fuzzer_rfid) |
-| **iButton Fuzzer** | ![iButton Badge] | [by @gid9798](https://github.com/DarkFlippers/Multi_Fuzzer) | original by xMasterX | [![UFW Badge]](https://lab.flipper.net/apps/fuzzer_ibtn) |
-| IR Scope | ![IR Badge] | [by kallanreed](https://github.com/DarkFlippers/unleashed-firmware/pull/407) |  | [![UFW Badge]](https://lab.flipper.net/apps/ir_scope) |
-| MultiConverter plugin | ![Tools Badge] | [by theisolinearchip](https://github.com/theisolinearchip/flipperzero_stuff) |  | [![UFW Badge]](https://lab.flipper.net/apps/multi_converter) |
-| Barcode Generator | ![Tools Badge] | [by Kingal1337](https://github.com/Kingal1337/flipper-barcode-generator) |  | [![UFW Badge]](https://lab.flipper.net/apps/barcode_app) |
-| **TOTP (Authenticator)** | ![Tools Badge] | [by akopachov](https://github.com/akopachov/flipper-zero_authenticator) |  | [![None Badge]](https://github.com/akopachov/flipper-zero_authenticator/wiki/Why-it-is-not-listed-in-official-Flipper-Application-Catalog%3F) |
-| HEX Viewer | ![Tools Badge] | [by QtRoS](https://github.com/QtRoS/flipper-zero-hex-viewer) |  | [![UFW Badge]](https://lab.flipper.net/apps/hex_viewer) |
-| Text Viewer | ![Tools Badge] | [by Willy-JL](https://github.com/Flipper-XFW/Xtreme-Firmware/tree/dev/applications/external/text_viewer) | original by kowalski7cc & kyhwana | [![UFW Badge]](https://lab.flipper.net/apps/text_viewer) |
-| DTMF Dolphin | ![Tools Badge] | [by litui](https://github.com/litui/dtmf_dolphin) |  | [![UFW Badge]](https://lab.flipper.net/apps/dtmf_dolphin) |
-| ESP8266 Deauther plugin | ![GPIO Badge] | [by SequoiaSan](https://github.com/SequoiaSan/FlipperZero-Wifi-ESP8266-Deauther-Module) |  | ![None Badge] |
-| WiFi Scanner plugin | ![GPIO Badge] | [by SequoiaSan](https://github.com/SequoiaSan/FlipperZero-WiFi-Scanner_Module) |  | ![None Badge] |
-| GPIO: Sentry Safe plugin | ![GPIO Badge] | [by H4ckd4ddy](https://github.com/H4ckd4ddy/flipperzero-sentry-safe-plugin) |  | [![UFW Badge]](https://lab.flipper.net/apps/gpio_sentry_safe) |
-| ESP32: WiFi Marauder companion plugin | ![GPIO Badge] | [by 0xchocolate](https://github.com/0xchocolate/flipperzero-wifi-marauder) | Saving .pcap on flipper microSD [by tcpassos](https://github.com/tcpassos/flipperzero-firmware-with-wifi-marauder-companion) -> Only with custom marauder build (It is necessary to uncomment "#define WRITE_PACKETS_SERIAL" in configs.h (in marauder fw) and compile the firmware for the wifi board.) Or download precompiled build -> [Download esp32_marauder_ver_flipper_sd_serial.bin](https://github.com/justcallmekoko/ESP32Marauder/releases/latest) | [![Author Badge]](https://lab.flipper.net/apps/esp32_wifi_marauder) |
-| NRF24: Sniffer & MouseJacker (with changes) | ![GPIO Badge] | [by mothball187](https://github.com/mothball187/flipperzero-nrf24/tree/main/mousejacker) |  | ![None Badge] |
-| [NMEA] GPS | ![GPIO Badge] | [by ezod](https://github.com/ezod/flipperzero-gps) | works with module `NMEA 0183` via UART (13TX, 14RX, GND pins on Flipper) | [![UFW Badge]](https://lab.flipper.net/apps/gps_nmea) |
-| i2c Tools | ![GPIO Badge] | [by NaejEL](https://github.com/NaejEL/flipperzero-i2ctools) | C0 -> SCL / C1 -> SDA / GND -> GND | [![Author Badge]](https://lab.flipper.net/apps/i2ctools) |
-| HC-SR04 Distance sensor | ![GPIO Badge] | Ported and modified by @xMasterX | [(original by Sanqui)](https://github.com/Sanqui/flipperzero-firmware/tree/hc_sr04) - How to connect -> (5V -> VCC) / (GND -> GND) / (13\|TX -> Trig) / (14\|RX -> Echo) | ![None Badge] |
-| **Unitemp Temperature sensors reader** | ![GPIO Badge] | [by quen0n](https://github.com/quen0n/unitemp-flipperzero) | DHT11/22, DS18B20, BMP280, HTU21x and more | [![Author Badge]](https://lab.flipper.net/apps/unitemp) |
-| Lightmeter | ![GPIO Badge] | [by oleksiikutuzov](https://github.com/oleksiikutuzov/flipperzero-lightmeter) |  | [![Author Badge]](https://lab.flipper.net/apps/lightmeter) |
-| **UART Terminal** | ![GPIO Badge] | [by cool4uma](https://github.com/cool4uma/UART_Terminal/tree/main) | New mode, other improvements by @rnadyrshin | [![UFW Badge]](https://lab.flipper.net/apps/uart_terminal) |
-| **SWD Probe** | ![GPIO Badge] | [by g3gg0](https://github.com/g3gg0/flipper-swd_probe) |  | [![UFW Badge]](https://lab.flipper.net/apps/swd_probe) |
-| ESP32-CAM -> Camera Suite | ![GPIO Badge] | [by CodyTolene](https://github.com/CodyTolene/Flipper-Zero-Camera-Suite) |  | [![Author Badge]](https://lab.flipper.net/apps/camera_suite) |
-| WAV Player | ![Media Badge] | [OFW: DrZlo13](https://github.com/flipperdevices/flipperzero-firmware/tree/zlo/wav-player) | Fixed and improved by [LTVA1](https://github.com/LTVA1/wav_player) -> Also outputs audio on `PA6` `3(A6)` pin | [![UFW Badge]](https://lab.flipper.net/apps/wav_player) |
-| Metronome | ![Media Badge] | [by panki27](https://github.com/panki27/Metronome) |  | [![UFW Badge]](https://lab.flipper.net/apps/metronome) |
-| Morse Code | ![Media Badge] | [by wh00hw](https://github.com/wh00hw/MorseCodeFAP) |  | [![UFW Badge]](https://lab.flipper.net/apps/morse_code) |
-| **BadKB** plugin | ![Tools Badge] | [by Willy-JL, ClaraCrazy, XFW contributors](https://github.com/Flipper-XFW/Xtreme-Firmware/tree/dev/applications/main/bad_kb) | BadKB (aka BadUSB via Bluetooth) | ![None Badge] |
-| BLE Spam | ![BT Badge] | [by @Willy-JL & @ECTO-1A & @Spooks4576](https://github.com/Next-Flip/Momentum-Apps/tree/dev/ble_spam) |  | ![None Badge] |
-| FindMy Flipper | ![BT Badge] | [by @MatthewKuKanich](https://github.com/MatthewKuKanich/FindMyFlipper) | Please Read [how to add keys here](https://github.com/MatthewKuKanich/FindMyFlipper) | ![None Badge] |
-
-### Games
-
-| Name | <div style="width:100px">Category</div> | Author | Remark | <div style="width:70px">Catalog</div> |
-|---|:---:|---|---|:---:|
-| DOOM | ![Games Badge] | ported and fixed by @xMasterX & @Svarich & @hedger | [original by p4nic4ttack](https://github.com/p4nic4ttack/doomflipperzero/) | [![UFW Badge]](https://lab.flipper.net/apps/doom) |
-| Zombiez | ![Games Badge] | [Reworked by DevMilanIan](https://github.com/RogueMaster/flipperzerofirmwarewPlugins/pull/240) | [original by Dooskington](https://github.com/Dooskington/flipperzerozombiez) | [![UFW Badge]](https://lab.flipper.net/apps/zombiez) |
-| Flappy Bird | ![Games Badge] | [by DroomOne](https://github.com/DroomOne/flipperzerofirmware/tree/dev/applications/flappy_bird) |  | [![UFW Badge]](https://lab.flipper.net/apps/flappy_bird) |
-| Arkanoid | ![Games Badge] | by xMasterX | refactored by xMasterX, [original by gotnull](https://github.com/gotnull/flipperzerofirmwarewPlugins) | [![UFW Badge]](https://lab.flipper.net/apps/arkanoid) |
-| Tic Tac Toe | ![Games Badge] | by xMasterX | refactored by xMasterX, [original by gotnull](https://github.com/gotnull/flipperzerofirmwarewPlugins) | [![UFW Badge]](https://lab.flipper.net/apps/tictactoe) |
-| Tetris (with fixes) | ![Games Badge] | [by jeffplang](https://github.com/jeffplang/flipperzerofirmware/tree/tetris_game/applications/tetris) & [noiob](https://github.com/noiob) |  | [![UFW Badge]](https://lab.flipper.net/apps/tetris_game) |
-| Mine Sweeper | ![Games Badge] | [by squee72564](https://github.com/squee72564/F0_Minesweeper_Fap) | Old version by @panki27 is published in official catalogue, will be replaced with redux version by @squee72564 | [![UFW Badge]](https://lab.flipper.net/apps/minesweeper) |
-| Heap Defence (aka Stack Attack) | ![Games Badge] | by xMasterX | ported to latest firmware by xMasterX, [original by wquinoa & Vedmein](https://github.com/Vedmein/flipperzerofirmware/tree/hd/svistoperdelki) | [![UFW Badge]](https://lab.flipper.net/apps/heap_defence) |
-| Game15 | ![Games Badge] | [by x27](https://github.com/x27/flipperzerogame15) |  | [![UFW Badge]](https://lab.flipper.net/apps/game15) |
-| Solitaire | ![Games Badge] | [by teeebor](https://github.com/teeebor/flipper_games) |  | ![None Badge] |
-| BlackJack | ![Games Badge] | [by teeebor](https://github.com/teeebor/flipper_games) |  | ![None Badge] |
-| 2048 game | ![Games Badge] | [by eugenekirzhanov](https://github.com/eugene-kirzhanov/flipper-zero-2048-game) |  | [![UFW Badge]](https://lab.flipper.net/apps/game_2048) |
-| Bomberduck | ![Games Badge] | [by leoneedmorecoffee](https://github.com/leoneedmorecoffee/flipperzerobomberduck) |  | ![None Badge] |
-| JetPack Joyride | ![Games Badge] | [by timstrasser](https://github.com/timstrasser) |  | [![Author Badge]](https://lab.flipper.net/apps/jetpack_game) |
-
----
-# Extra pack
-| Name | <div style="width:100px">Category</div> | Original author<br>or Source | Remark | <div style="width:70px">Catalog</div> |
-|---|:---:|---|---|:---:|
-| BT Camera Trigger | ![BT Badge] | [by Nem0oo](https://github.com/Nem0oo/flipper-zero-bluetooth-trigger) |  | [![UFW Badge]](https://lab.flipper.net/apps/bt_trigger) |
-| BT Serial Example | ![BT Badge] | [by maybe-hello-world](https://github.com/maybe-hello-world/fbs) |  | ![None Badge] |
-| Bluetooth remote Keynote for Kodi | ![BT Badge] | [by coded-with-claws](https://github.com/coded-with-claws/flipperzero-tools) | read more details in original repo | ![None Badge] |
-| PC Monitor | ![BT Badge] | [by TheSainEyereg](https://github.com/TheSainEyereg/flipper-pc-monitor) | (+ App fixes for new api by @Willy-JL) - PC App (backend) is required! [Download here](https://github.com/TheSainEyereg/flipper-pc-monitor-backend/releases) | [![Author Badge]](https://lab.flipper.net/apps/pc_monitor) |
-| 4 in row | ![Games Badge] | [by leo-need-more-coffee](https://github.com/leo-need-more-coffee/flipperzero-4inrow) |  | [![UFW Badge]](https://lab.flipper.net/apps/4inrow) |
-| Asteroids | ![Games Badge] | [by antirez & SimplyMinimal](https://github.com/antirez/flipper-asteroids) | Modified by [SimplyMinimal](https://github.com/SimplyMinimal/FlipperZero-Asteroids) all changes can be found by clicking on [this link](https://github.com/SimplyMinimal/FlipperZero-Asteroids) | [![UFW Badge]](https://lab.flipper.net/apps/asteroids) |
-| Chess Clock | ![Games Badge] | [by ihatecsv](https://github.com/ihatecsv/flipper_chess_clock) |  | ![None Badge] |
-| Chess | ![Games Badge] | [by xtruan](https://github.com/xtruan/flipper-chess) |  | [![Author Badge]](https://lab.flipper.net/apps/chess) |
-| Color Guess | ![Games Badge] | [by leedave](https://github.com/leedave/Leeds-Flipper-Zero-Applications) |  | [![Author Badge]](https://lab.flipper.net/apps/color_guess) |
-| Dice | ![Games Badge] | [by Ka3u6y6a](https://github.com/Ka3u6y6a/flipper-zero-dice) |  | [![Author Badge]](https://lab.flipper.net/apps/dice_app) |
-| DVD Bounce | ![Games Badge] | [by schaene](https://github.com/schaene/Flipper-DVD-Bounce) |  | ![None Badge] |
-| Etch-A-Sketch | ![Games Badge] | [by SimplyMinimal](https://github.com/SimplyMinimal/FlipperZero-Etch-A-Sketch) |  | ![None Badge] |
-| Pong | ![Games Badge] | [by nmrr](https://github.com/nmrr/flipperzero-pong) | Modified by [SimplyMinimal](https://github.com/SimplyMinimal/FlipperZero-Pong) | [![UFW Badge]](https://lab.flipper.net/apps/flipper_pong) |
-| Game of Life (Updated to work by tgxn) | ![Games Badge] | [by itsyourbedtime](https://github.com/tgxn/flipperzero-firmware/blob/dev/applications/game_of_life/game_of_life.c) |  | [![UFW Badge]](https://lab.flipper.net/apps/gameoflife) |
-| Mandelbrot Set | ![Games Badge] | [by Possibly-Matt](https://github.com/Possibly-Matt/flipperzero-firmware-wPlugins) |  | [![UFW Badge]](https://lab.flipper.net/apps/mandelbrotset) |
-| Monty Hall | ![Games Badge] | [by DevMilanIan](https://github.com/RogueMaster/flipperzero-firmware-wPlugins/pull/203) |  | [![UFW Badge]](https://lab.flipper.net/apps/montyhall) |
-| Nu Pogodi! (Ну, погоди!) | ![Games Badge] | [by sionyx](https://github.com/sionyx/flipper_nupogodi) |  | [![UFW Badge]](https://lab.flipper.net/apps/nupogodi) |
-| Paint | ![Games Badge] | [by n-o-T-I-n-s-a-n-e](https://github.com/n-o-T-I-n-s-a-n-e) |  | [![UFW Badge]](https://lab.flipper.net/apps/paint) |
-| Race | ![Games Badge] | [by zyuhel](https://github.com/zyuhel/flipperzero-racegame) |  | [![UFW Badge]](https://lab.flipper.net/apps/racegame) |
-| Reaction test Game | ![Games Badge] | [by Milk-Cool](https://github.com/Milk-Cool/fz-reaction-game) |  | [![UFW Badge]](https://lab.flipper.net/apps/reaction) |
-| Reversi | ![Games Badge] | [by dimat](https://github.com/dimat/flipperzero-reversi) |  | [![UFW Badge]](https://lab.flipper.net/apps/reversi) |
-| Root of Life | ![Games Badge] | [by Xorboo](https://github.com/Xorboo/root-of-life) |  | [![UFW Badge]](https://lab.flipper.net/apps/roots_of_life) |
-| Rubik's Cube Scrambler | ![Games Badge] | [by RaZeSloth](https://github.com/RaZeSloth/flipperzero-rubiks-cube-scrambler) |  | [![UFW Badge]](https://lab.flipper.net/apps/rubiks_cube_scrambler) |
-| SUPER-CHIP (Chip8) Emulator | ![Games Badge] | [by Milk-Cool](https://github.com/Milk-Cool/fz-schip) | WIP, please report found issues [here](https://github.com/Milk-Cool/fz-schip/issues) | ![None Badge] |
-| Scorched Tanks | ![Games Badge] | [by jasniec](https://github.com/jasniec/flipper-scorched-tanks-game) |  | [![UFW Badge]](https://lab.flipper.net/apps/scorched_tanks) |
-| Simon Says | ![Games Badge] | [by SimplyMinimal](https://github.com/SimplyMinimal/FlipperZero-SimonSays) |  | ![None Badge] |
-| Slots for Flipper Zero | ![Games Badge] | [by Daniel-dev-s](https://github.com/Daniel-dev-s/flipperzero-slots) |  | [![UFW Badge]](https://lab.flipper.net/apps/slotmachine) |
-| Snake 2.0 | ![Games Badge] | [by Willzvul](https://github.com/Willzvul/Snake_2.0) |  | [![UFW Badge]](https://lab.flipper.net/apps/snake20) |
-| T-rex game | ![Games Badge] | [by Rrycbarm](https://github.com/Rrycbarm/t-rex-runner) |  | [![UFW Badge]](https://lab.flipper.net/apps/t_rex_runner) |
-| TAMA P1 | ![Games Badge] | [by GMMan & DroomOne](https://github.com/GMMan/flipperzero-tamagotch-p1) | requires [this rom](https://tinyurl.com/tamap1) IN `tama_p1` folder on SD renamed as `rom.bin` to make it work. - Modified to allow saving game state by [DroomOne](https://github.com/DroomOne/flipperzero-tamagotch-p1) - Mute mode & settings by [Round-Pi](https://github.com/Round-Pi/flipperzero-tamagotch-p1) | ![None Badge] |
-| Tanks Game | ![Games Badge] | [by alexgr13](https://github.com/alexgr13/flipperzero-firmware/tree/fork/dev/applications/tanks-game) | Fixes for latest subghz changes **by @Sil333033** | ![None Badge] |
-| Video Poker | ![Games Badge] | [by PixlEmly](https://github.com/PixlEmly/flipperzero-firmware-testing/blob/420/applications/VideoPoker/poker.c) |  | [![UFW Badge]](https://lab.flipper.net/apps/videopoker) |
-| Yatzee | ![Games Badge] | [by emfleak](https://github.com/emfleak/flipperzero-yatzee) |  | [![UFW Badge]](https://lab.flipper.net/apps/yatzee) |
-| Secret Toggle | ![Games Badge] | [by nostrumuva](https://github.com/nostrumuva/secret_toggle) |  | [![Author Badge]](https://lab.flipper.net/apps/secret_toggle) |
-| Sudoku Game | ![Games Badge] | [by profelis](https://github.com/profelis/fz-sudoku) |  | [![Author Badge]](https://lab.flipper.net/apps/sudoku) |
-| Ultimate Tic-Tac-Toe | ![Games Badge] | [by Racso](https://github.com/Racso/fzero-apps/tree/main) |  | [![Author Badge]](https://lab.flipper.net/apps/racso_ultimate_tic_tac_toe) |
-| Zero! | ![Games Badge] | [by Racso](https://github.com/Racso/fzero-apps/tree/main) |  | [![Author Badge]](https://lab.flipper.net/apps/racso_zero) |
-| Sokoban | ![Games Badge] | [by Racso](https://github.com/Racso/fzero-apps/tree/main) |  | [![Author Badge]](https://lab.flipper.net/apps/racso_sokoban) |
-| Игра «Виселица» («Балда») | ![Games Badge] | [by bolknote](https://github.com/bolknote/Flipper-Zero-Hangman-Game) |  | ![None Badge] |
-| City Bloxx | ![Games Badge] | [by Milk-Cool](https://github.com/Milk-Cool/fz-citybloxx) |  | ![None Badge] |
-| Tarot spread | ![Games Badge] | [by pionaiki](https://github.com/pionaiki/fz-tarot) |  | ![None Badge] |
-| Vexed | ![Games Badge] | [by dlvoy](https://github.com/dlvoy/flipper-zero-vexed) |  | ![None Badge] |
-| Paper Plane | ![Games Badge] | [by Larry-the-Pig](https://github.com/Larry-the-Pig/flipper-plane) |  | ![None Badge] |
-| Air Labyrinth (VGM) | ![Games Badge] | [by jamisonderek](https://github.com/jamisonderek/flipper-zero-tutorials/tree/main/vgm/apps/air_labyrinth) |  | [![Author Badge]](https://lab.flipper.net/apps/air_labyrinth) |
-| Air Mouse | ![GPIO Badge] | [by ginkage](https://github.com/ginkage/FlippAirMouse/) |  | [![Author Badge]](https://lab.flipper.net/apps/air_mouse) |
-| Plantower PMSx003 sensor reader | ![GPIO Badge] | [by 3cky](https://github.com/3cky/flipperzero-airmon) |  | [![UFW Badge]](https://lab.flipper.net/apps/airmon) |
-| Bar code scanner emulator via COM port | ![GPIO Badge] | [by polarikus](https://github.com/polarikus/flipper-zero_bc_scanner_emulator) |  | ![None Badge] |
-| ESP32->Flipper Camera | ![GPIO Badge] | [by Z4urce](https://github.com/Z4urce/flipperzero-camera) |  | ![None Badge] |
-| RC2014 ColecoVision | ![GPIO Badge] | [by ezod](https://github.com/ezod/flipperzero-rc2014-coleco) |  | ![None Badge] |
-| ESP Flasher | ![GPIO Badge] | [by 0xchocolate](https://github.com/0xchocolate/flipperzero-esp-flasher) | QuickFlash mode and other changes [by @Willy-JL](https://github.com/Flipper-XFW/Xtreme-Apps/tree/dev/esp_flasher), Marauder [firmware source](https://github.com/justcallmekoko/ESP32Marauder), BlackMagic [firmware source](https://github.com/flipperdevices/blackmagic-esp32-s2) | [![Author Badge]](https://lab.flipper.net/apps/esp_flasher) |
-| IFTTT Virtual Button for ESP8266 | ![GPIO Badge] | [by Ferrazzi](https://github.com/Ferrazzi/FlipperZero_IFTTT_Virtual_Button) | Fixes [by Willy-JL](https://github.com/Flipper-XFW/Xtreme-Firmware/commit/ae321fb5f4c616d3965546926b1b4b446eef8d86) | ![None Badge] |
-| Wifi Deauth v2 for ESP8266 | ![GPIO Badge] | [by Timmotools](https://github.com/Timmotools/flipperzero_esp8266_deautherv2) |  | ![None Badge] |
-| Evil captive portal | ![GPIO Badge] | [by bigbrodude6119](https://github.com/bigbrodude6119/flipper-zero-evil-portal) | WIP -> +2 new features [by leedave](https://github.com/leedave/flipper-zero-evil-portal/tree/leedave/ap_rename) + Fixed and modded [by Willy-JL](https://github.com/Flipper-XFW/Xtreme-Firmware/tree/dev/applications/external/evil_portal) | ![None Badge] |
-| Flashlight | ![GPIO Badge] | [by xMasterX](https://github.com/xMasterX/flipper-flashlight) |  | [![UFW Badge]](https://lab.flipper.net/apps/flashlight) |
-| Pwnagotchi->Flipper interface | ![GPIO Badge] | [by Matt-London](https://github.com/Matt-London/pwnagotchi-flipper) |  | ![None Badge] |
-| Geiger Counter | ![GPIO Badge] | [by nmrr](https://github.com/nmrr/flipperzero-geigercounter) | works with external module! | [![UFW Badge]](https://lab.flipper.net/apps/flipper_geiger) |
-| Oscilloscope | ![GPIO Badge] | [by anfractuosity](https://github.com/anfractuosity/flipperscope) | Fixed furi_bus issues **by @xMasterX** | [![Author Badge]](https://lab.flipper.net/apps/flipperscope) |
-| Control 7-segment display with Flipper Zero | ![GPIO Badge] | [by jamisonderek](https://github.com/jamisonderek/flipper-zero-tutorials/tree/main/gpio) |  | [![UFW Badge]](https://lab.flipper.net/apps/gpio_7segment_output) |
-| GPIO Controller | ![GPIO Badge] | [by Lokno](https://github.com/Lokno/gpio_controller) | `A visual tool to control the general purpose pins of the Flipper Zero` | ![None Badge] |
-| GPIO Reader | ![GPIO Badge] | [by aureli1c](https://github.com/aureli1c/flipperzero_GPIO_read) |  | [![UFW Badge]](https://lab.flipper.net/apps/gpio_reader) |
-| Timelapse (zeitraffer) | ![GPIO Badge] | [by theageoflove](https://github.com/theageoflove/flipperzero-zeitraffer) |  | [![UFW Badge]](https://lab.flipper.net/apps/gpio_timelapse) |
-| GPIO Reader 2 | ![GPIO Badge] | [by biotinker](https://github.com/biotinker/flipperzero-gpioreader) |  | ![None Badge] |
-| Logic analyzer | ![GPIO Badge] | [by g3gg0](https://github.com/g3gg0/flipper-logic_analyzer) | [How to use](https://github.com/g3gg0/flipper-logic_analyzer#readme) | ![None Badge] |
-| LORA Terminal | ![GPIO Badge] | [by aafksab](https://github.com/aafksab/LORA-Term) |  | ![None Badge] |
-| MagSpoof (WIP) | ![GPIO Badge] | [by zacharyweiss](https://github.com/zacharyweiss/magspoof_flipper) | Read mode [by hummusec](https://github.com/hummusec/magspoof_flipper) - + GPIO & Power fixes | ![None Badge] |
-| Mx2125 Dual-Axis Accelerometer | ![GPIO Badge] | [by jamisonderek](https://github.com/jamisonderek/flipper-zero-tutorials/tree/main/gpio) |  | ![None Badge] |
-| MH-Z19 - CO2 sensor | ![GPIO Badge] | [by meshchaninov](https://github.com/meshchaninov/flipper-zero-mh-z19) |  | [![Author Badge]](https://lab.flipper.net/apps/mh_z19) |
-| NRF24 Batch Read/Send (WIP) | ![GPIO Badge] | [by vad7](https://github.com/vad7/nRF24-Batch) |  | ![None Badge] |
-| NRF24 Scanner | ![GPIO Badge] | [by vad7](https://github.com/vad7/nrf24scan) |  | ![None Badge] |
-| Pokemon Trading (for GameBoy) | ![GPIO Badge] | [by EstebanFuentealba](https://github.com/EstebanFuentealba/Flipper-Zero-Game-Boy-Trading-Pokemons) | Updates [by R4g3D](https://github.com/R4g3D/Flipper-Zero-Game-Boy-Pokemon-Trading) | [![Author Badge]](https://lab.flipper.net/apps/pokemon) |
-| Radiation Sensor | ![GPIO Badge] | [by sionyx](https://github.com/sionyx/flipper_radsens) | works with RadSens module | ![None Badge] |
-| RCWL-516 Motion Sensor | ![GPIO Badge] | [by ahmedafe1](https://github.com/ahmedafe1/rcwl_0516-Flipperzero) |  | ![None Badge] |
-| ServoTester | ![GPIO Badge] | [by spin7ion](https://github.com/spin7ion/flipper-servotester) |  | [![UFW Badge]](https://lab.flipper.net/apps/servotester) |
-| ServoTester (2) | ![GPIO Badge] | [by mhasbini](https://github.com/mhasbini/ServoTesterApp/tree/master) |  | ![None Badge] |
-| TAS playback | ![GPIO Badge] | [by rcombs](https://github.com/rcombs/tas-playback) | `This app plays back TAS files for retro video games. Connect the GPIO pins to the console's controller port and select a file to play back.` | ![None Badge] |
-| u-blox GPS | ![GPIO Badge] | [by liamhays](https://github.com/liamhays/ublox) |  | [![Author Badge]](https://lab.flipper.net/apps/ublox) |
-| [USPING] Distance Sensor | ![GPIO Badge] | [by privet971](https://github.com/privet971/FlipperZeroApps/tree/main/usping) |  | ![None Badge] |
-| Wiegand Reader | ![GPIO Badge] | [by jamisonderek](https://github.com/jamisonderek/flipper-zero-tutorials/tree/main/gpio) |  | ![None Badge] |
-| ESP32 Wifi Mapping | ![GPIO Badge] | [by carvilsi](https://github.com/carvilsi/flipper0-wifi-map/tree/main) |  | ![None Badge] |
-| Wii EC Analyser | ![GPIO Badge] | [by csBlueChip](https://github.com/csBlueChip/FlipperZero_WiiEC) |  | ![None Badge] |
-| Wire Tester | ![GPIO Badge] | [by unixispower](https://gitlab.com/unixispower/flipper-wire-tester) |  | ![None Badge] |
-| Atomic Dice Roller | ![GPIO Badge] | [by nmrr](https://github.com/nmrr/flipperzero-atomicdiceroller) |  | ![None Badge] |
-| NRF24 Channel Scanner | ![GPIO Badge] | [by htotoo](https://github.com/htotoo/NRF24ChannelScanner) |  | [![Author Badge]](https://lab.flipper.net/apps/nrf24channelscanner) |
-| Mx2125 - Step Counter | ![GPIO Badge] | [by grugnoymeme](https://github.com/grugnoymeme/flipperzero-stepcounter-fap) |  | ![None Badge] |
-| TEA5767 Radio control | ![GPIO Badge] | [original by victormico](https://github.com/victormico/flipperzero-radio/tree/main) | new version [by coolshrimp](https://coolshrimp/flipperzero-firmware-wPlugins/) | ![None Badge] |
-| Coffee EEPROM | ![GPIO Badge] | [by wh00hw](https://github.com/wh00hw/Coffee-EEPROM-FAP) | read more details in original repo | ![None Badge] |
-| WHC CH32V003 debugger/flasher | ![GPIO Badge] | [by sukvojte](https://github.com/sukvojte/wch_swio_flasher) | read more details in original repo | ![None Badge] |
-| NRF24 Sniffer MS | ![GPIO Badge] | [by coded-with-claws](https://github.com/coded-with-claws/flipperzero-tools) | read more details in original repo | ![None Badge] |
-| NRF24 Mouse Jacker MS | ![GPIO Badge] | [by coded-with-claws](https://github.com/coded-with-claws/flipperzero-tools) | read more details in original repo | ![None Badge] |
-| SD-SPI | ![GPIO Badge] | [by Gl1tchub](https://github.com/Gl1tchub/Flipperzero-SD-SPI) | read more details in original repo | ![None Badge] |
-| ICM42688 Air Mouse | ![GPIO Badge] | [by nminaylov](https://github.com/flipperdevices/flipperzero-good-faps/pull/83/files) | read more details in [original repo](https://github.com/flipperdevices/flipperzero-good-faps/pull/83/files) | ![None Badge] |
-| WS2812B LED Tester | ![GPIO Badge] | [by jamisonderek](https://github.com/jamisonderek/flipper-zero-tutorials/tree/main/gpio/ws2812b_tester) | read more details in [original repo](https://github.com/jamisonderek/flipper-zero-tutorials/tree/main/gpio/ws2812b_tester) | ![None Badge] |
-| IR Remote | ![IR Badge] | [by Hong5489](https://github.com/Hong5489/ir_remote) | improvements [by friebel](https://github.com/RogueMaster/flipperzero-firmware-wPlugins/pull/535) - Hold Option, RAW support [by d4ve10](https://github.com/d4ve10/ir_remote/tree/infrared_hold_option) | ![None Badge] |
-| IR Intervalometer | ![IR Badge] | [by Nitepone](https://github.com/Nitepone/flipper-intervalometer) |  | [![UFW Badge]](https://lab.flipper.net/apps/sony_intervalometer) |
-| IR Xbox Controller | ![IR Badge] | [by gebeto](https://github.com/gebeto/flipper-xbox-controller) |  | [![Author Badge]](https://lab.flipper.net/apps/xbox_controller) |
-| XRemote | ![IR Badge] | [by kala13x](https://github.com/kala13x/flipper-xremote) | Check out original repo to find usage instructions! | [![Author Badge]](https://lab.flipper.net/apps/flipper_xremote) |
-| R.O.B. Control | ![IR Badge] | [by riney](https://github.com/riney/flip_rob) | Flipper app to control a Nintendo R.O.B./Family Computer Robot | ![None Badge] |
-| BPM Tapper | ![Media Badge] | [by panki27](https://github.com/panki27/bpm-tapper) |  | [![UFW Badge]](https://lab.flipper.net/apps/bpm_tapper) |
-| Flizzer Tracker | ![Media Badge] | [by LTVA1](https://github.com/LTVA1/flizzer_tracker) |  | [![Author Badge]](https://lab.flipper.net/apps/flizzer_tracker) |
-| Music Beeper | ![Media Badge] | [by qqMajiKpp / Haseo](https://github.com/qqmajikpp/) |  | ![None Badge] |
-| Ocarina | ![Media Badge] | [by invalidna-me](https://github.com/invalidna-me/flipperzero-ocarina) |  | [![UFW Badge]](https://lab.flipper.net/apps/ocarina) |
-| Text 2 SAM | ![Media Badge] | [by Round-Pi](https://github.com/Round-Pi/flipperzero-text2sam) | Fixes [by Willy-JL](https://github.com/Flipper-XFW/Xtreme-Firmware/commit/e688f81b53b0138d80de4b609daf1f9fca5be647) | [![UFW Badge]](https://lab.flipper.net/apps/text2sam) |
-| Tuning Fork | ![Media Badge] | [by besya](https://github.com/besya/flipperzero-tuning-fork) | Fixes [by Willy-JL](https://github.com/Flipper-XFW/Xtreme-Firmware/commit/44023851f7349b6ae9ca9f9bd9228d795a7e04c0) | [![UFW Badge]](https://lab.flipper.net/apps/tuning_fork) |
-| USB Midi | ![Media Badge] | [by DrZlo13](https://github.com/DrZlo13/flipper-zero-usb-midi) |  | ![None Badge] |
-| Video Player | ![Media Badge] | [by LTVA1](https://github.com/LTVA1/flipper-zero-video-player) | <- Follow link to download examples and learn how to convert videos | ![None Badge] |
-| Music Tracker | ![Media Badge] | [by DrZlo13](https://github.com/DrZlo13/flipper-zero-music-tracker) |  | [![UFW Badge]](https://lab.flipper.net/apps/zero_tracker) |
-| The C Programming Language | ![Media Badge] | [by armixz](https://github.com/armixz/Flipper-Zero-The-C-Programming-Language) |  | ![None Badge] |
-| Cryptography Dictionary | ![Media Badge] | [by armixz](https://github.com/armixz/Flipper-Zero-Crypto-Dictionary) |  | ![None Badge] |
-| Mifare Fuzzer | ![NFC Badge] | [by spheeere98](https://github.com/spheeere98/mifare_fuzzer) | Fixed crash on exit. / Update!: Ported to new NFC API [by @Sil333033](https://github.com/Flipper-XFW/Xtreme-Firmware/commit/ac5744328a28b73fb5022ce7baaa4332a824a739) | [![UFW Badge]](https://lab.flipper.net/apps/mifare_fuzzer) |
-| Seader | ![NFC Badge] | [by bettse](https://github.com/bettse/seader/tree/main) | `Interface with a SAM from the Flipper Zero over UART` | [![Author Badge]](https://lab.flipper.net/apps/seader) |
-| VB Lab Migration Assistant | ![NFC Badge] | [by GMMan (cyanic)](https://github.com/GMMan/flipperzero-vb-migrate) |  | [![Author Badge]](https://lab.flipper.net/apps/vb_migrate) |
-| NFC Playlist | ![NFC Badge] | [by acegoal07](https://github.com/acegoal07/FlipperZero_NFC_Playlist/tree/main) |  | ![None Badge] |
-| RFID Beacon | ![RFID Badge] | [by nmrr](https://github.com/nmrr/flipperzero-rfidbeacon)  | `A letter/number Morse beacon on 125 kHz` | ![None Badge] |
-| EM4100 universal keys generator (for RFID Fuzzer) | ![RFID Badge] | [by Milk-Cool](https://github.com/Milk-Cool/fz-em4100-generator) |  | [![Author Badge]](https://lab.flipper.net/apps/key_generator) |
-| (Q)M100 UHF RFID | ![RFID Badge] | [by frux-c](https://github.com/frux-c/uhf_rfid) | WIP -> (+Added icon by @xMasterX) | ![None Badge] |
-| T5577 Multiwriter | ![RFID Badge] | [by Leptopt1los](https://github.com/Leptopt1los/t5577_multiwriter) | | ![None Badge] |
-| Enhanced Sub-GHz Chat | ![SubGhz Badge] | [by twisted-pear](https://github.com/twisted-pear/esubghz_chat) |  | ![None Badge] |
-| TPMS Reader | ![SubGhz Badge] | [by wosk](https://github.com/wosk/flipperzero-tpms/tree/main) |  | ![None Badge] |
-| ShapShup | ![SubGhz Badge] | [by derskythe](https://github.com/derskythe/flipperzero-shapshup) | RAW files preview (+fixed app exit) | ![None Badge] |
-| Meal Pager Tool | ![SubGhz Badge] | [by leedave](https://github.com/leedave/flipper-zero-meal-pager) |  | ![None Badge] |
-| Analog Clock | ![Tools Badge] | [by scrolltex](https://github.com/scrolltex/flipper_analog_clock) |  | [![UFW Badge]](https://lab.flipper.net/apps/analog_clock) |
-| Brainfuck interpreter | ![Tools Badge] | [by nymda](https://github.com/nymda/FlipperZeroBrainfuck) |  | [![UFW Badge]](https://lab.flipper.net/apps/brainfuck) |
-| Ceasar Cipher | ![Tools Badge] | [by panki27](https://github.com/panki27/caesar-cipher) |  | [![UFW Badge]](https://lab.flipper.net/apps/caesar_cipher) |
-| Calculator | ![Tools Badge] | [by n-o-T-I-n-s-a-n-e](https://github.com/n-o-T-I-n-s-a-n-e) |  | [![UFW Badge]](https://lab.flipper.net/apps/calculator) |
-| CLI-GUI Bridge | ![Tools Badge] | [by ranchordo](https://github.com/ranchordo/flipperzero-cli-bridge) | Fixes [by Willy-JL](https://github.com/Willy-JL) | ![None Badge] |
-| Count Down Timer | ![Tools Badge] | [by 0w0mewo](https://github.com/0w0mewo/fpz_cntdown_timer) |  | [![UFW Badge]](https://lab.flipper.net/apps/cntdown_tim) |
-| Counter | ![Tools Badge] | [by Krulknul](https://github.com/Krulknul/dolphin-counter) |  | [![UFW Badge]](https://lab.flipper.net/apps/counter) |
-| DCF77 Transmitter | ![Tools Badge] | [by arha](https://github.com/arha/flipper-dcf77) |  | [![UFW Badge]](https://lab.flipper.net/apps/dcf77) |
-| FlipBIP Crypto Tool | ![Tools Badge] | [by xtruan](https://github.com/xtruan/FlipBIP) |  | [![Author Badge]](https://lab.flipper.net/apps/flipbip) |
-| Flipp Pomodoro Timer | ![Tools Badge] | [by Th3Un1q3](https://github.com/Th3Un1q3/flipp_pomodoro) |  | [![UFW Badge]](https://lab.flipper.net/apps/flipp_pomodoro) |
-| Chronometer | ![Tools Badge] | [by nmrr](https://github.com/nmrr/flipperzero-chronometer) |  | ![None Badge] |
-| HEX Editor | ![Tools Badge] | [by dunaevai135](https://github.com/dunaevai135/flipper-zero-hex_editor) |  | [![UFW Badge]](https://lab.flipper.net/apps/hex_editor) |
-| Multi Counter | ![Tools Badge] | [by JadePossible](https://github.com/JadePossible/Flipper-Multi-Counter) |  | [![Author Badge]](https://lab.flipper.net/apps/multi_counter) |
-| NightStand Clock | ![Tools Badge] | [by nymda](https://github.com/nymda/FlipperNightStand) | Fixes [by Willy-JL](https://github.com/Willy-JL) | ![None Badge] |
-| Password Generator | ![Tools Badge] | [by anakod](https://github.com/anakod/flipper_passgen) | Proper random [by henrygab](https://github.com/anakod/flipper_passgen/pull/6) | [![UFW Badge]](https://lab.flipper.net/apps/passgen) |
-| Pomodoro Timer | ![Tools Badge] | [by sbrin](https://github.com/sbrin/flipperzero_pomodoro) |  | [![UFW Badge]](https://lab.flipper.net/apps/pomodoro_timer) |
-| QR Code | ![Tools Badge] | [by bmatcuk](https://github.com/bmatcuk/flipperzero-qrcode) |  | ![None Badge] |
-| Resistance calculator | ![Tools Badge] | [by instantiator](https://github.com/instantiator/flipper-zero-experimental-apps) |  | [![UFW Badge]](https://lab.flipper.net/apps/resistors) |
-| Simple calendar app | ![Tools Badge] | [by Adiras](https://github.com/Adiras/flipperzero-calendar) |  | ![None Badge] |
-| Programmer Calculator | ![Tools Badge] | [by armixz](https://github.com/armixz/Flipper-Zero-Programmer-Calculator) |  | ![None Badge] |
-| Tone Generator | ![Tools Badge] | [by GEMISIS](https://github.com/GEMISIS/tone_gen/) |  | ![None Badge] |
-| DCF77 Clock Sync | ![Tools Badge] | [by mdaskalov](https://github.com/mdaskalov/dcf77-clock-sync) |  | ![None Badge] |
-| USB HID Autofire | ![USB Badge] | [by pbek](https://github.com/pbek/usb_hid_autofire) |  | ![None Badge] |
-| USB Consumer Control | ![USB Badge] | [by WithSecureLabs](https://github.com/WithSecureLabs/usb-consumer-control/tree/main) |  | ![None Badge] |
-| HID File Transfer | ![USB Badge] | [by Kavakuo](https://github.com/Kavakuo/HID-File-Transfer) | Get client app in [original repo](https://github.com/Kavakuo/HID-File-Transfer) | ![None Badge] |
-
-
-#### Catalog links checked at `01 Sep 16:24 GMT +3`
-
---- 
-
-Useful source of files for flipper, also has apps pack:
-## [UberGuidoZ Playground - Large collection of files - Github](https://github.com/UberGuidoZ/Flipper)
-
-[RFID Badge]: https://custom-icon-badges.demolab.com/badge/-RFID-rgb(255,244,147)?style=for-the-badge&logo=fz-rfid&logoColor=black
-[iButton Badge]: https://custom-icon-badges.demolab.com/badge/-iButton-rgb(225,187,166)?style=for-the-badge&logo=fz-ibutton&logoColor=black
-[SubGhz Badge]: https://custom-icon-badges.demolab.com/badge/-Sub--GHz-rgb(165,244,190)?style=for-the-badge&logo=fz-subghz&logoColor=black
-[GPIO Badge]: https://custom-icon-badges.demolab.com/badge/-GPIO-rgb(167,242,234)?style=for-the-badge&logo=fz-gpio&logoColor=black
-[Tools Badge]: https://custom-icon-badges.demolab.com/badge/-Tools-rgb(223,241,89)?style=for-the-badge&logo=fz-tools&logoColor=black
-[Media Badge]: https://custom-icon-badges.demolab.com/badge/-Media-rgb(223,181,255)?style=for-the-badge&logo=fz-media&logoColor=black
-[BT Badge]: https://custom-icon-badges.demolab.com/badge/-BlueTooth-rgb(139,172,255)?style=for-the-badge&logo=fz-bluetooth&logoColor=black
-[NFC Badge]: https://custom-icon-badges.demolab.com/badge/-NFC-rgb(152,206,254)?style=for-the-badge&logo=fz-nfc&logoColor=black
-[USB Badge]: https://custom-icon-badges.demolab.com/badge/-USB-rgb(255,190,233)?style=for-the-badge&logo=fz-badusb&logoColor=black
-[IR Badge]: https://custom-icon-badges.demolab.com/badge/-Infrared-rgb(254,147,140)?style=for-the-badge&logo=fz-infrared&logoColor=black
-[Games Badge]: https://custom-icon-badges.demolab.com/badge/-Games-rgb(255,196,134)?style=for-the-badge&logo=fz-games&logoColor=black
-
-[UFW Badge]: https://img.shields.io/badge/by_UFW-%2314D411?style=flat-square
-[Official Badge]: https://img.shields.io/badge/by_OFW-%23FF8200?style=flat-square
-[Author Badge]: https://img.shields.io/badge/by_author-%23FFFF00?style=flat-square
-[None Badge]: https://img.shields.io/badge/None-%23FF0000?style=flat-square

+ 0 - 0
apps_broken_by_last_refactors/mifare_nested/TODO.md → TODO.md


+ 5 - 8
apps_broken_by_last_refactors/mifare_nested/application.fam → application.fam

@@ -3,23 +3,20 @@ App(
     name="Mifare Nested",
     apptype=FlipperAppType.EXTERNAL,
     entry_point="mifare_nested_app",
-    requires=[
-        "storage",
-        "gui",
-        "nfc"
-    ],
+    requires=["storage", "gui"],
     stack_size=4 * 1024,
     order=30,
     fap_icon="assets/icon.png",
     fap_category="NFC",
     fap_private_libs=[
+        Lib(name="nfclegacy"),
         Lib(name="nested"),
         Lib(name="parity"),
-        Lib(name="crypto1")
+        Lib(name="crypto1"),
     ],
     fap_icon_assets="assets",
-    fap_author="AloneLiberty",
+    fap_author="AloneLiberty & xMasterX",
     fap_description="Recover Mifare Classic keys",
     fap_weburl="https://github.com/AloneLiberty/FlipperNested",
-    fap_version="1.5.2"
+    fap_version="1.6.5",
 )

+ 0 - 1
apps_broken_by_last_refactors/bt_serial_example/README.md

@@ -1 +0,0 @@
-Flipper Zero BT Serial Example App

+ 0 - 13
apps_broken_by_last_refactors/bt_serial_example/application.fam

@@ -1,13 +0,0 @@
-App(
-    appid="fbs",
-    name="BT Serial App",
-    apptype=FlipperAppType.EXTERNAL,
-    entry_point="fbs_app",
-    stack_size=1 * 1024,
-    requires=[
-        "bt",
-        "gui",
-    ],
-    fap_category="Bluetooth",
-    fap_icon="uart_10px.png",
-)

+ 0 - 108
apps_broken_by_last_refactors/bt_serial_example/fbs.c

@@ -1,108 +0,0 @@
-#include "fbs.h"
-
-const uint16_t BT_SERIAL_BUFFER_SIZE = 128;
-
-void draw_callback(Canvas* canvas, void* ctx) {
-    FBS* app = ctx;
-    furi_check(furi_mutex_acquire(app->app_mutex, FuriWaitForever) == FuriStatusOk);
-
-    canvas_draw_str_aligned(canvas, 64, 17, AlignCenter, AlignCenter, "App is running");
-    canvas_draw_str_aligned(canvas, 64, 27, AlignCenter, AlignCenter, "Please open CLI");
-    canvas_draw_str_aligned(canvas, 64, 37, AlignCenter, AlignCenter, "and type: log info");
-
-    furi_mutex_release(app->app_mutex);
-}
-
-void input_callback(InputEvent* input, void* ctx) {
-    FBS* app = ctx;
-    furi_message_queue_put(app->event_queue, input, FuriWaitForever);
-}
-
-FBS* fbs_alloc() {
-    FBS* app = malloc(sizeof(FBS));
-    app->app_mutex = furi_mutex_alloc(FuriMutexTypeNormal);
-    app->event_queue = furi_message_queue_alloc(8, sizeof(InputEvent));
-
-    app->gui = furi_record_open(RECORD_GUI);
-    app->view_port = view_port_alloc();
-    view_port_draw_callback_set(app->view_port, draw_callback, app);
-    view_port_input_callback_set(app->view_port, input_callback, app);
-    gui_add_view_port(app->gui, app->view_port, GuiLayerFullscreen);
-
-    app->bt_connected = false;
-    app->bt = furi_record_open(RECORD_BT);
-    return app;
-}
-
-void fbs_free(FBS* app) {
-    view_port_enabled_set(app->view_port, false);
-    gui_remove_view_port(app->gui, app->view_port);
-    furi_record_close(RECORD_GUI);
-    app->gui = NULL;
-    view_port_free(app->view_port);
-
-    furi_mutex_free(app->app_mutex);
-    furi_message_queue_free(app->event_queue);
-
-    furi_record_close(RECORD_BT);
-    app->bt = NULL;
-
-    free(app);
-}
-
-static uint16_t bt_serial_event_callback(SerialServiceEvent event, void* context) {
-    furi_assert(context);
-    Bt* bt = context;
-    UNUSED(bt);
-    uint16_t ret = 0;
-
-    if(event.event == SerialServiceEventTypeDataReceived) {
-        FURI_LOG_I(TAG, "SerialServiceEventTypeDataReceived");
-        FURI_LOG_I(TAG, "Size: %u", event.data.size);
-        FURI_LOG_I(TAG, "Data: ");
-        for(size_t i = 0; i < event.data.size; i++) {
-            printf("%X ", event.data.buffer[i]);
-        }
-        printf("\r\n");
-    } else if(event.event == SerialServiceEventTypeDataSent) {
-        FURI_LOG_I(TAG, "SerialServiceEventTypeDataSent");
-        FURI_LOG_I(TAG, "Size: %u", event.data.size);
-        FURI_LOG_I(TAG, "Data: ");
-        for(size_t i = 0; i < event.data.size; i++) {
-            printf("%X ", event.data.buffer[i]);
-        }
-        printf("\r\n");
-    }
-    return ret;
-}
-
-int32_t fbs_app(void* p) {
-    UNUSED(p);
-    FBS* app = fbs_alloc();
-
-    if(furi_hal_bt_is_active()) {
-        FURI_LOG_I(TAG, "BT is working, hijacking the serial connection...");
-        furi_hal_bt_serial_set_event_callback(
-            BT_SERIAL_BUFFER_SIZE, bt_serial_event_callback, app);
-        furi_hal_bt_start_advertising();
-    } else {
-        FURI_LOG_I(TAG, "Please, enable the Bluetooth and restart the app");
-    }
-
-    InputEvent event;
-    for(bool processing = true; processing;) {
-        int status = furi_message_queue_get(app->event_queue, &event, 100);
-        furi_check(furi_mutex_acquire(app->app_mutex, FuriWaitForever) == FuriStatusOk);
-        if(status == FuriStatusOk && event.type == InputTypePress && event.key == InputKeyBack) {
-            processing = false;
-        }
-        furi_mutex_release(app->app_mutex);
-        view_port_update(app->view_port);
-    }
-
-    furi_hal_bt_serial_set_event_callback(0, NULL, NULL);
-
-    fbs_free(app);
-    FURI_LOG_I(TAG, "Released everything");
-    return 0;
-}

+ 0 - 21
apps_broken_by_last_refactors/bt_serial_example/fbs.h

@@ -1,21 +0,0 @@
-#pragma once
-
-#include <furi.h>
-#include <furi_hal_bt.h>
-#include <furi_hal_bt_serial.h>
-#include <bt/bt_service/bt.h>
-#include <gui/gui.h>
-#include <gui/view.h>
-
-#define TAG "FlipperBTSerial"
-
-typedef struct {
-    Bt* bt;
-    bool bt_connected;
-
-    ViewPort* view_port;
-    Gui* gui;
-
-    FuriMutex* app_mutex;
-    FuriMessageQueue* event_queue;
-} FBS;

TEMPAT SAMPAH
apps_broken_by_last_refactors/bt_serial_example/uart_10px.png


+ 0 - 674
apps_broken_by_last_refactors/cli_bridge/LICENSE

@@ -1,674 +0,0 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <https://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program>  Copyright (C) <year>  <name of author>
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<https://www.gnu.org/licenses/>.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-<https://www.gnu.org/licenses/why-not-lgpl.html>.

+ 0 - 10
apps_broken_by_last_refactors/cli_bridge/application.fam

@@ -1,10 +0,0 @@
-App(
-    appid="cli_gui",
-    name="CLI-GUI Bridge",
-    apptype=FlipperAppType.EXTERNAL,
-    entry_point="cligui_main",
-    requires=["gui", "cli"],
-    stack_size=8 * 1024,
-    fap_icon="cligui.png",
-    fap_category="Tools",
-)

+ 0 - 104
apps_broken_by_last_refactors/cli_bridge/cli_control.c

@@ -1,104 +0,0 @@
-#include "cli_control.h"
-
-#include <cli/cli.h>
-#include <cli/cli_i.h>
-#include <cli/cli_vcp.h>
-#include "cligui_main_i.h"
-#include <FreeRTOS.h>
-
-volatile bool gotCallbackSet = false;
-
-FuriStreamBuffer* tx_stream;
-FuriStreamBuffer* rx_stream;
-static FuriThread* volatile cliThread = NULL;
-static void tx_handler_stdout(const char* buffer, size_t size) {
-    furi_stream_buffer_send(tx_stream, buffer, size, FuriWaitForever);
-}
-static void tx_handler(const uint8_t* buffer, size_t size) {
-    furi_thread_set_stdout_callback(tx_handler_stdout);
-    cliThread = furi_thread_get_current();
-    furi_stream_buffer_send(tx_stream, buffer, size, FuriWaitForever);
-}
-static size_t real_rx_handler(uint8_t* buffer, size_t size, uint32_t timeout) {
-    size_t rx_cnt = 0;
-    while(size > 0) {
-        size_t batch_size = size;
-        if(batch_size > 128) batch_size = 128;
-        size_t len = furi_stream_buffer_receive(rx_stream, buffer, batch_size, timeout);
-        if(len == 0) break;
-        size -= len;
-        buffer += len;
-        rx_cnt += len;
-    }
-    return rx_cnt;
-}
-
-static CliCommand_internal* getInternalCliCommand(Cli* cli, const char* name) {
-    FuriString* target_command = furi_string_alloc();
-    furi_string_set_str(target_command, name);
-    CliCommand_internal* command =
-        CliCommandTree_internal_get(((Cli_internal*)cli)->commands, target_command);
-    furi_string_free(target_command);
-    return command;
-}
-
-static void session_init(void) {
-}
-static void session_deinit(void) {
-}
-static bool session_connected(void) {
-    return true;
-}
-static CliSession session;
-void latch_tx_handler() {
-    Cli* global_cli = furi_record_open(RECORD_CLI);
-
-    CliCommand_internal* help_command = getInternalCliCommand(global_cli, "help");
-    cliThread = help_command->context;
-
-    furi_thread_set_stdout_callback(tx_handler_stdout);
-    if(cliThread != NULL) {
-        ((FuriThread_internal*)cliThread)->output.write_callback = &tx_handler_stdout;
-    }
-
-    rx_stream = furi_stream_buffer_alloc(128, 1);
-    tx_stream = furi_stream_buffer_alloc(128, 1);
-
-    session.tx = &tx_handler;
-    session.rx = &real_rx_handler;
-    session.tx_stdout = &tx_handler_stdout;
-    session.init = &session_init;
-    session.deinit = &session_deinit;
-    session.is_connected = &session_connected;
-    cli_session_close(global_cli);
-    cli_session_open(global_cli, &session);
-    furi_record_close(RECORD_CLI);
-}
-void unlatch_tx_handler(bool persist) {
-    Cli* global_cli = furi_record_open(RECORD_CLI);
-    // Stash cliThread if not null
-    if(cliThread != NULL) {
-        CliCommand_internal* help_command = getInternalCliCommand(global_cli, "help");
-        help_command->context = cliThread;
-    }
-    // Switch to new session
-    if(persist) {
-        // Use dummy debug firmware function as is_connected
-        cli_vcp.is_connected = &furi_hal_version_do_i_belong_here;
-    } else {
-        // Send CTRL-C
-        char eot = 0x03;
-        furi_stream_buffer_send(rx_stream, &eot, 1, FuriWaitForever);
-    }
-    cli_session_open(global_cli, &cli_vcp);
-    furi_record_close(RECORD_CLI);
-    // Unblock waiting rx handler
-    furi_stream_buffer_send(rx_stream, "_", 1, FuriWaitForever);
-    // Reconfigure stdout_callback to cli_vcp
-    if(cliThread != NULL) {
-        ((FuriThread_internal*)cliThread)->output.write_callback = cli_vcp.tx_stdout;
-    }
-    // At this point, all cli_vcp functions should be back.
-    furi_stream_buffer_free(rx_stream);
-    furi_stream_buffer_free(tx_stream);
-}

+ 0 - 8
apps_broken_by_last_refactors/cli_bridge/cli_control.h

@@ -1,8 +0,0 @@
-#pragma once
-
-#include <furi.h>
-#include <furi_hal.h>
-extern void latch_tx_handler();
-extern void unlatch_tx_handler(bool persist);
-extern FuriStreamBuffer* tx_stream;
-extern FuriStreamBuffer* rx_stream;

TEMPAT SAMPAH
apps_broken_by_last_refactors/cli_bridge/cligui.png


+ 0 - 147
apps_broken_by_last_refactors/cli_bridge/cligui_main.c

@@ -1,147 +0,0 @@
-#include "cligui_main_i.h"
-#include "cli_control.h"
-#include "text_input.h"
-#include "console_output.h"
-#include <loader/loader_i.h>
-
-static bool cligui_custom_event_cb(void* context, uint32_t event) {
-    UNUSED(event);
-    CliguiApp* app = context;
-    UNUSED(app);
-    return true;
-}
-static bool cligui_back_event_cb(void* context) {
-    CliguiApp* app = context;
-    UNUSED(app);
-    return true;
-}
-static void cligui_tick_event_cb(void* context) {
-    CliguiApp* app = context;
-    size_t available = furi_stream_buffer_bytes_available(app->data->streams.app_rx);
-    for(size_t i = 0; i < available; i++) {
-        char c = 0;
-        size_t len = furi_stream_buffer_receive(app->data->streams.app_rx, &c, 1, 100);
-        if(len > 0) {
-            furi_string_push_back(app->text_box_store, c);
-        }
-    }
-    if(available > 0) {
-        text_box_set_text(app->text_box, furi_string_get_cstr(app->text_box_store));
-    }
-    // Set input header stuff
-    size_t len = furi_string_size(app->text_box_store);
-    size_t idx = len - 2;
-    while(idx > 0) {
-        if(furi_string_get_char(app->text_box_store, idx) == '\n') {
-            idx++;
-            break;
-        }
-        idx--;
-    }
-    text_input_set_header_text(app->text_input, furi_string_get_cstr(app->text_box_store) + idx);
-    UNUSED(app);
-}
-
-ViewPortInputCallback prev_input_callback;
-volatile bool persistent_exit = false;
-static void input_callback_wrapper(InputEvent* event, void* context) {
-    CliguiApp* app = context;
-    if(event->type == InputTypeLong && event->key == InputKeyBack) {
-        persistent_exit = false;
-        view_dispatcher_stop(app->view_dispatcher);
-    }
-    if(event->type == InputTypeLong && event->key == InputKeyOk) {
-        if(app->data->state == ViewConsoleOutput) {
-            persistent_exit = true;
-            view_dispatcher_stop(app->view_dispatcher);
-        }
-    }
-    if(app->data->state == ViewTextInput) {
-        text_input_input_handler(app, event);
-    } else {
-        console_output_input_handler(app, event);
-    }
-    prev_input_callback(event, app->view_dispatcher);
-}
-
-int32_t cligui_main(void* p) {
-    UNUSED(p);
-
-    // Unlock loader-lock and save app thread
-    FuriThread* temp_save_appthr;
-    Loader* loader = furi_record_open(RECORD_LOADER);
-    temp_save_appthr = loader->app.thread;
-    loader->app.thread = NULL;
-    furi_record_close(RECORD_LOADER);
-
-    CliguiApp* cligui = malloc(sizeof(CliguiApp));
-    cligui->data = malloc(sizeof(CliguiData));
-
-    latch_tx_handler();
-    cligui->data->streams.app_tx = rx_stream;
-    cligui->data->streams.app_rx = tx_stream;
-
-    cligui->gui = furi_record_open(RECORD_GUI);
-    cligui->view_dispatcher = view_dispatcher_alloc();
-    cligui->view_dispatcher_i = (ViewDispatcher_internal*)(cligui->view_dispatcher);
-    prev_input_callback =
-        ((ViewPort_internal*)cligui->view_dispatcher_i->view_port)->input_callback;
-    view_port_input_callback_set(
-        cligui->view_dispatcher_i->view_port, input_callback_wrapper, cligui);
-    view_dispatcher_enable_queue(cligui->view_dispatcher);
-    view_dispatcher_set_event_callback_context(cligui->view_dispatcher, cligui);
-    view_dispatcher_set_custom_event_callback(cligui->view_dispatcher, cligui_custom_event_cb);
-    view_dispatcher_set_navigation_event_callback(cligui->view_dispatcher, cligui_back_event_cb);
-    view_dispatcher_set_tick_event_callback(cligui->view_dispatcher, cligui_tick_event_cb, 100);
-
-    view_dispatcher_attach_to_gui(
-        cligui->view_dispatcher, cligui->gui, ViewDispatcherTypeFullscreen);
-
-    view_dispatcher_send_to_front(cligui->view_dispatcher);
-
-    cligui->text_box = text_box_alloc();
-    view_dispatcher_add_view(
-        cligui->view_dispatcher, ViewConsoleOutput, text_box_get_view(cligui->text_box));
-    cligui->text_box_store = furi_string_alloc();
-    furi_string_reserve(cligui->text_box_store, TEXT_BOX_STORE_SIZE);
-    furi_string_set_char(cligui->text_box_store, 0, 0);
-    text_box_set_text(cligui->text_box, furi_string_get_cstr(cligui->text_box_store));
-    text_box_set_focus(cligui->text_box, TextBoxFocusEnd);
-
-    cligui->text_input = text_input_alloc();
-    text_input_set_result_callback(
-        cligui->text_input,
-        text_input_result_callback,
-        cligui,
-        cligui->text_input_store,
-        TEXT_INPUT_STORE_SIZE,
-        true);
-    view_dispatcher_add_view(
-        cligui->view_dispatcher, ViewTextInput, text_input_get_view(cligui->text_input));
-
-    view_dispatcher_switch_to_view(cligui->view_dispatcher, ViewTextInput);
-    cligui->data->state = ViewTextInput;
-
-    view_dispatcher_run(cligui->view_dispatcher);
-
-    view_dispatcher_remove_view(cligui->view_dispatcher, ViewConsoleOutput);
-    view_dispatcher_remove_view(cligui->view_dispatcher, ViewTextInput);
-    text_box_free(cligui->text_box);
-    furi_string_free(cligui->text_box_store);
-    text_input_free(cligui->text_input);
-    view_dispatcher_free(cligui->view_dispatcher);
-
-    unlatch_tx_handler(persistent_exit);
-
-    furi_record_close(RECORD_GUI);
-
-    free(cligui->data);
-    free(cligui);
-
-    // We restoring previous app thread here, we love kostily and velosipedy, bydlo kod forever!
-    loader = furi_record_open(RECORD_LOADER);
-    loader->app.thread = temp_save_appthr;
-    furi_record_close(RECORD_LOADER);
-
-    return 0;
-}

+ 0 - 41
apps_broken_by_last_refactors/cli_bridge/cligui_main_i.h

@@ -1,41 +0,0 @@
-#pragma once
-
-#include <furi.h>
-#include <furi_hal.h>
-#include <furi_hal_version.h>
-#include <furi_hal_usb_cdc.h>
-#include <furi_hal_usb.h>
-#include <gui/gui.h>
-#include <gui/view_dispatcher.h>
-#include <gui/modules/text_box.h>
-#include <gui/modules/text_input.h>
-#include <m-dict.h>
-#include <loader/loader.h>
-#include "internal_defs.h"
-
-#define TEXT_BOX_STORE_SIZE (4096)
-#define TEXT_INPUT_STORE_SIZE (512)
-
-typedef enum {
-    ViewTextInput,
-    ViewConsoleOutput,
-} CliguiState;
-
-typedef struct {
-    CliguiState state;
-    struct {
-        FuriStreamBuffer* app_tx;
-        FuriStreamBuffer* app_rx;
-    } streams;
-} CliguiData;
-
-typedef struct {
-    CliguiData* data;
-    Gui* gui;
-    TextBox* text_box;
-    FuriString* text_box_store;
-    char text_input_store[TEXT_INPUT_STORE_SIZE + 1];
-    TextInput* text_input;
-    ViewDispatcher* view_dispatcher;
-    ViewDispatcher_internal* view_dispatcher_i;
-} CliguiApp;

+ 0 - 12
apps_broken_by_last_refactors/cli_bridge/console_output.c

@@ -1,12 +0,0 @@
-#include "console_output.h"
-
-void console_output_input_handler(CliguiApp* app, InputEvent* event) {
-    if(event->type == InputTypeShort && (event->key == InputKeyOk || event->key == InputKeyLeft)) {
-        view_dispatcher_switch_to_view(app->view_dispatcher, ViewTextInput);
-        app->data->state = ViewTextInput;
-    }
-    if(event->type == InputTypeShort && event->key == InputKeyBack) {
-        char eot = 0x03;
-        furi_stream_buffer_send(app->data->streams.app_tx, &eot, 1, FuriWaitForever);
-    }
-}

+ 0 - 4
apps_broken_by_last_refactors/cli_bridge/console_output.h

@@ -1,4 +0,0 @@
-#pragma once
-#include "cligui_main_i.h"
-
-extern void console_output_input_handler(CliguiApp*, InputEvent*);

+ 0 - 101
apps_broken_by_last_refactors/cli_bridge/internal_defs.h

@@ -1,101 +0,0 @@
-#pragma once
-#include <furi.h>
-#include <furi_hal.h>
-#include <m-dict.h>
-#include <m-bptree.h>
-#include <m-array.h>
-#include <cli/cli.h>
-#include <gui/gui.h>
-#include <gui/view_dispatcher.h>
-#include <gui/modules/menu.h>
-#include <gui/modules/submenu.h>
-
-typedef struct {
-    FuriThreadStdoutWriteCallback write_callback;
-    FuriString* buffer;
-} FuriThreadStdout_internal;
-
-typedef struct {
-    bool is_service;
-    FuriThreadState state;
-    int32_t ret;
-
-    FuriThreadCallback callback;
-    void* context;
-
-    FuriThreadStateCallback state_callback;
-    void* state_context;
-
-    char* name;
-    configSTACK_DEPTH_TYPE stack_size;
-    FuriThreadPriority priority;
-
-    TaskHandle_t task_handle;
-    bool heap_trace_enabled;
-    size_t heap_size;
-
-    FuriThreadStdout_internal output;
-} FuriThread_internal;
-
-DICT_DEF2(ViewDict, uint32_t, M_DEFAULT_OPLIST, View*, M_PTR_OPLIST)
-typedef struct {
-    FuriMessageQueue* queue;
-    Gui* gui;
-    ViewPort* view_port;
-    ViewDict_t views;
-
-    View* current_view;
-
-    View* ongoing_input_view;
-    uint8_t ongoing_input;
-
-    ViewDispatcherCustomEventCallback custom_event_callback;
-    ViewDispatcherNavigationEventCallback navigation_event_callback;
-    ViewDispatcherTickEventCallback tick_event_callback;
-    uint32_t tick_period;
-    void* event_context;
-} ViewDispatcher_internal;
-
-typedef struct {
-    Gui* gui;
-    FuriMutex* mutex;
-    bool is_enabled;
-    ViewPortOrientation orientation;
-
-    uint8_t width;
-    uint8_t height;
-
-    ViewPortDrawCallback draw_callback;
-    void* draw_callback_context;
-
-    ViewPortInputCallback input_callback;
-    void* input_callback_context;
-} ViewPort_internal;
-
-typedef struct {
-    CliCallback callback;
-    void* context;
-    uint32_t flags;
-} CliCommand_internal;
-
-#define CLI_COMMANDS_TREE_RANK 4
-BPTREE_DEF2(
-    CliCommandTree_internal,
-    CLI_COMMANDS_TREE_RANK,
-    FuriString*,
-    FURI_STRING_OPLIST,
-    CliCommand_internal,
-    M_POD_OPLIST)
-
-#define M_OPL_CliCommandTree_internal_t() BPTREE_OPLIST(CliCommandTree_internal, M_POD_OPLIST)
-
-typedef struct {
-    CliCommandTree_internal_t commands;
-    void* mutex;
-    void* idle_sem;
-    void* last_line;
-    void* line;
-    void* session;
-
-    size_t cursor_position;
-} Cli_internal;

+ 0 - 34
apps_broken_by_last_refactors/cli_bridge/text_input.c

@@ -1,34 +0,0 @@
-#include "text_input.h"
-#include "cligui_main_i.h"
-
-void text_input_result_callback(void* ctx) {
-    CliguiApp* app = ctx;
-    char* data = app->text_input_store;
-    size_t len = strlen(data);
-    for(size_t i = 0; i < len; i++) {
-        if(data[i] >= 0x41 && data[i] <= 0x5A) {
-            // Char is uppercase
-            data[i] += 0x20;
-        }
-    }
-    furi_stream_buffer_send(app->data->streams.app_tx, data, len, FuriWaitForever);
-    furi_stream_buffer_send(app->data->streams.app_tx, "\r\n", 2, FuriWaitForever);
-    data[0] = 0;
-    view_dispatcher_switch_to_view(app->view_dispatcher, ViewConsoleOutput);
-    app->data->state = ViewConsoleOutput;
-}
-
-void text_input_input_handler(CliguiApp* app, InputEvent* event) {
-    if(event->type == InputTypeShort && event->key == InputKeyBack) {
-        // view_dispatcher_switch_to_view(app->view_dispatcher, ViewConsoleOutput);
-        // app->data->state = ViewConsoleOutput;
-        size_t len = strlen(app->text_input_store);
-        app->text_input_store[len] = ' ';
-        app->text_input_store[len + 1] = 0;
-    }
-    if(event->type == InputTypeLong &&
-       (event->key == InputKeyLeft || event->key == InputKeyRight)) {
-        view_dispatcher_switch_to_view(app->view_dispatcher, ViewConsoleOutput);
-        app->data->state = ViewConsoleOutput;
-    }
-}

+ 0 - 5
apps_broken_by_last_refactors/cli_bridge/text_input.h

@@ -1,5 +0,0 @@
-#pragma once
-#include "cligui_main_i.h"
-
-extern void text_input_result_callback(void* ctx);
-extern void text_input_input_handler(CliguiApp*, InputEvent*);

+ 0 - 21
apps_broken_by_last_refactors/tas_playback/LICENSE

@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2017 rcombs
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.

+ 0 - 11
apps_broken_by_last_refactors/tas_playback/README.md

@@ -1,11 +0,0 @@
-# TAS playback, now on Flipper!
-
-This app plays back TAS files for retro video games. Connect the GPIO pins to the console's controller port and select a file to play back.
-
-Currently only the Nintendo 64 is supported.
-
-## Consoles
-
-N64: Mupen64 .m64 files
-- Ground (black wire, right pin on console) to any GND pin
-- Data (green wire, center pin) to 16/C0

+ 0 - 767
apps_broken_by_last_refactors/tas_playback/WString.cpp

@@ -1,767 +0,0 @@
-/*
-  WString.cpp - String library for Wiring & Arduino
-  ...mostly rewritten by Paul Stoffregen...
-  Copyright (c) 2009-10 Hernando Barragan.  All rights reserved.
-  Copyright 2011, Paul Stoffregen, paul@pjrc.com
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Lesser General Public
-  License as published by the Free Software Foundation; either
-  version 2.1 of the License, or (at your option) any later version.
-
-  This library is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public
-  License along with this library; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-
-#include <furi.h>
-#include "avr_functions.h"
-#include "WString.h"
-
-/*********************************************/
-/*  Constructors                             */
-/*********************************************/
-
-String::String(const char *cstr)
-{
-	init();
-	if (cstr) copy(cstr, strlen(cstr));
-}
-
-String::String(const __FlashStringHelper *pgmstr)
-{
-	init();
-	*this = pgmstr;
-}
-
-String::String(const String &value)
-{
-	init();
-	*this = value;
-}
-
-#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
-String::String(String &&rval)
-{
-	init();
-	move(rval);
-}
-String::String(StringSumHelper &&rval)
-{
-	init();
-	move(rval);
-}
-#endif
-
-String::String(char c)
-{
-	init();
-	*this = c;
-}
-
-String::String(unsigned char c)
-{
-	init();
-	char buf[4];
-	ultoa(c, buf, 10);
-	*this = buf;
-}
-
-String::String(const int value, unsigned char base)
-{
-	init();
-	char buf[34];
-	ltoa(value, buf, base);
-	*this = buf;
-}
-
-String::String(unsigned int value, unsigned char base)
-{
-	init();
-	char buf[33];
-  	ultoa(value, buf, base);
-	*this = buf;
-}
-
-String::String(long value, unsigned char base)
-{
-	init();
-	char buf[34];
-	ltoa(value, buf, base);
-	*this = buf;
-}
-
-String::String(unsigned long value, unsigned char base)
-{
-	init();
-	char buf[33];
-	ultoa(value, buf, base);
-	*this = buf;
-}
-
-String::String(long long value, unsigned char base)
-{
-	init();
-	char buf[66];
-	lltoa(value, buf, base);
-	*this = buf;
-}
-
-String::String(unsigned long long value, unsigned char base)
-{
-	init();
-	char buf[65];
-	ulltoa(value, buf, base);
-	*this = buf;
-}
-
-String::String(float num, unsigned char digits)
-{
-	init();
-	char buf[40];
-	*this = dtostrf(num, digits + 2, digits, buf);
-}
-
-String::~String()
-{
-	free(buffer);
-}
-
-/*********************************************/
-/*  Memory Management                        */
-/*********************************************/
-
-inline void String::init(void)
-{
-	buffer = NULL;
-	capacity = 0;
-	len = 0;
-	flags = 0;
-}
-
-unsigned char String::reserve(unsigned int size)
-{
-	if (capacity >= size) return 1;
-	if (changeBuffer(size)) {
-		if (len == 0) buffer[0] = 0;
-		return 1;
-	}
-	return 0;
-}
-
-unsigned char String::changeBuffer(unsigned int maxStrLen)
-{
-	char *newbuffer = (char *)realloc(buffer, maxStrLen + 1);
-	if (newbuffer) {
-		buffer = newbuffer;
-		capacity = maxStrLen;
-		return 1;
-	}
-	return 0;
-}
-
-/*********************************************/
-/*  Copy and Move                            */
-/*********************************************/
-
-String & String::copy(const char *cstr, unsigned int length)
-{
-	if (length == 0) {
-		if (buffer) buffer[0] = 0;
-		len = 0;
-		return *this;
-	}
-	if (!reserve(length)) {
-		if (buffer) {
-			free(buffer);
-			buffer = NULL;
-		}
-		len = capacity = 0;
-		return *this;
-	}
-	len = length;
-	strcpy(buffer, cstr);
-	return *this;
-}
-
-void String::move(String &rhs)
-{
-	if (&rhs == this) return;
-	if (buffer) free(buffer);
-	buffer = rhs.buffer;
-	capacity = rhs.capacity;
-	len = rhs.len;
-	rhs.buffer = NULL;
-	rhs.capacity = 0;
-	rhs.len = 0;
-}
-
-String & String::operator = (const String &rhs)
-{
-	if (this == &rhs) return *this;
-	return copy(rhs.buffer, rhs.len);
-}
-
-#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
-String & String::operator = (String &&rval)
-{
-	if (this != &rval) move(rval);
-	return *this;
-}
-
-String & String::operator = (StringSumHelper &&rval)
-{
-	if (this != &rval) move(rval);
-	return *this;
-}
-#endif
-
-String & String::operator = (const char *cstr)
-{
-	if (cstr) {
-		copy(cstr, strlen(cstr));
-	} else {
-		len = 0;
-	}
-	return *this;
-}
-
-String & String::operator = (const __FlashStringHelper *pgmstr)
-{
-	copy(pgmstr);
-	return *this;
-}
-
-String & String::operator = (char c)
-{
-	char buf[2];
-	buf[0] = c;
-	buf[1] = 0;
-	return copy(buf, 1);
-}
-
-/*********************************************/
-/*  Append                                   */
-/*********************************************/
-
-String & String::append(const String &s)
-{
-	return append(s.buffer, s.len);
-}
-
-String & String::append(const char *cstr, unsigned int length)
-{
-	unsigned int newlen = len + length;
-	bool self = false;
-	unsigned int buffer_offset;
-	if ( (cstr >= buffer) && (cstr < (buffer+len) ) ) {
-		self = true;
-		buffer_offset = (unsigned int)(cstr-buffer);
-	}
-	if (length == 0 || !reserve(newlen)) return *this;
-	if ( self ) {
-		memcpy(buffer + len, buffer+buffer_offset, length);
-		buffer[newlen] = 0;
-		}
-	else
-		strcpy(buffer + len, cstr);
-	len = newlen;
-	return *this;
-}
-
-String & String::append(const char *cstr)
-{
-	if (cstr) append(cstr, strlen(cstr));
-	return *this;
-}
-
-String & String::append(char c)
-{
-	char buf[2];
-	buf[0] = c;
-	buf[1] = 0;
-	append(buf, 1);
-	return *this;
-}
-
-String & String::append(int num)
-{
-	char buf[12];
-	ltoa((long)num, buf, 10);
-	append(buf, strlen(buf));
-	return *this;
-}
-
-String & String::append(unsigned int num)
-{
-	char buf[11];
-	ultoa((unsigned long)num, buf, 10);
-	append(buf, strlen(buf));
-	return *this;
-}
-
-String & String::append(long num)
-{
-	char buf[12];
-	ltoa(num, buf, 10);
-	append(buf, strlen(buf));
-	return *this;
-}
-
-String & String::append(unsigned long num)
-{
-	char buf[11];
-	ultoa(num, buf, 10);
-	append(buf, strlen(buf));
-	return *this;
-}
-
-String & String::append(long long num)
-{
-	char buf[22];
-	lltoa(num, buf, 10);
-	append(buf, strlen(buf));
-	return *this;
-}
-
-String & String::append(unsigned long long num)
-{
-	char buf[21];
-	ulltoa(num, buf, 10);
-	append(buf, strlen(buf));
-	return *this;
-}
-
-String & String::append(float num)
-{
-	char buf[30];
-	dtostrf(num, 4, 2, buf);
-	append(buf, strlen(buf));
-	return *this;
-}
-
-
-/*********************************************/
-/*  Concatenate                              */
-/*********************************************/
-
-
-StringSumHelper & operator + (const StringSumHelper &lhs, const String &rhs)
-{
-	StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
-	a.append(rhs.buffer, rhs.len);
-	return a;
-}
-
-StringSumHelper & operator + (const StringSumHelper &lhs, const char *cstr)
-{
-	StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
-	if (cstr) a.append(cstr, strlen(cstr));
-	return a;
-}
-
-StringSumHelper & operator + (const StringSumHelper &lhs, const __FlashStringHelper *pgmstr)
-{
-	StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
-	a.append(pgmstr);
-	return a;
-}
-
-StringSumHelper & operator + (const StringSumHelper &lhs, char c)
-{
-	StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
-	a.append(c);
-	return a;
-}
-
-StringSumHelper & operator + (const StringSumHelper &lhs, unsigned char c)
-{
-	StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
-	a.append(c);
-	return a;
-}
-
-StringSumHelper & operator + (const StringSumHelper &lhs, int num)
-{
-	StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
-	a.append((long)num);
-	return a;
-}
-
-StringSumHelper & operator + (const StringSumHelper &lhs, unsigned int num)
-{
-	StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
-	a.append((unsigned long)num);
-	return a;
-}
-
-StringSumHelper & operator + (const StringSumHelper &lhs, long num)
-{
-	StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
-	a.append(num);
-	return a;
-}
-
-StringSumHelper & operator + (const StringSumHelper &lhs, unsigned long num)
-{
-	StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
-	a.append(num);
-	return a;
-}
-
-StringSumHelper & operator + (const StringSumHelper &lhs, long long num)
-{
-	StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
-	a.append(num);
-	return a;
-}
-
-StringSumHelper & operator + (const StringSumHelper &lhs, unsigned long long num)
-{
-	StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
-	a.append(num);
-	return a;
-}
-
-StringSumHelper & operator + (const StringSumHelper &lhs, float num)
-{
-	StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
-	a.append(num);
-	return a;
-}
-
-StringSumHelper & operator + (const StringSumHelper &lhs, double num)
-{
-	StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
-	a.append(num);
-	return a;
-}
-
-/*********************************************/
-/*  Comparison                               */
-/*********************************************/
-
-int String::compareTo(const String &s) const
-{
-	if (!buffer || !s.buffer) {
-		if (s.buffer && s.len > 0) return 0 - *(unsigned char *)s.buffer;
-		if (buffer && len > 0) return *(unsigned char *)buffer;
-		return 0;
-	}
-	return strcmp(buffer, s.buffer);
-}
-
-unsigned char String::equals(const String &s2) const
-{
-	return (len == s2.len && compareTo(s2) == 0);
-}
-
-unsigned char String::equals(const char *cstr) const
-{
-	if (len == 0) return (cstr == NULL || *cstr == 0);
-	if (cstr == NULL) return buffer[0] == 0;
-	return strcmp(buffer, cstr) == 0;
-}
-
-unsigned char String::operator<(const String &rhs) const
-{
-	return compareTo(rhs) < 0;
-}
-
-unsigned char String::operator>(const String &rhs) const
-{
-	return compareTo(rhs) > 0;
-}
-
-unsigned char String::operator<=(const String &rhs) const
-{
-	return compareTo(rhs) <= 0;
-}
-
-unsigned char String::operator>=(const String &rhs) const
-{
-	return compareTo(rhs) >= 0;
-}
-
-/*
-unsigned char String::equalsIgnoreCase( const String &s2 ) const
-{
-	if (this == &s2) return 1;
-	if (len != s2.len) return 0;
-	if (len == 0) return 1;
-	const char *p1 = buffer;
-	const char *p2 = s2.buffer;
-	while (*p1) {
-		if (tolower(*p1++) != tolower(*p2++)) return 0;
-	}
-	return 1;
-}
-*/
-
-unsigned char String::startsWith( const String &s2 ) const
-{
-	if (len < s2.len) return 0;
-	return startsWith(s2, 0);
-}
-
-unsigned char String::startsWith( const String &s2, unsigned int offset ) const
-{
-	if (offset > len - s2.len || !buffer || !s2.buffer) return 0;
-	return strncmp( &buffer[offset], s2.buffer, s2.len ) == 0;
-}
-
-unsigned char String::endsWith( const String &s2 ) const
-{
-	if ( len < s2.len || !buffer || !s2.buffer) return 0;
-	return strcmp(&buffer[len - s2.len], s2.buffer) == 0;
-}
-
-/*********************************************/
-/*  Character Access                         */
-/*********************************************/
-
-const char String::zerotermination = 0;
-
-char String::charAt(unsigned int loc) const
-{
-	return operator[](loc);
-}
-
-void String::setCharAt(unsigned int loc, char c)
-{
-	if (loc < len) buffer[loc] = c;
-}
-
-char & String::operator[](unsigned int index)
-{
-	static char dummy_writable_char;
-	if (index >= len || !buffer) {
-		dummy_writable_char = 0;
-		return dummy_writable_char;
-	}
-	return buffer[index];
-}
-
-char String::operator[]( unsigned int index ) const
-{
-	if (index >= len || !buffer) return 0;
-	return buffer[index];
-}
-
-void String::getBytes(unsigned char *buf, unsigned int bufsize, unsigned int index) const
-{
-	if (!bufsize || !buf) return;
-	if (index >= len) {
-		buf[0] = 0;
-		return;
-	}
-	unsigned int n = bufsize - 1;
-	if (n > len - index) n = len - index;
-	strncpy((char *)buf, buffer + index, n);
-	buf[n] = 0;
-}
-
-/*********************************************/
-/*  Search                                   */
-/*********************************************/
-
-int String::indexOf(char c) const
-{
-	return indexOf(c, 0);
-}
-
-int String::indexOf( char ch, unsigned int fromIndex ) const
-{
-	if (fromIndex >= len) return -1;
-	const char* temp = strchr(buffer + fromIndex, ch);
-	if (temp == NULL) return -1;
-	return temp - buffer;
-}
-
-int String::indexOf(const String &s2) const
-{
-	return indexOf(s2, 0);
-}
-
-int String::indexOf(const String &s2, unsigned int fromIndex) const
-{
-	if (fromIndex >= len) return -1;
-	const char *found = strstr(buffer + fromIndex, s2.buffer);
-	if (found == NULL) return -1;
-	return found - buffer;
-}
-
-int String::lastIndexOf( char theChar ) const
-{
-	return lastIndexOf(theChar, len - 1);
-}
-
-int String::lastIndexOf(char ch, unsigned int fromIndex) const
-{
-	if (fromIndex >= len) return -1;
-	char tempchar = buffer[fromIndex + 1];
-	buffer[fromIndex + 1] = '\0';
-	char* temp = strrchr( buffer, ch );
-	buffer[fromIndex + 1] = tempchar;
-	if (temp == NULL) return -1;
-	return temp - buffer;
-}
-
-int String::lastIndexOf(const String &s2) const
-{
-	return lastIndexOf(s2, len - s2.len);
-}
-
-int String::lastIndexOf(const String &s2, unsigned int fromIndex) const
-{
-  	if (s2.len == 0 || len == 0 || s2.len > len) return -1;
-	if (fromIndex >= len) fromIndex = len - 1;
-	int found = -1;
-	for (char *p = buffer; p <= buffer + fromIndex; p++) {
-		p = strstr(p, s2.buffer);
-		if (!p) break;
-		if ((unsigned int)(p - buffer) <= fromIndex) found = p - buffer;
-	}
-	return found;
-}
-
-String String::substring( unsigned int left ) const
-{
-	return substring(left, len);
-}
-
-String String::substring(unsigned int left, unsigned int right) const
-{
-	if (left > right) {
-		unsigned int temp = right;
-		right = left;
-		left = temp;
-	}
-	String out;
-	if (left > len) return out;
-	if (right > len) right = len;
-	char temp = buffer[right];  // save the replaced character
-	buffer[right] = '\0';
-	out = buffer + left;  // pointer arithmetic
-	buffer[right] = temp;  //restore character
-	return out;
-}
-
-/*********************************************/
-/*  Modification                             */
-/*********************************************/
-
-String & String::replace(char find, char replace)
-{
-	if (!buffer) return *this;
-	for (char *p = buffer; *p; p++) {
-		if (*p == find) *p = replace;
-	}
-	return *this;
-}
-
-String & String::replace(const String& find, const String& replace)
-{
-	if (len == 0 || find.len == 0) return *this;
-	int diff = replace.len - find.len;
-	char *readFrom = buffer;
-	char *foundAt;
-	if (diff == 0) {
-		while ((foundAt = strstr(readFrom, find.buffer)) != NULL) {
-			memcpy(foundAt, replace.buffer, replace.len);
-			readFrom = foundAt + replace.len;
-		}
-	} else if (diff < 0) {
-		char *writeTo = buffer;
-		while ((foundAt = strstr(readFrom, find.buffer)) != NULL) {
-			unsigned int n = foundAt - readFrom;
-			memcpy(writeTo, readFrom, n);
-			writeTo += n;
-			memcpy(writeTo, replace.buffer, replace.len);
-			writeTo += replace.len;
-			readFrom = foundAt + find.len;
-			len += diff;
-		}
-		strcpy(writeTo, readFrom);
-	} else {
-		unsigned int size = len; // compute size needed for result
-		while ((foundAt = strstr(readFrom, find.buffer)) != NULL) {
-			readFrom = foundAt + find.len;
-			size += diff;
-		}
-		if (size == len) return *this;
-		if (size > capacity && !changeBuffer(size)) return *this;
-		int index = len - 1;
-		while (index >= 0 && (index = lastIndexOf(find, index)) >= 0) {
-			readFrom = buffer + index + find.len;
-			memmove(readFrom + diff, readFrom, len - (readFrom - buffer));
-			len += diff;
-			buffer[len] = 0;
-			memcpy(buffer + index, replace.buffer, replace.len);
-			index--;
-		}
-	}
-	return *this;
-}
-
-String & String::remove(unsigned int index)
-{
-	if (index < len) {
-		len = index;
-		buffer[len] = 0;
-	}
-	return *this;
-}
-
-String & String::remove(unsigned int index, unsigned int count)
-{
-	if (index < len && count > 0) {
-  		if (index + count > len) count = len - index;
-		len = len - count;
-		memmove(buffer + index, buffer + index + count, len - index);
-		buffer[len] = 0;
-	}
-	return *this;
-}
-
-/*
-String & String::toLowerCase(void)
-{
-	if (!buffer) return *this;
-	for (char *p = buffer; *p; p++) {
-		*p = tolower(*p);
-	}
-	return *this;
-}
-
-String & String::toUpperCase(void)
-{
-	if (!buffer) return *this;
-	for (char *p = buffer; *p; p++) {
-		*p = toupper(*p);
-	}
-	return *this;
-}
-*/
-
-#define isspace(x) (x == ' ' || x == '\n' || x == '\t')
-
-String & String::trim(void)
-{
-	if (!buffer || len == 0) return *this;
-	char *begin = buffer;
-	while (isspace(*begin)) begin++;
-	char *end = buffer + len - 1;
-	while (isspace(*end) && end >= begin) end--;
-	len = end + 1 - begin;
-	if (begin > buffer) memcpy(buffer, begin, len);
-	buffer[len] = 0;
-	return *this;
-}
-
-

+ 0 - 240
apps_broken_by_last_refactors/tas_playback/WString.h

@@ -1,240 +0,0 @@
-/*
-  WString.h - String library for Wiring & Arduino
-  ...mostly rewritten by Paul Stoffregen...
-  Copyright (c) 2009-10 Hernando Barragan.  All right reserved.
-  Copyright 2011, Paul Stoffregen, paul@pjrc.com
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Lesser General Public
-  License as published by the Free Software Foundation; either
-  version 2.1 of the License, or (at your option) any later version.
-
-  This library is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public
-  License along with this library; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-
-#ifndef String_class_h
-#define String_class_h
-#ifdef __cplusplus
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-// When compiling programs with this class, the following gcc parameters
-// dramatically increase performance and memory (RAM) efficiency, typically
-// with little or no increase in code size.
-//     -felide-constructors
-//     -std=c++0x
-
-// Brian Cook's "no overhead" Flash String type (message on Dec 14, 2010)
-// modified by Mikal Hart for his FlashString library
-class __FlashStringHelper;
-
-// An inherited class for holding the result of a concatenation.  These
-// result objects are assumed to be writable by subsequent concatenations.
-class StringSumHelper;
-
-// The string class
-class String
-{
-public:
-	// constructors
-	String(const char *cstr = (const char *)NULL);
-	String(const __FlashStringHelper *pgmstr);
-	String(const String &str);
-	#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
-	String(String &&rval);
-	String(StringSumHelper &&rval);
-	#endif
-	String(char c);
-	String(unsigned char c);
-	String(int, unsigned char base=10);
-	String(unsigned int, unsigned char base=10);
-	String(long, unsigned char base=10);
-	String(unsigned long, unsigned char base=10);
-	String(long long, unsigned char base=10);
-	String(unsigned long long, unsigned char base=10);
-        String(float num, unsigned char digits=2);
-	String(double num, unsigned char digits=2) : String((float)num, digits) {}
-	~String(void);
-
-	// memory management
-	unsigned char reserve(unsigned int size);
-	inline unsigned int length(void) const {return len;}
-
-	// copy and move
-	String & copy(const char *cstr, unsigned int length);
-	String & copy(const __FlashStringHelper *s) { return copy((const char *)s, strlen((const char *)s)); }
-	void move(String &rhs);
-	String & operator = (const String &rhs);
-	String & operator = (const char *cstr);
-	String & operator = (const __FlashStringHelper *pgmstr);
-	#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
-	String & operator = (String &&rval);
-	String & operator = (StringSumHelper &&rval);
-	#endif
-	String & operator = (char c);
-
-	// append
-	String & append(const String &str);
-	String & append(const char *cstr);
-	String & append(const __FlashStringHelper *s)	{return append((const char *)s, strlen((const char *)s)); }
-	String & append(char c);
-	String & append(unsigned char c)		{return append((int)c);}
-	String & append(int num);
-	String & append(unsigned int num);
-	String & append(long num);
-	String & append(unsigned long num);
-	String & append(long long num);
-	String & append(unsigned long long num);
-	String & append(float num);
-	String & append(double num)			{return append((float)num);}
-	String & operator += (const String &rhs)	{return append(rhs);}
-	String & operator += (const char *cstr)		{return append(cstr);}
-	String & operator += (const __FlashStringHelper *pgmstr) {return append(pgmstr);}
-	String & operator += (char c)			{return append(c);}
-	String & operator += (unsigned char c)		{return append((int)c);}
-	String & operator += (int num)			{return append(num);}
-	String & operator += (unsigned int num)		{return append(num);}
-	String & operator += (long num)			{return append(num);}
-	String & operator += (unsigned long num)	{return append(num);}
-	String & operator += (long long num)		{return append(num);}
-	String & operator += (unsigned long long num)	{return append(num);}
-	String & operator += (float num)		{return append(num);}
-	String & operator += (double num)		{return append(num);}
-
-	// concatenate
-	friend StringSumHelper & operator + (const StringSumHelper &lhs, const String &rhs);
-	friend StringSumHelper & operator + (const StringSumHelper &lhs, const char *cstr);
-	friend StringSumHelper & operator + (const StringSumHelper &lhs, const __FlashStringHelper *pgmstr);
-	friend StringSumHelper & operator + (const StringSumHelper &lhs, char c);
-	friend StringSumHelper & operator + (const StringSumHelper &lhs, unsigned char c);
-	friend StringSumHelper & operator + (const StringSumHelper &lhs, int num);
-	friend StringSumHelper & operator + (const StringSumHelper &lhs, unsigned int num);
-	friend StringSumHelper & operator + (const StringSumHelper &lhs, long num);
-	friend StringSumHelper & operator + (const StringSumHelper &lhs, unsigned long num);
-	friend StringSumHelper & operator + (const StringSumHelper &lhs, long long num);
-	friend StringSumHelper & operator + (const StringSumHelper &lhs, unsigned long long num);
-	friend StringSumHelper & operator + (const StringSumHelper &lhs, float num);
-	friend StringSumHelper & operator + (const StringSumHelper &lhs, double num);
-	String & concat(const String &str)		{return append(str);}
-	String & concat(const char *cstr)		{return append(cstr);}
-	String & concat(const __FlashStringHelper *pgmstr) {return append(pgmstr);}
-	String & concat(char c)				{return append(c);}
-	String & concat(unsigned char c)		{return append((int)c);}
-	String & concat(int num)			{return append(num);}
-	String & concat(unsigned int num)		{return append(num);}
-	String & concat(long num)			{return append(num);}
-	String & concat(unsigned long num)		{return append(num);}
-	String & concat(long long num)			{return append(num);}
-	String & concat(unsigned long long num)		{return append(num);}
-	String & concat(float num)			{return append(num);}
-	String & concat(double num)			{return append(num);}
-
-	// comparison
-	int compareTo(const String &s) const;
-	unsigned char equals(const String &s) const;
-	unsigned char equals(const char *cstr) const;
-	//unsigned char equals(const __FlashStringHelper *pgmstr) const;
-	unsigned char operator == (const String &rhs) const {return equals(rhs);}
-	unsigned char operator == (const char *cstr) const {return equals(cstr);}
-	unsigned char operator != (const String &rhs) const {return !equals(rhs);}
-	unsigned char operator != (const char *cstr) const {return !equals(cstr);}
-	unsigned char operator <  (const String &rhs) const;
-	unsigned char operator >  (const String &rhs) const;
-	unsigned char operator <= (const String &rhs) const;
-	unsigned char operator >= (const String &rhs) const;
-	unsigned char equalsIgnoreCase(const String &s) const;
-	unsigned char startsWith( const String &prefix) const;
-	unsigned char startsWith(const String &prefix, unsigned int offset) const;
-	unsigned char endsWith(const String &suffix) const;
-
-	// character acccess
-	char charAt(unsigned int index) const;
-	void setCharAt(unsigned int index, char c);
-	char operator [] (unsigned int index) const;
-	char& operator [] (unsigned int index);
-	void getBytes(unsigned char *buf, unsigned int bufsize, unsigned int index=0) const;
-	void toCharArray(char *buf, unsigned int bufsize, unsigned int index=0) const
-		{getBytes((unsigned char *)buf, bufsize, index);}
-	const char * c_str() const {
-		if (!buffer) return &zerotermination; // https://forum.pjrc.com/threads/63842
-		return buffer;
-	}
-	char * begin() {
-		if (!buffer) reserve(20);
-		return buffer;
-	}
-	char * end() { return begin() + length(); }
-	const char * begin() const { return c_str(); }
-	const char * end() const { return c_str() + length(); }
-
-	// search
-	int indexOf( char ch ) const;
-	int indexOf( char ch, unsigned int fromIndex ) const;
-	int indexOf( const String &str ) const;
-	int indexOf( const String &str, unsigned int fromIndex ) const;
-	int lastIndexOf( char ch ) const;
-	int lastIndexOf( char ch, unsigned int fromIndex ) const;
-	int lastIndexOf( const String &str ) const;
-	int lastIndexOf( const String &str, unsigned int fromIndex ) const;
-	String substring( unsigned int beginIndex ) const;
-	String substring( unsigned int beginIndex, unsigned int endIndex ) const;
-
-	// modification
-	String & replace(char find, char replace);
-	String & replace(const String& find, const String& replace);
-	String & remove(unsigned int index);
-	String & remove(unsigned int index, unsigned int count);
-	String & toLowerCase(void);
-	String & toUpperCase(void);
-	String & trim(void);
-
-	// parsing/conversion
-	long toInt(void) const;
-	float toFloat(void) const;
-
-protected:
-	char *buffer;	        // the actual char array
-	unsigned int capacity;  // the array length minus one (for the '\0')
-	unsigned int len;       // the String length (not counting the '\0')
-	unsigned char flags;    // unused, for future features
-protected:
-	void init(void);
-	unsigned char changeBuffer(unsigned int maxStrLen);
-	String & append(const char *cstr, unsigned int length);
-private:
-	// allow for "if (s)" without the complications of an operator bool().
-	// for more information http://www.artima.com/cppsource/safebool.html
-	typedef void (String::*StringIfHelperType)() const;
-	void StringIfHelper() const {}
-	static const char zerotermination;
-public:
-	operator StringIfHelperType() const { return buffer ? &String::StringIfHelper : 0; }
-};
-
-class StringSumHelper : public String
-{
-public:
-	StringSumHelper(const String &s) : String(s) {}
-	StringSumHelper(const char *p) : String(p) {}
-	StringSumHelper(const __FlashStringHelper *pgmstr) : String(pgmstr) {}
-	StringSumHelper(char c) : String(c) {}
-	StringSumHelper(unsigned char c) : String(c) {}
-	StringSumHelper(int num) : String(num, 10) {}
-	StringSumHelper(unsigned int num) : String(num, 10) {}
-	StringSumHelper(long num) : String(num, 10) {}
-	StringSumHelper(unsigned long num) : String(num, 10) {}
-	StringSumHelper(long long num) : String(num, 10) {}
-	StringSumHelper(unsigned long long num) : String(num, 10) {}
-};
-
-#endif  // __cplusplus
-#endif  // String_class_h

+ 0 - 15
apps_broken_by_last_refactors/tas_playback/application.fam

@@ -1,15 +0,0 @@
-App(
-    appid="tas_playback",  # Must be unique
-    name="TAS playback",  # Displayed in menus
-    apptype=FlipperAppType.EXTERNAL,
-    entry_point="tas_playback_app",
-    requires=["gui", "cli", "storage", "dialogs"],
-    stack_size=4 * 1024,
-    fap_category="GPIO",
-    fap_version=(0, 1),  # (major, minor)
-    fap_icon="images/tas_playback.png",  # 10x10 1-bit PNG
-    fap_description="Playback TAS files for Nintendo consoles",
-    fap_author="rcombs",
-    fap_weburl="https://github.com/rcombs/tas-playback",
-    fap_icon_assets="images",  # Image assets to compile for this application
-)

+ 0 - 51
apps_broken_by_last_refactors/tas_playback/avr_functions.h

@@ -1,51 +0,0 @@
-/* Teensyduino Core Library
- * http://www.pjrc.com/teensy/
- * Copyright (c) 2017 PJRC.COM, LLC.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * 1. The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * 2. If the Software is incorporated into a build system that allows
- * selection among a list of target devices, then similar target
- * devices manufactured by PJRC.COM must be included in the list of
- * target devices and selectable in the same manner.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef _avr_functions_h_
-#define _avr_functions_h_
-
-#include <inttypes.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-char * ultoa(unsigned long val, char *buf, int radix);
-char * ltoa(long val, char *buf, int radix);
-char * ulltoa(unsigned long long val, char *buf, int radix);
-char * lltoa(long long val, char *buf, int radix);
-
-char * dtostrf(float val, int width, unsigned int precision, char *buf);
-
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 2
apps_broken_by_last_refactors/tas_playback/changelog.md

@@ -1,2 +0,0 @@
-0.1:
-- Initial Flipper Zero port

TEMPAT SAMPAH
apps_broken_by_last_refactors/tas_playback/images/Pin_back_arrow_10x8.png


TEMPAT SAMPAH
apps_broken_by_last_refactors/tas_playback/images/tas_playback.png


+ 0 - 108
apps_broken_by_last_refactors/tas_playback/nonstd.c

@@ -1,108 +0,0 @@
-/* Teensyduino Core Library
- * http://www.pjrc.com/teensy/
- * Copyright (c) 2017 PJRC.COM, LLC.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * 1. The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * 2. If the Software is incorporated into a build system that allows
- * selection among a list of target devices, then similar target
- * devices manufactured by PJRC.COM must be included in the list of
- * target devices and selectable in the same manner.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include <furi.h>
-#include "avr_functions.h"
-
-
-char * ultoa(unsigned long val, char *buf, int radix)
-{
-	unsigned digit;
-	int i=0, j;
-	char t;
-
-	while (1) {
-		digit = val % radix;
-		buf[i] = ((digit < 10) ? '0' + digit : 'A' + digit - 10);
-		val /= radix;
-		if (val == 0) break;
-		i++;
-	}
-	buf[i + 1] = 0;
-	for (j=0; j < i; j++, i--) {
-		t = buf[j];
-		buf[j] = buf[i];
-		buf[i] = t;
-	}
-	return buf;
-}
-
-char * ltoa(long val, char *buf, int radix)
-{
-	if (val >= 0) {
-		return ultoa(val, buf, radix);
-	} else {
-		buf[0] = '-';
-		ultoa(-val, buf + 1, radix);
-		return buf;
-	}
-}
-
-char * ulltoa(unsigned long long val, char *buf, int radix)
-{
-	unsigned digit;
-	int i=0, j;
-	char t;
-
-	while (1) {
-		digit = val % radix;
-		buf[i] = ((digit < 10) ? '0' + digit : 'A' + digit - 10);
-		val /= radix;
-		if (val == 0) break;
-		i++;
-	}
-	buf[i + 1] = 0;
-	for (j=0; j < i; j++, i--) {
-		t = buf[j];
-		buf[j] = buf[i];
-		buf[i] = t;
-	}
-	return buf;
-}
-
-char * lltoa(long long val, char *buf, int radix)
-{
-	if (val >= 0) {
-		return ulltoa(val, buf, radix);
-	} else {
-		buf[0] = '-';
-		ulltoa(-val, buf + 1, radix);
-		return buf;
-	}
-}
-
-#define DTOA_UPPER 0x04
-
-char * dtostrf(float val, int width, unsigned int precision, char *buf)
-{
-  sprintf(buf, "%*.*f", width, (int)precision, (double)val);
-  return buf;
-}
-

TEMPAT SAMPAH
apps_broken_by_last_refactors/tas_playback/screenshots/file-select.png


TEMPAT SAMPAH
apps_broken_by_last_refactors/tas_playback/screenshots/running.png


+ 0 - 494
apps_broken_by_last_refactors/tas_playback/tas_playback.cxx

@@ -1,494 +0,0 @@
-#include <furi.h>
-#include <cli/cli.h>
-#include <cli/cli_vcp.h>
-#include <dialogs/dialogs.h>
-#include <gui/gui.h>
-#include <gui/elements.h>
-#include <storage/storage.h>
-#include <furi_hal_resources.h>
-#include <furi_hal_light.h>
-#include <furi_hal_console.h>
-#include <math.h>
-
-/* generated by fbt from .png files in images folder */
-#include <tas_playback_icons.h>
-
-#include "WString.h"
-
-typedef enum {
-    O_READ = FSAM_READ,
-    O_WRITE = FSAM_WRITE,
-    O_CREAT = ((uint16_t)FSOM_OPEN_ALWAYS << 8),
-    O_APPEND = ((uint16_t)FSOM_OPEN_APPEND << 8),
-    O_EXCL = ((uint16_t)FSOM_CREATE_NEW << 8),
-    O_TRUNC = ((uint16_t)FSOM_CREATE_ALWAYS << 8),
-} FileOpenMode;
-
-#define SD_CARD_ERROR_ACMD41 0x16
-
-class SdFs {
-public:
-    bool begin(int) {
-        m_storage = (Storage*)furi_record_open(RECORD_STORAGE);
-
-        return m_storage != nullptr;
-    }
-
-    bool mkdir(const char* path) {
-        return storage_simply_mkdir(m_storage, path);
-    }
-
-    ~SdFs() {
-        if(m_storage) furi_record_close(RECORD_STORAGE);
-    }
-
-    uint8_t sdErrorCode() const {
-        return 0;
-    }
-    uint8_t sdErrorData() const {
-        return 0;
-    }
-
-private:
-    Storage* m_storage = nullptr;
-
-    friend class SdFile;
-};
-
-template <class T>
-static inline void printSdErrorSymbol(T*, uint8_t) {
-}
-
-class SdFile {
-public:
-    ~SdFile() {
-        if(m_file) storage_file_free(m_file);
-    }
-
-    void close() {
-        if(m_file) storage_file_close(m_file);
-    }
-
-    bool open(SdFs* from, const char* path, uint16_t mode) {
-        m_fs = from;
-
-        initFile();
-
-        m_path = path;
-
-        return storage_file_open(
-            m_file, path, FS_AccessMode((uint16_t)mode & 0xFF), FS_OpenMode((uint16_t)mode >> 8));
-    }
-
-    bool open(SdFs* from, const char* path, FileOpenMode mode) {
-        return open(from, path, (uint16_t)mode);
-    }
-
-    void getName(char* dest, uint16_t size) {
-        m_path.toCharArray(dest, size);
-    }
-
-    unsigned read(void* buff, int bytes_to_read) {
-        return storage_file_read(m_file, buff, bytes_to_read);
-    }
-
-    unsigned write(const void* buff, int bytes_to_read) {
-        return storage_file_write(m_file, buff, bytes_to_read);
-    }
-
-    bool available() {
-        return !storage_file_eof(m_file);
-    }
-
-    uint64_t fileSize() {
-        return storage_file_size(m_file);
-    }
-
-    uint64_t curPosition() {
-        return storage_file_tell(m_file);
-    }
-
-    bool seekSet(uint32_t pos) {
-        return storage_file_seek(m_file, pos, true);
-    }
-
-    bool isOpen() {
-        return m_file && storage_file_is_open(m_file);
-    }
-
-    bool openNext(SdFile* from) {
-        char name[64];
-
-        bool ret = storage_dir_read(from->m_file, NULL, name, sizeof(name));
-        if(!ret) return false;
-
-        String path = from->m_path;
-        path += "/";
-        path += name;
-
-        return open(from->m_fs, path.c_str(), O_READ);
-    }
-
-    bool rewind() {
-        return false;
-        //    return storage_dir_rewind(m_file);
-    }
-
-private:
-    void initFile() {
-        close();
-
-        if(!m_file) m_file = storage_file_alloc(m_fs->m_storage);
-    }
-
-    File* m_file = nullptr;
-    SdFs* m_fs = nullptr;
-    String m_path;
-};
-
-#define F(x) x
-
-#define noInterrupts() uint32_t intLevel = ulPortRaiseBASEPRI()
-#define interrupts() vPortSetBASEPRI(intLevel)
-
-#define F_CPU /*SystemCoreClock*/ 64000000
-
-typedef enum { HEX = 16 } BaseType;
-
-class SerialObj {
-public:
-    template <class... T>
-    void print(const T&... v) {
-        String out(v...);
-        furi_hal_console_tx((uint8_t*)out.c_str(), out.length());
-    }
-
-    void println() {
-        furi_hal_console_tx((uint8_t*)"\r\n", 2);
-    }
-    template <class... T>
-    void println(const T&... v) {
-        String out(v...);
-        furi_hal_console_tx((uint8_t*)out.c_str(), out.length());
-        println();
-    }
-
-    template <class... T>
-    void write(const T&... v) {
-        print(v...);
-    }
-
-    int read() {
-        return -1;
-        /*
-    uint8_t buf;
-    if (!cli_read_timeout(m_cli, &buf, 1, 0))
-      return -1;
-    return buf;*/
-    }
-
-    bool begin() {
-        /*
-    m_cli = (Cli*)furi_record_open(RECORD_CLI);
-
-//    if (m_cli)
-  //    cli_session_open(m_cli, &cli_vcp);
-    */
-
-        return (bool)*this;
-    }
-
-    ~SerialObj() {
-        if(m_cli) furi_record_close(RECORD_CLI);
-    }
-
-    explicit operator bool() {
-        return true; // m_cli && cli_is_connected(m_cli);
-    }
-
-    void flush() {
-    }
-
-private:
-    Cli* m_cli = nullptr;
-};
-
-#define SERIAL_BAUD_RATE
-
-#define BUILTIN_SDCARD 0
-
-#define NO_CONSOLE_GPIO
-
-#define ARM_DWT_CYCCNT DWT->CYCCNT
-
-SerialObj Serial;
-
-typedef void (*ArduinoISR)();
-
-void gpioCallback(void* ctx) {
-    ArduinoISR cb = (ArduinoISR)ctx;
-    cb();
-}
-
-#define LOW false
-#define HIGH true
-
-typedef enum {
-    INPUT = GpioModeInput,
-    OUTPUT = GpioModeOutputOpenDrain,
-    INPUT_PULLUP = (uint16_t)GpioModeInput | ((uint16_t)GpioPullUp << 8),
-    INPUT_PULLDOWN = (uint16_t)GpioModeInput | ((uint16_t)GpioPullDown << 8),
-    FALLING = (uint16_t)GpioModeInterruptFall | ((uint16_t)GpioPullUp << 8),
-} PinMode;
-
-void pinMode(const GpioPin* pin, PinMode mode) {
-    furi_hal_gpio_init(
-        pin, GpioMode((uint16_t)mode & 0xFF), GpioPull((uint16_t)mode >> 8), GpioSpeedVeryHigh);
-}
-
-void attachInterrupt(const GpioPin* pin, ArduinoISR cb, PinMode mode) {
-    pinMode(pin, mode);
-    furi_hal_gpio_remove_int_callback(pin);
-    furi_hal_gpio_add_int_callback(pin, gpioCallback, (void*)cb);
-}
-
-static inline void digitalWrite(const GpioPin* pin, bool state) {
-    furi_hal_gpio_write(pin, state);
-}
-
-static inline bool digitalRead(const GpioPin* pin) {
-    return furi_hal_gpio_read(pin);
-}
-
-#define N64_PIN &gpio_ext_pc0
-#define N64_PIN_PREFIX PC0
-#define CONCAT1(a, b) a##b
-#define CONCAT(a, b) CONCAT1(a, b)
-#define N64_PORT CONCAT(N64_PIN_PREFIX, _GPIO_Port)
-#define N64_Pin CONCAT(N64_PIN_PREFIX, _Pin)
-#define N64_IRQ EXTI0_IRQn
-#define N64_PIN_LINE LL_SYSCFG_EXTI_LINE0
-
-#define DISABLE_N64_INTERRUPT() LL_EXTI_DisableFallingTrig_0_31(N64_PIN_LINE)
-#define ENABLE_N64_INTERRUPT() LL_EXTI_EnableFallingTrig_0_31(N64_PIN_LINE)
-
-#define N64_HIGH LL_GPIO_SetPinMode((N64_PIN)->port, (N64_PIN)->pin, LL_GPIO_MODE_INPUT)
-#define N64_LOW LL_GPIO_SetPinMode((N64_PIN)->port, (N64_PIN)->pin, LL_GPIO_MODE_OUTPUT)
-#define N64_QUERY (N64_PORT->IDR & N64_Pin)
-
-#define LED_HIGH (void)0; //furi_hal_light_set(LightGreen, 0xFF)
-#define LED_LOW (void)0; //furi_hal_light_set(LightGreen, 0x00)
-
-template <class T1, class T2>
-auto min(T1 x, T2 y) {
-    return x < y ? x : y;
-}
-
-//#define USE_COMPARE_ABSOLUTE
-
-FuriMessageQueue* msg_queue;
-
-Gui* gui = nullptr;
-ViewPort* view_port = nullptr;
-
-typedef struct {
-    enum {
-        Input,
-        ISRLog,
-    } msg_type;
-    union {
-        InputEvent input;
-    };
-} QueueMessage;
-
-void isrLogCb() {
-    QueueMessage msg = {QueueMessage::ISRLog, {}};
-    furi_message_queue_put(msg_queue, &msg, 0);
-}
-
-#define ISR_LOG_CB isrLogCb
-
-unsigned char frameDat[4] = {0};
-
-void frameCb(const unsigned char* dat, size_t count) {
-    memcpy(frameDat, dat, count);
-}
-
-#define FRAME_CB frameCb
-
-#include "teensy/teensy.ino"
-
-static void input_callback(InputEvent* input_event, void* ctx) {
-    (void)ctx;
-    QueueMessage msg = {QueueMessage::Input, {.input = *input_event}};
-    furi_message_queue_put(msg_queue, &msg, 0);
-}
-
-static void render_callback(Canvas* canvas, void* ctx) {
-    (void)ctx;
-
-    elements_text_box(canvas, 0, 0, 128, 10, AlignCenter, AlignTop, filename.c_str(), true);
-
-#define INVERT "\e!"
-
-    static char inputStr[128] = "";
-
-#define GET_BIT(byte, bit) (frameDat[byte] & (1 << bit))
-#define INV_IF(x) ((x) ? INVERT : "")
-#define FMT_BTN(byte, bit) INV_IF(GET_BIT(byte, bit)), INV_IF(GET_BIT(byte, bit))
-#define PLUS_MIN_ZERO(x) (((x) == 0) ? '0' : (((x) > 127) ? '-' : '+'))
-#define UN_SIGN(x) (((x) <= 127) ? x : (-((int)(x)-256)))
-#define FMT_JOY(byte)                                                                    \
-    INV_IF(frameDat[byte] != 0), PLUS_MIN_ZERO(frameDat[byte]), UN_SIGN(frameDat[byte]), \
-        INV_IF(frameDat[byte] != 0)
-
-    if(console == N64)
-        snprintf(
-            inputStr,
-            sizeof(inputStr),
-            "\e*\e!X\e!:%s%c%02x%s \e!Y\e!:%s%c%02x%s %s<%s%s>%s%s^%s%sv%s\n%sA%s%sB%s%sZ%s%sS%s%sL%s%sR%s C(%s<%s%s>%s%s^%s%sv%s)",
-            FMT_JOY(2),
-            FMT_JOY(3),
-            FMT_BTN(0, 1),
-            FMT_BTN(0, 0),
-            FMT_BTN(0, 3),
-            FMT_BTN(0, 2),
-            FMT_BTN(0, 7),
-            FMT_BTN(0, 6),
-            FMT_BTN(0, 5),
-            FMT_BTN(0, 4),
-            FMT_BTN(1, 5),
-            FMT_BTN(1, 4),
-            FMT_BTN(1, 1),
-            FMT_BTN(1, 0),
-            FMT_BTN(1, 3),
-            FMT_BTN(1, 2));
-
-    elements_text_box(canvas, 0, 15, 128, 32, AlignCenter, AlignTop, inputStr, false);
-
-    int denom = numFrames ? numFrames : 1;
-    float progress = (float)curFrame / denom;
-    char progStr[32];
-    snprintf(
-        progStr, sizeof(progStr), "%07lu/%07lu:%03i%%", curFrame, numFrames, (int)(progress * 100));
-
-    uint8_t progress_y = 41;
-    uint8_t progress_h = 12;
-
-    uint8_t progress_length = roundf(progress * (126));
-    canvas_set_color(canvas, ColorWhite);
-    canvas_draw_box(canvas, 1, progress_y + 1, 126, progress_h - 2);
-    canvas_set_color(canvas, ColorBlack);
-    canvas_draw_rframe(canvas, 0, progress_y, 128, progress_h, 3);
-    canvas_draw_box(canvas, 1, progress_y + 1, progress_length, progress_h - 2);
-
-    canvas_set_color(canvas, ColorXOR);
-    canvas_set_font(canvas, FontKeyboard);
-    canvas_draw_str_aligned(canvas, 64, progress_y + 2, AlignCenter, AlignTop, progStr);
-
-    canvas_draw_icon(canvas, 0, 54, &I_Pin_back_arrow_10x8);
-    canvas_set_font(canvas, FontSecondary);
-    elements_multiline_text_aligned(canvas, 13, 62, AlignLeft, AlignBottom, "Hold to exit");
-}
-
-extern "C" int32_t tas_playback_app(const char* p) {
-    FURI_LOG_I("TAS", "Hello world");
-    FURI_LOG_I("TAS", "I'm tas_playback!");
-
-    uint32_t oldPrio = NVIC_GetPriority(N64_IRQ);
-    NVIC_SetPriority(N64_IRQ, 0);
-
-    LL_GPIO_SetPinOutputType((N64_PIN)->port, (N64_PIN)->pin, LL_GPIO_OUTPUT_PUSHPULL);
-
-    setup();
-
-    FURI_LOG_I("TAS", "SETUP DONE");
-
-    msg_queue = furi_message_queue_alloc(8, sizeof(QueueMessage));
-
-    gui = (Gui*)furi_record_open(RECORD_GUI);
-
-    view_port = view_port_alloc();
-    gui_add_view_port(gui, view_port, GuiLayerFullscreen);
-
-    view_port_draw_callback_set(view_port, render_callback, NULL);
-    view_port_input_callback_set(view_port, input_callback, NULL);
-
-    FuriString* file_path = furi_string_alloc();
-
-    FURI_LOG_I("TAS", "STARTING LOOP");
-
-    do {
-        if(p && strlen(p)) {
-            FURI_LOG_I("TAS", "GOT ARG");
-            furi_string_set_str(file_path, (const char*)p);
-        } else {
-            FURI_LOG_I("TAS", "NO ARG");
-
-            Storage* storage = (Storage*)furi_record_open(RECORD_STORAGE);
-            storage_common_migrate(storage, EXT_PATH("tas"), STORAGE_APP_DATA_PATH_PREFIX);
-            furi_record_close(RECORD_STORAGE);
-
-            FURI_LOG_I("TAS", "MIGRATED");
-
-            furi_string_set_str(file_path, STORAGE_APP_DATA_PATH_PREFIX);
-
-            DialogsFileBrowserOptions browser_options;
-            dialog_file_browser_set_basic_options(&browser_options, "m64", &I_tas_playback);
-            browser_options.hide_ext = false;
-            browser_options.base_path = STORAGE_APP_DATA_PATH_PREFIX;
-
-            FURI_LOG_I("TAS", "SETUP OPTIONS");
-
-            DialogsApp* dialogs = (DialogsApp*)furi_record_open(RECORD_DIALOGS);
-            bool res = dialog_file_browser_show(dialogs, file_path, file_path, &browser_options);
-
-            furi_record_close(RECORD_DIALOGS);
-
-            if(!res) {
-                FURI_LOG_E("TAS", "No file selected");
-                break;
-            }
-        }
-
-        if(!openTAS(furi_string_get_cstr(file_path))) continue;
-
-        FURI_LOG_E("TAS", "Got file");
-
-        QueueMessage msg;
-        while(furi_message_queue_get(msg_queue, &msg, FuriWaitForever) == FuriStatusOk) {
-            if(msg.msg_type == QueueMessage::Input) {
-                if(msg.input.type == InputTypeLong) {
-                    if(msg.input.key == InputKeyBack) break;
-                } else if(msg.input.type == InputTypeShort) {
-                    if(msg.input.key == InputKeyUp) {
-                    } else if(msg.input.key == InputKeyDown) {
-                    }
-                }
-            }
-
-            view_port_update(view_port);
-
-            loop();
-        }
-
-        view_port_update(view_port);
-
-        if(p && strlen(p)) break; // Exit instead of going to browser if launched with arg
-    } while(1);
-
-    furi_string_free(file_path);
-
-    gui_remove_view_port(gui, view_port);
-    furi_record_close(RECORD_GUI);
-    view_port_free(view_port);
-
-    furi_message_queue_free(msg_queue);
-
-    furi_hal_gpio_init(N64_PIN, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
-    furi_hal_gpio_remove_int_callback(N64_PIN);
-
-    NVIC_SetPriority(N64_IRQ, oldPrio);
-
-    return 0;
-}

+ 0 - 264
apps_broken_by_last_refactors/tas_playback/teensy/crc_table.h

@@ -1,264 +0,0 @@
-/**
- * This CRC table for repeating bytes is take from
- * the cube64 project
- *  http://cia.vc/stats/project/navi-misc/cube64
- */
-unsigned char crc_repeating_table[] = {
-          0xFF, // 0x00
-    0x14, // 0x01
-    0xAC, // 0x02
-    0x47, // 0x03
-    0x59, // 0x04
-    0xB2, // 0x05
-    0x0A, // 0x06
-    0xE1, // 0x07
-    0x36, // 0x08
-    0xDD, // 0x09
-    0x65, // 0x0A
-    0x8E, // 0x0B
-    0x90, // 0x0C
-    0x7B, // 0x0D
-    0xC3, // 0x0E
-    0x28, // 0x0F
-    0xE8, // 0x10
-    0x03, // 0x11
-    0xBB, // 0x12
-    0x50, // 0x13
-    0x4E, // 0x14
-    0xA5, // 0x15
-    0x1D, // 0x16
-    0xF6, // 0x17
-    0x21, // 0x18
-    0xCA, // 0x19
-    0x72, // 0x1A
-    0x99, // 0x1B
-    0x87, // 0x1C
-    0x6C, // 0x1D
-    0xD4, // 0x1E
-    0x3F, // 0x1F
-    0xD1, // 0x20
-    0x3A, // 0x21
-    0x82, // 0x22
-    0x69, // 0x23
-    0x77, // 0x24
-    0x9C, // 0x25
-    0x24, // 0x26
-    0xCF, // 0x27
-    0x18, // 0x28
-    0xF3, // 0x29
-    0x4B, // 0x2A
-    0xA0, // 0x2B
-    0xBE, // 0x2C
-    0x55, // 0x2D
-    0xED, // 0x2E
-    0x06, // 0x2F
-    0xC6, // 0x30
-    0x2D, // 0x31
-    0x95, // 0x32
-    0x7E, // 0x33
-    0x60, // 0x34
-    0x8B, // 0x35
-    0x33, // 0x36
-    0xD8, // 0x37
-    0x0F, // 0x38
-    0xE4, // 0x39
-    0x5C, // 0x3A
-    0xB7, // 0x3B
-    0xA9, // 0x3C
-    0x42, // 0x3D
-    0xFA, // 0x3E
-    0x11, // 0x3F
-    0xA3, // 0x40
-    0x48, // 0x41
-    0xF0, // 0x42
-    0x1B, // 0x43
-    0x05, // 0x44
-    0xEE, // 0x45
-    0x56, // 0x46
-    0xBD, // 0x47
-    0x6A, // 0x48
-    0x81, // 0x49
-    0x39, // 0x4A
-    0xD2, // 0x4B
-    0xCC, // 0x4C
-    0x27, // 0x4D
-    0x9F, // 0x4E
-    0x74, // 0x4F
-    0xB4, // 0x50
-    0x5F, // 0x51
-    0xE7, // 0x52
-    0x0C, // 0x53
-    0x12, // 0x54
-    0xF9, // 0x55
-    0x41, // 0x56
-    0xAA, // 0x57
-    0x7D, // 0x58
-    0x96, // 0x59
-    0x2E, // 0x5A
-    0xC5, // 0x5B
-    0xDB, // 0x5C
-    0x30, // 0x5D
-    0x88, // 0x5E
-    0x63, // 0x5F
-    0x8D, // 0x60
-    0x66, // 0x61
-    0xDE, // 0x62
-    0x35, // 0x63
-    0x2B, // 0x64
-    0xC0, // 0x65
-    0x78, // 0x66
-    0x93, // 0x67
-    0x44, // 0x68
-    0xAF, // 0x69
-    0x17, // 0x6A
-    0xFC, // 0x6B
-    0xE2, // 0x6C
-    0x09, // 0x6D
-    0xB1, // 0x6E
-    0x5A, // 0x6F
-    0x9A, // 0x70
-    0x71, // 0x71
-    0xC9, // 0x72
-    0x22, // 0x73
-    0x3C, // 0x74
-    0xD7, // 0x75
-    0x6F, // 0x76
-    0x84, // 0x77
-    0x53, // 0x78
-    0xB8, // 0x79
-    0x00, // 0x7A
-    0xEB, // 0x7B
-    0xF5, // 0x7C
-    0x1E, // 0x7D
-    0xA6, // 0x7E
-    0x4D, // 0x7F
-    0x47, // 0x80
-    0xAC, // 0x81
-    0x14, // 0x82
-    0xFF, // 0x83
-    0xE1, // 0x84
-    0x0A, // 0x85
-    0xB2, // 0x86
-    0x59, // 0x87
-    0x8E, // 0x88
-    0x65, // 0x89
-    0xDD, // 0x8A
-    0x36, // 0x8B
-    0x28, // 0x8C
-    0xC3, // 0x8D
-    0x7B, // 0x8E
-    0x90, // 0x8F
-    0x50, // 0x90
-    0xBB, // 0x91
-    0x03, // 0x92
-    0xE8, // 0x93
-    0xF6, // 0x94
-    0x1D, // 0x95
-    0xA5, // 0x96
-    0x4E, // 0x97
-    0x99, // 0x98
-    0x72, // 0x99
-    0xCA, // 0x9A
-    0x21, // 0x9B
-    0x3F, // 0x9C
-    0xD4, // 0x9D
-    0x6C, // 0x9E
-    0x87, // 0x9F
-    0x69, // 0xA0
-    0x82, // 0xA1
-    0x3A, // 0xA2
-    0xD1, // 0xA3
-    0xCF, // 0xA4
-    0x24, // 0xA5
-    0x9C, // 0xA6
-    0x77, // 0xA7
-    0xA0, // 0xA8
-    0x4B, // 0xA9
-    0xF3, // 0xAA
-    0x18, // 0xAB
-    0x06, // 0xAC
-    0xED, // 0xAD
-    0x55, // 0xAE
-    0xBE, // 0xAF
-    0x7E, // 0xB0
-    0x95, // 0xB1
-    0x2D, // 0xB2
-    0xC6, // 0xB3
-    0xD8, // 0xB4
-    0x33, // 0xB5
-    0x8B, // 0xB6
-    0x60, // 0xB7
-    0xB7, // 0xB8
-    0x5C, // 0xB9
-    0xE4, // 0xBA
-    0x0F, // 0xBB
-    0x11, // 0xBC
-    0xFA, // 0xBD
-    0x42, // 0xBE
-    0xA9, // 0xBF
-    0x1B, // 0xC0
-    0xF0, // 0xC1
-    0x48, // 0xC2
-    0xA3, // 0xC3
-    0xBD, // 0xC4
-    0x56, // 0xC5
-    0xEE, // 0xC6
-    0x05, // 0xC7
-    0xD2, // 0xC8
-    0x39, // 0xC9
-    0x81, // 0xCA
-    0x6A, // 0xCB
-    0x74, // 0xCC
-    0x9F, // 0xCD
-    0x27, // 0xCE
-    0xCC, // 0xCF
-    0x0C, // 0xD0
-    0xE7, // 0xD1
-    0x5F, // 0xD2
-    0xB4, // 0xD3
-    0xAA, // 0xD4
-    0x41, // 0xD5
-    0xF9, // 0xD6
-    0x12, // 0xD7
-    0xC5, // 0xD8
-    0x2E, // 0xD9
-    0x96, // 0xDA
-    0x7D, // 0xDB
-    0x63, // 0xDC
-    0x88, // 0xDD
-    0x30, // 0xDE
-    0xDB, // 0xDF
-    0x35, // 0xE0
-    0xDE, // 0xE1
-    0x66, // 0xE2
-    0x8D, // 0xE3
-    0x93, // 0xE4
-    0x78, // 0xE5
-    0xC0, // 0xE6
-    0x2B, // 0xE7
-    0xFC, // 0xE8
-    0x17, // 0xE9
-    0xAF, // 0xEA
-    0x44, // 0xEB
-    0x5A, // 0xEC
-    0xB1, // 0xED
-    0x09, // 0xEE
-    0xE2, // 0xEF
-    0x22, // 0xF0
-    0xC9, // 0xF1
-    0x71, // 0xF2
-    0x9A, // 0xF3
-    0x84, // 0xF4
-    0x6F, // 0xF5
-    0xD7, // 0xF6
-    0x3C, // 0xF7
-    0xEB, // 0xF8
-    0x00, // 0xF9
-    0xB8, // 0xFA
-    0x53, // 0xFB
-    0x4D, // 0xFC
-    0xA6, // 0xFD
-    0x1E, // 0xFE
-    0xF5 // 0xFF
-};
-

+ 0 - 1295
apps_broken_by_last_refactors/tas_playback/teensy/teensy.ino

@@ -1,1295 +0,0 @@
-/*
- * Copyright (c) 2009 Andrew Brown
- * Copyright (c) 2018 rcombs
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "crc_table.h"
-
-#ifdef TEENSYDUINO
-#include <BufferedPrint.h>
-#include <FreeStack.h>
-#include <RingBuf.h>
-#include <SdFat.h>
-#include <sdios.h>
-#include <SdFatConfig.h>
-#include <MinimumSerial.h>
-#include <DMAChannel.h>
-#include <EEPROM.h>
-
-#ifndef PIT_LTMR64H
-#define PIT_LTMR64H             (*(volatile uint32_t *)0x400370E0) // PIT Upper Lifetime Timer Register
-#define PIT_LTMR64L             (*(volatile uint32_t *)0x400370E4) // PIT Lower Lifetime Timer Register
-#endif
-
-#define SD_CONFIG SdSpiConfig(SDCARD_SS_PIN, SHARED_SPI, SD_SCK_MHZ(50))
-
-#define STATUS_PIN 13
-#define POWER_PIN 32
-#define VI_PIN 35
-#define FIELD_PIN 36
-#define HAVE_EEPROM
-#define HAVE_GPIO_COMMANDS
-
-#define SERIAL_BAUD_RATE 115200
-
-#define N64_PIN 38
-#define SNES_LATCH_PIN 3
-#define SNES_CLOCK_PIN 4
-#define SNES_DATA_PIN 5
-
-#define N64_HIGH (CORE_PIN38_DDRREG &= ~CORE_PIN38_BITMASK) //digitalWriteFast(N64_PIN, HIGH)
-#define N64_LOW (CORE_PIN38_DDRREG |= CORE_PIN38_BITMASK) //digitalWriteFast(N64_PIN, LOW)
-#define N64_QUERY ((CORE_PIN38_PINREG & CORE_PIN38_BITMASK) ? 1 : 0) //digitalReadFast(N64_PIN)
-
-#define LED_HIGH (CORE_PIN13_PORTSET = CORE_PIN13_BITMASK) //digitalWriteFast(STATUS_PIN, HIGH)
-#define LED_LOW (CORE_PIN13_PORTCLEAR = CORE_PIN13_BITMASK) //digitalWriteFast(STATUS_PIN, LOW)
-
-#define SERIAL_TIMEOUT_US 5000000
-
-#define DISABLE_N64_INTERRUPT() \
-  volatile uint32_t *config = portConfigRegister(N64_PIN); \
-  uint32_t oldConfig = *config; \
-  *config &= ~0x000F0000;
-#define ENABLE_N64_INTERRUPT() \
-  *config = oldConfig;
-#endif
-
-#define INPUT_BUFFER_SIZE 2048 // Multiples of 512 are ideal since we can read 256*4/2 = 512 bytes at once.
-// 512 bytes is an optimization for reading the sd card and skips using another buffer.
-
-#define INPUT_BUFFER_UPDATE_TIMEOUT 10 // 10 ms
-
-#define MICRO_CYCLES (F_CPU / 1000000)
-#ifdef F_BUS
-#define MICRO_BUS_CYCLES (F_BUS / 1000000ULL)
-#endif
-
-#define MAX_CMD_LEN 4096
-#define MAX_LOOP_LEN 10240
-
-typedef enum Console {
-  N64 = 0,
-  NES = 1,
-  SNES = 2,
-} Console;
-
-static Console console = N64;
-
-static bool skippingInput = false;
-static String inputString;
-
-static char n64_raw_dump[36]; // maximum recv is 1+2+32 bytes + 1 bit
-// n64_raw_dump does not include the command byte. That gets pushed into
-// n64_command:
-static int n64_command;
-// bytes to send to the 64
-// maximum we'll need to send is 33, 32 for a read request and 1 CRC byte
-static unsigned char output_buffer[33];
-
-// Simple switch buffer. (If buffer A fails to load while buffer B is in use,
-// we still okay, and will try again next loop)
-static unsigned char inputBuffer[INPUT_BUFFER_SIZE];
-static size_t bufferEndPos;
-static volatile size_t bufferPos;
-static volatile bool bufferHasData;
-static void updateInputBuffer();
-
-static bool hold = false;
-static bool finished = false;
-
-static SdFile tasFile;
-
-//static unsigned int progressPos = 0;
-static String filename;
-static unsigned long numFrames = 0, curFrame = 0;
-static int edgesRead = 0;
-static int incompleteCommand = 0;
-static int firstEdgeTime = 0;
-static int secondEdgeTime = 0;
-static volatile unsigned long viCount = 0;
-
-static SdFs sd;
-
-#ifdef SNES_DATA_PIN
-static uint16_t currentSnesFrame;
-static uint32_t frameDuration = 0;
-#endif
-
-static uint64_t finalTime = 0;
-static uint64_t lastFrameTime = 0;
-static int doLoop = 0;
-
-#define N_SER_BUFS 16
-#define SER_BUF_SIZE 256
-static char serBuffer[N_SER_BUFS][SER_BUF_SIZE] = {0};
-static volatile bool bufHasData[N_SER_BUFS] = {0};
-
-static void n64Interrupt();
-
-template<class T> void lockedPrintln(const T& input)
-{
-  noInterrupts();
-  Serial.println(input);
-  interrupts();
-}
-
-template<class A, class B> void lockedPrintln(const A& a, const B& b)
-{
-  noInterrupts();
-  Serial.print(a);
-  Serial.println(b);
-  interrupts();
-}
-
-#ifdef ARM_DWT_CYCCNT
-
-static void startTimer()
-{
-  ARM_DWT_CYCCNT = 0;
-}
-
-static uint32_t readTimer()
-{
-  return ARM_DWT_CYCCNT;
-}
-
-static uint32_t readAndResetTimer()
-{
-  return __atomic_exchange_n(&ARM_DWT_CYCCNT, 0, __ATOMIC_SEQ_CST);
-}
-
-#endif
-
-#ifdef PIT_LTMR64H
-static bool timer64Started = false;
-
-static void start64Timer()
-{
-  // turn on PIT
-  SIM_SCGC6 |= SIM_SCGC6_PIT;
-  __asm__ volatile("nop"); // solves timing problem on Teensy 3.5
-  PIT_MCR = 0x00;
-
-  // Timer 1
-  PIT_TCTRL1 = 0x0; // disable timer 1 and its interrupts
-  PIT_LDVAL1 = 0xFFFFFFFF; // setup timer 1 for maximum counting period
-  PIT_TCTRL1 |= PIT_TCTRL_CHN; // chain timer 1 to timer 0
-  PIT_TCTRL1 |= PIT_TCTRL_TEN; // start timer 1
-
-  // Timer 0
-  PIT_TCTRL0 = 0; // disable timer 0 and its interrupts
-  PIT_LDVAL0 = 0xFFFFFFFF; // setup timer 0 for maximum counting period
-  PIT_TCTRL0 = PIT_TCTRL_TEN; // start timer 0
-  timer64Started = true;
-}
-
-static uint64_t read64Timer()
-{
-  if (!timer64Started)
-    return 0;
-
-  uint64_t current_uptime = (uint64_t)PIT_LTMR64H << 32;
-  current_uptime = current_uptime + PIT_LTMR64L;
-  return 0xffffffffffffffffull - current_uptime;
-}
-#endif
-
-
-static size_t getNextRegion(size_t& size) {
-  size_t currentPos = bufferPos;
-  if ((currentPos == bufferEndPos || (currentPos == 0 && bufferEndPos == INPUT_BUFFER_SIZE)) && bufferHasData) {
-    size = 0;
-    return 0;
-  }
-  size_t ret = bufferEndPos;
-  if (ret == INPUT_BUFFER_SIZE)
-    ret = 0;
-  size = INPUT_BUFFER_SIZE - ret;
-  if (ret < currentPos)
-    size = currentPos - ret;
-  return ret;
-}
-
-void initBuffers()
-{
-  bufferEndPos = 0;
-  bufferPos = 0;
-  bufferHasData = false;
-}
-
-static bool overflowed = 0;
-
-void logFromISR(const char *fmt, ...)
-{
-  int i;
-  for (i = 0; i < N_SER_BUFS && bufHasData[i]; i++);
-  if (i >= N_SER_BUFS) {
-    overflowed = 1;
-    return;
-  }
-
-  char* buf = &serBuffer[i][0];
-  size_t size = SER_BUF_SIZE - 1;
-
-  va_list ap;
-  va_start(ap, fmt);
-  vsnprintf(buf, size, fmt, ap);
-  va_end(ap);
-
-  bufHasData[i] = 1;
-  overflowed = 0;
-
-#ifdef ISR_LOG_CB
-  ISR_LOG_CB();
-#endif
-}
-
-static void advanceBuffer(long bytes)
-{
-  curFrame++;
-
-#ifdef PIT_LTMR64H
-  lastFrameTime = read64Timer();
-#endif
-
-  if (curFrame == numFrames) {
-    logFromISR("C:%f",
-#ifdef MICRO_BUS_CYCLES
-        lastFrameTime / (double)(MICRO_BUS_CYCLES * 1000 * 1000)
-#else
-        double(0.)
-#endif
-    );
-    finished = true;
-    finalTime = lastFrameTime;
-  }
-
-  size_t pos = bufferPos + bytes;
-  if (pos == bufferEndPos) {
-    if (hold)
-      return;
-    bufferHasData = false;
-    bufferPos = pos;
-    return;
-  }
-  if (pos >= INPUT_BUFFER_SIZE)
-      pos = 0;
-  bufferPos = pos;
-}
-
-static size_t appendInputs(const String& data)
-{
-  size_t totalWritten = 0;
-  size_t writeLen = 0;
-  do {
-    size_t dataLeft = data.length() - totalWritten;
-    size_t writePos = getNextRegion(writeLen);
-    if (writeLen > dataLeft)
-      writeLen = dataLeft;
-    if (writeLen) {
-      memcpy(inputBuffer + writePos, data.c_str() + totalWritten, writeLen);
-      totalWritten += writeLen;
-      noInterrupts();
-      finished = false;
-      bufferEndPos = writePos + writeLen;
-      bufferHasData = true;
-      interrupts();
-    }
-  } while (writeLen > 0);
-  return totalWritten;
-}
-
-static void emitList(const String& path)
-{
-  SdFile dir;
-  if (!dir.open(&sd, path.c_str(), O_READ)) {
-    Serial.println(F("E:Failed to open requested directory"));
-    return;
-  }
-  dir.rewind();
-  SdFile listFile;
-  while (listFile.openNext(&dir)) {
-    char name[256];
-    listFile.getName(name, sizeof(name));
-    lockedPrintln("A:", name);
-    listFile.close();
-  }
-  dir.close();
-}
-
-void logFrame(const unsigned char *dat, size_t count, size_t num)
-{
-#define LOG_FRAME_START "F:%u %f %lu"
-#define LOG_FRAME_BYTE  " %hhx"
-#define LOG_FRAME_END   " %lu %i %s"
-
-#ifdef PIT_LTMR64H
-#define LOG_TIME (read64Timer() / (double)(MICRO_BUS_CYCLES * 1000 * 1000))
-#else
-#define LOG_TIME (double)0.
-#endif
-
-#define LOG_FRAME_START_ARGS num, LOG_TIME, viCount
-#define LOG_FRAME_END_ARGS numFrames, overflowed, filename.c_str()
-
-  if (count == 4)
-    logFromISR(LOG_FRAME_START LOG_FRAME_BYTE LOG_FRAME_BYTE LOG_FRAME_BYTE LOG_FRAME_BYTE LOG_FRAME_END,
-               LOG_FRAME_START_ARGS, dat[0], dat[1], dat[2], dat[3], LOG_FRAME_END_ARGS);
-  else if (count == 2)
-    logFromISR(LOG_FRAME_START LOG_FRAME_BYTE LOG_FRAME_BYTE LOG_FRAME_END,
-               LOG_FRAME_START_ARGS, dat[0], dat[1], LOG_FRAME_END_ARGS);
-  else if (count == 1)
-    logFromISR(LOG_FRAME_START LOG_FRAME_BYTE LOG_FRAME_END,
-               LOG_FRAME_START_ARGS, dat[0], LOG_FRAME_END_ARGS);
-
-#ifdef FRAME_CB
-  FRAME_CB(dat, count);
-#endif
-}
-
-#ifdef HAVE_GPIO_COMMANDS
-static bool setPinMode(const String& cmd)
-{
-  if (cmd.length() < 3)
-    return false;
-  if (cmd[1] != ':')
-    return false;
-
-  int pinNumber = cmd.substring(2).toInt();
-
-  if (cmd[0] == 'I')
-    pinMode(pinNumber, INPUT);
-  else if (cmd[0] == 'O')
-    pinMode(pinNumber, OUTPUT);
-  else if (cmd[0] == 'U')
-    pinMode(pinNumber, INPUT_PULLUP);
-  else if (cmd[0] == 'D')
-    pinMode(pinNumber, INPUT_PULLDOWN);
-  else
-    return false;
-
-  return true;
-}
-
-static bool writePin(const String& cmd)
-{
-  if (cmd.length() < 3)
-    return false;
-  if (cmd[1] != ':')
-    return false;
-
-  int pinNumber = cmd.substring(2).toInt();
-
-  if (cmd[0] == '0')
-    digitalWrite(pinNumber, LOW);
-  else if (cmd[0] == '1')
-    digitalWrite(pinNumber, HIGH);
-  else
-    return false;
-
-  return true;
-}
-#endif
-
-#ifdef POWER_PIN
-static bool setPower(const String& cmd)
-{
-  if (cmd.length() < 1)
-    return false;
-
-  if (cmd[0] == '0') {
-    digitalWrite(POWER_PIN, LOW);
-  } else if (cmd[0] == '1') {
-    viCount = 0;
-    timer64Started = 0;
-    digitalWrite(POWER_PIN, HIGH);
-  } else {
-    return false;
-  }
-
-  return true;
-}
-#endif
-
-static bool setLoop(const String& cmd)
-{
-  if (cmd.length() < 1)
-    return false;
-
-  if (cmd[0] == '0') {
-    doLoop = 0;
-  } else if (cmd[0] == '1') {
-    doLoop = 1;
-  } else {
-    return false;
-  }
-
-  return true;
-}
-
-void setupConsole()
-{
-  if (console == N64) {
-#ifdef N64_PIN
-    attachInterrupt(N64_PIN, n64Interrupt, FALLING);
-#endif
-  } else if (console == NES || console == SNES) {
-#ifdef SNES_LATCH_PIN
-    attachInterrupt(SNES_LATCH_PIN, snesLatchInterrupt, RISING);
-    attachInterrupt(SNES_CLOCK_PIN, snesClockInterrupt, RISING);
-#endif
-  }
-}
-
-static bool setConsole(const String& cmd)
-{
-  if (cmd == "N64")
-    console = N64;
-  else if (cmd == "NES")
-    console = NES;
-  else if (cmd == "SNES")
-    console = SNES;
-  else
-    return false;
-
-  setupConsole();
-
-  return true;
-}
-
-String hextobin(const String& hex)
-{
-  String ret;
-  ret.reserve((hex.length() + 1) / 2);
-
-  // mapping of ASCII characters to hex values
-  static const uint8_t map[] = {
-    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // 01234567
-    0x08, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 89:;<=>?
-    0x00, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00, // @ABCDEFG
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // HIJKLMNO
-  };
-
-  for (size_t pos = 0; pos < hex.length(); pos += 2) {
-    size_t idx0 = ((uint8_t)hex[pos]     & 0x1F) ^ 0x10,
-           idx1 = ((uint8_t)hex[pos + 1] & 0x1F) ^ 0x10;
-    ret += (char)((map[idx0] << 4) | map[idx1]);
-  }
-
-  return ret;
-}
-
-static SdFile writeFile;
-
-static void appendData(const String& data) {
-  if (writeFile.write(data.c_str(), data.length()) == data.length())
-    Serial.println("AP:OK");
-  else
-    Serial.println("AP:NAK");
-}
-
-static void waitForIdle(unsigned us)
-{
-  LED_HIGH;
-  N64_HIGH;
-  startTimer();
-  int lastReset = 0;
-  while (readTimer() - lastReset < us * MICRO_CYCLES && readTimer() < us * MICRO_CYCLES * 4) {
-    if (!N64_QUERY)
-      lastReset = readTimer();
-  }
-  LED_LOW;
-}
-
-static String basename(const String& path) {
-  int pos = path.lastIndexOf('/');
-  if (pos < 0)
-    return path;
-
-  return path.substring(pos + 1);
-}
-
-static bool openTAS(const String& path) {
-    char signature[4];
-    int version;
-
-    Serial.write("M:");
-    Serial.println(path);
-
-    // Open the file for reading:
-    Serial.print(F("L:Opening file '"));
-    Serial.print(path);
-    Serial.println(F("'..."));
-
-    Serial.flush();
-
-    if (tasFile.isOpen())
-      tasFile.close();
-
-    // Error check
-    if (!tasFile.open(&sd, path.c_str(), O_READ)) {
-        Serial.println(F("E:Error in opening file"));
-        return false;
-    }
-
-    // Open header
-    if (tasFile.read(signature, 4) != 4 || tasFile.read(&version, 4) != 4) {
-        tasFile.close();
-        Serial.println(F("E:Failed to read signature"));
-        return false;
-    }
-
-    // Validate file signature
-    if (memcmp(signature, "M64\x1A", 4) != 0) {
-        Serial.println(F("E:m64 signature invalid"));
-        tasFile.close();
-        return false;
-    }
-
-    // Print version
-    Serial.print(F("L:M64 Version: "));
-    Serial.println(version);
-
-    Serial.flush();
-
-    tasFile.seekSet(0x018);
-
-    // Open header
-    uint32_t newNumFrames;
-    if (tasFile.read(&newNumFrames, 4) != 4) {
-        tasFile.close();
-        Serial.println(F("E:Failed to read frame count"));
-        return false;
-    }
-
-    // Get header size
-    switch(version) {
-        case 1:
-        case 2:
-            tasFile.seekSet(0x200);
-            break;
-        case 3:
-            tasFile.seekSet(0x400);
-            break;
-        default:
-          // Unknown version
-            Serial.println(F("E:unknown M64 version"));
-            tasFile.close();
-            return false;
-    }
-
-    // Final check
-    if (!tasFile.available()) {
-        Serial.println(F("E:No input data found in file"));
-        tasFile.close();
-        return false;
-    }
-
-    newNumFrames = min(newNumFrames, (tasFile.fileSize() - tasFile.curPosition()) / 4);
-
-    Serial.write("N:");
-    Serial.println(newNumFrames);
-    Serial.flush();
-
-    // Wait for the line to go idle, then begin listening
-    /*
-    for (int idle_wait=32; idle_wait>0; --idle_wait) {
-        if (!N64_QUERY) {
-            idle_wait = 32;
-        }
-    }*/
-
-    noInterrupts();
-    finished = false;
-    initBuffers();
-    curFrame = 0;
-    numFrames = newNumFrames;
-    console = N64;
-    filename = basename(path);
-    interrupts();
-
-    setupConsole();
-
-#ifdef POWER_PIN
-    if (doLoop)
-      setPower("1");
-#endif
-
-    return true;
-}
-
-static void updateInputBuffer() {
-    if (finished || !tasFile.isOpen())
-      return;
-
-    // Check for file end
-    if (!tasFile.available()) {
-        tasFile.close();
-        return;
-    }
-
-    size_t availableSize;
-    size_t writePos = getNextRegion(availableSize);
-
-    // Optimized chunk reads
-    if ((availableSize < 512 && (writePos % 512) == 0) || !availableSize)
-        return;
-
-    int readBytes = tasFile.read(inputBuffer + writePos, availableSize);
-    if (readBytes <= 0) {
-      lockedPrintln(F("W:Failed to read next inputs from file. (This is recoverable)"));
-      return;
-    }
-
-    noInterrupts();
-    bufferEndPos = writePos + readBytes;
-    bufferHasData = true;
-    interrupts();
-}
-
-/**
- * Complete copy and paste of gc_send, but with the N64
- * pin being manipulated instead.
- */
-static void n64_send(unsigned char *buffer, char length, bool wide_stop)
-{
-  unsigned long target;
-  LED_HIGH;
-  N64_LOW;
-  startTimer();
-
-  for (int i = 0; i < length * 8; i++) {
-    char bit = (buffer[i >> 3] >> (7 - (i & 7))) & 1;
-    target = MICRO_CYCLES * (3 - bit * 2);
-    while (readTimer() < target);
-      N64_HIGH;
-    while (readTimer() < MICRO_CYCLES * 4);
-      N64_LOW;
-    startTimer();
-  }
-
-  target = MICRO_CYCLES * (1 + wide_stop);
-
-  while (readTimer() < target);
-
-  N64_HIGH;
-  startTimer();
-  while (!N64_QUERY && readTimer() < MICRO_CYCLES * 4);
-  LED_LOW;
-}
-
-/**
-  * Waits for an incomming signal on the N64 pin and reads the command,
-  * and if necessary, any trailing bytes.
-  * 0x00 is an identify request
-  * 0x01 is a status request
-  * 0x02 is a controller pack read
-  * 0x03 is a controller pack write
-  *
-  * for 0x02 and 0x03, additional data is passed in after the command byte,
-  * which is also read by this function.
-  *
-  * All data is raw dumped to the n64_raw_dump array, 1 bit per byte, except
-  * for the command byte, which is placed all packed into n64_command
-  */
-static void get_n64_command()
-{
-    int bitcount = 8;
-    n64_command = 0;
-    char newByte = 0;
-
-    LED_HIGH;
-
-#define FAIL_TIMEOUT {\
-  if (readTimer() >= MICRO_CYCLES * 10) {\
-    n64_command = -1; \
-    goto fail; \
-  } \
-}\
-
-    edgesRead = 0;
-
-    for (int i = 1; i <= bitcount; i++) {
-        while (!N64_QUERY)
-          FAIL_TIMEOUT;
-        long lowTime = readAndResetTimer();
-        if (!edgesRead)
-            firstEdgeTime = lowTime;
-        edgesRead++;
-        while (N64_QUERY)
-          FAIL_TIMEOUT;
-        long highTime = readAndResetTimer();
-        if (edgesRead == 1)
-            secondEdgeTime = highTime;
-        edgesRead++;
-        char bit =
-#ifdef USE_COMPARE_ABSOLUTE
-            (highTime >= MICRO_CYCLES * 2)
-#else
-            (lowTime < highTime)
-#endif
-        ;
-        newByte <<= 1;
-        newByte |= bit;
-
-        if (i == 8) {
-          n64_command = newByte;
-          switch (newByte) {
-              case (0x03):
-                  // write command
-                  // we expect a 2 byte address and 32 bytes of data
-                  bitcount += 272; // 34 bytes * 8 bits per byte
-                  //Serial.println("command is 0x03, write");
-                  break;
-              case (0x02):
-                  // read command 0x02
-                  // we expect a 2 byte address
-                  bitcount += 16;
-                  //Serial.println("command is 0x02, read");
-                  break;
-              case (0x00):
-              case (0x01):
-              default:
-                  // get the last (stop) bit
-                  break;
-          }
-        } else if (!(i & 7)) {
-          n64_raw_dump[(i >> 3) - 1] = newByte;
-        }
-    }
-
-    // Wait for the stop bit
-    while (!N64_QUERY)
-      FAIL_TIMEOUT;
-    startTimer();
-    while (readTimer() < MICRO_CYCLES * 2);
-
-fail:
-    incompleteCommand = newByte;
-
-    LED_LOW;
-}
-
-static void n64Interrupt()
-{
-    noInterrupts();
-
-    unsigned char data, addr;
-    int ticksSinceLast = readAndResetTimer();
-    bool haveFrame;
-
-#ifdef DISABLE_N64_INTERRUPT
-    DISABLE_N64_INTERRUPT();
-#endif
-
-    // Wait for incoming 64 command
-    // this will block until the N64 sends us a command
-    get_n64_command();
-
-    // 0x00 is identify command
-    // 0x01 is status
-    // 0x02 is read
-    // 0x03 is write
-    switch (n64_command)
-    {
-        case 0x00:
-        case 0xFF:
-            // identify
-            // mutilate the output_buffer array with our status
-            // we return 0x050001 to indicate we have a rumble pack
-            // or 0x050002 to indicate the expansion slot is empty
-            //
-            // 0xFF I've seen sent from Mario 64 and Shadows of the Empire.
-            // I don't know why it's different, but the controllers seem to
-            // send a set of status bytes afterwards the same as 0x00, and
-            // it won't work without it.
-            output_buffer[0] = 0x05;
-            output_buffer[1] = 0x00;
-            output_buffer[2] = 0x01;
-
-            n64_send(output_buffer, 3, 1);
-            logFromISR("P:%ld", viCount);
-            viCount = 0;
-#ifdef PIT_LTMR64H
-            start64Timer();
-#endif
-            break;
-        case 0x01:
-            haveFrame = (!finished && bufferHasData);
-            // If the TAS is finished, there's nothing left to do.
-            if (haveFrame)
-              memcpy(output_buffer, inputBuffer + bufferPos, 4);
-            else
-              memset(output_buffer, 0, 4);
-
-            // blast out the pre-assembled array in output_buffer
-            n64_send(output_buffer, 4, 1);
-
-            logFrame(output_buffer, 4, curFrame + (haveFrame ? 1 : 0));
-
-            if (!haveFrame)
-              break;
-
-            // update input buffer and make sure it doesn't take too long
-
-           /*Serial.print(F("Pos: "));
-            Serial.print(bufferPos);
-            Serial.print(F(" Data: "));
-            Serial.println(inputBuffer[bufferPos]);*/
-
-            advanceBuffer(4);
-
-//            while (Serial.availableForWrite() && readTimer() < 10 * 1000 * MICRO_CYCLES && N64_QUERY);
-
-/*            if (!finished)
-              curPos = (curFrame * screen.width()) / numFrames;
-            screen.fill(255,0,0);
-            while (progressPos < curPos) {
-              screen.point(progressPos++, screen.height() - 1);
-            }
-            screen.fill(255,255,255);*/
-
-            break;
-        case 0x02:
-            // A read. If the address is 0x8000, return 32 bytes of 0x80 bytes,
-            // and a CRC byte.  this tells the system our attached controller
-            // pack is a rumble pack
-
-            // Assume it's a read for 0x8000, which is the only thing it should
-            // be requesting anyways
-            memset(output_buffer, 0x80, 32);
-            output_buffer[32] = 0xB8; // CRC
-
-            n64_send(output_buffer, 33, 1);
-            logFromISR("L:Got a read, what?");
-
-            //Serial.println("It was 0x02: the read command");
-            break;
-        case 0x03:
-            // A write. we at least need to respond with a single CRC byte.  If
-            // the write was to address 0xC000 and the data was 0x01, turn on
-            // rumble! All other write addresses are ignored. (but we still
-            // need to return a CRC)
-
-            // decode the first data byte (fourth overall byte), bits indexed
-            // at 24 through 31
-            data = 0;
-            data |= (n64_raw_dump[16] != 0) << 7;
-            data |= (n64_raw_dump[17] != 0) << 6;
-            data |= (n64_raw_dump[18] != 0) << 5;
-            data |= (n64_raw_dump[19] != 0) << 4;
-            data |= (n64_raw_dump[20] != 0) << 3;
-            data |= (n64_raw_dump[21] != 0) << 2;
-            data |= (n64_raw_dump[22] != 0) << 1;
-            data |= (n64_raw_dump[23] != 0);
-
-            // get crc byte, invert it, as per the protocol for
-            // having a memory card attached
-            output_buffer[0] = crc_repeating_table[data] ^ 0xFF;
-
-            // send it
-            n64_send(output_buffer, 1, 1);
-            logFromISR("L:Got a write, what?");
-
-            // end of time critical code
-            // was the address the rumble latch at 0xC000?
-            // decode the first half of the address, bits
-            // 8 through 15
-            addr = 0;
-            addr |= (n64_raw_dump[0] != 0) << 7;
-            addr |= (n64_raw_dump[1] != 0) << 6;
-            addr |= (n64_raw_dump[2] != 0) << 5;
-            addr |= (n64_raw_dump[3] != 0) << 4;
-            addr |= (n64_raw_dump[4] != 0) << 3;
-            addr |= (n64_raw_dump[5] != 0) << 2;
-            addr |= (n64_raw_dump[6] != 0) << 1;
-            addr |= (n64_raw_dump[7] != 0);
-
-            //Serial.println("It was 0x03: the write command");
-            //Serial.print("Addr was 0x");
-            //Serial.print(addr, HEX);
-            //Serial.print(" and data was 0x");
-            //Serial.println(data, HEX);
-            break;
-
-        case -1:
-            if (finished)
-              break;
-            logFromISR("W:RTO; %d read; b:%02hhx; %d since; %d/%d to 1/2", edgesRead, incompleteCommand, ticksSinceLast, firstEdgeTime, secondEdgeTime);
-            if (curFrame > 100)
-              logFromISR("D:timeout");
-            waitForIdle(1000);
-            break;
-
-        default:
-            if (finished)
-              break;
-            logFromISR("W:Unknown; %d read; b:%02hhx; %d since; %d/%d to 1/2", edgesRead, n64_command, ticksSinceLast, firstEdgeTime, secondEdgeTime);
-            if (curFrame > 100)
-              logFromISR("D:inval");
-            waitForIdle(1000);
-            break;
-    }
-
-#ifdef ENABLE_N64_INTERRUPT
-    ENABLE_N64_INTERRUPT();
-#endif
-
-    interrupts();
-}
-
-#ifdef SNES_DATA_PIN
-static void snesWriteBit()
-{
-  digitalWrite(SNES_DATA_PIN, (currentSnesFrame & 0x8000) ? LOW : HIGH);
-  if (currentSnesFrame & 0x8000)
-    LED_HIGH;
-  else
-    LED_LOW;
-  currentSnesFrame <<= 1;
-  currentSnesFrame |= 1;
-}
-
-static void snesLatchInterrupt()
-{
-  noInterrupts();
-  int haveFrame = (!finished && bufferHasData);
-  int len = (console == SNES) ? 2 : 1;
-  if (!haveFrame) {
-    unsigned char logBuf[2] = {0, 0};
-    currentSnesFrame = 0;
-    logFrame(logBuf, len, curFrame + 1);
-  } else {
-    if (console == NES) {
-      currentSnesFrame = (inputBuffer[bufferPos] << 8) | 0xFF;
-    } else {
-      currentSnesFrame = (inputBuffer[bufferPos] << 8) | inputBuffer[bufferPos + 1];
-    }
-    logFrame(inputBuffer + bufferPos, len, curFrame + 1);
-  }
-  snesWriteBit();
-  if (readTimer() >= frameDuration) {
-    startTimer();
-    if (haveFrame)
-      advanceBuffer(len);
-  }
-  interrupts();
-}
-
-static void snesClockInterrupt()
-{
-  noInterrupts();
-  snesWriteBit();
-  interrupts();
-}
-#endif
-
-#ifdef HAVE_EEPROM
-static void setEEPROM(const String& cmd)
-{
-  // Write terminator first, so we won't overread (by much) if we die early
-  EEPROM.write(cmd.length(), 0);
-  unsigned j = 0;
-  for (unsigned i = 0; i < cmd.length(); i++, j++) {
-    if (cmd[i] == '\\' && cmd[i + 1] == 'n') {
-      EEPROM.write(j, '\n');
-      i++;
-    } else if (cmd[i] == '\\' && cmd[i + 1] == '\\') {
-      EEPROM.write(j, '\\');
-      i++;
-    } else {
-      EEPROM.write(j, cmd[i]);
-    }
-  }
-  EEPROM.write(j, 0);
-
-  lockedPrintln("L:Finished writing to EEPROM:", cmd.c_str());
-}
-#endif
-
-static void handleCommand(const String& cmd)
-{
-  if (cmd.startsWith("M:")) {
-    openTAS(cmd.substring(2));
-  } else if (cmd.startsWith("O:")) {
-    //dummy
-  } else if (cmd.startsWith("L:")) {
-    emitList(cmd.substring(2));
-  } else if (cmd.startsWith("MK:")) {
-    lockedPrintln("MK:", sd.mkdir(cmd.substring(3).c_str()));
-  } else if (cmd.startsWith("CR:")) {
-    if (writeFile.isOpen()) {
-      writeFile.close();
-    }
-    if (writeFile.open(&sd, cmd.substring(3).c_str(), O_WRITE | O_CREAT | O_TRUNC)) {
-      lockedPrintln("CR:OK");
-    } else {
-      lockedPrintln("CR:NAK");
-    }
-  } else if (cmd.startsWith("AP:")) {
-    appendData(hextobin(cmd.substring(3)));
-  } else if (cmd.startsWith("IN:")) {
-    size_t len = appendInputs(hextobin(cmd.substring(3)));
-    lockedPrintln("IN:", len);
-  } else if (cmd.startsWith("HL:")) {
-    hold = cmd[3] == '1';
-  } else if (cmd.startsWith("CL:")) {
-    writeFile.close();
-    lockedPrintln("CL:OK");
-#ifdef HAVE_GPIO_COMMANDS
-  } else if (cmd.startsWith("PM:")) {
-    setPinMode(cmd.substring(3));
-  } else if (cmd.startsWith("DW:")) {
-    writePin(cmd.substring(3));
-#endif
-#ifdef POWER_PIN
-  } else if (cmd.startsWith("PW:")) {
-    setPower(cmd.substring(3));
-#endif
-  } else if (cmd.startsWith("SC:")) {
-    setConsole(cmd.substring(3));
-#ifdef HAVE_EEPROM
-  } else if (cmd.startsWith("WN:")) {
-    setEEPROM(cmd.substring(3));
-#endif
-  } else if (cmd.startsWith("LO:")) {
-    setLoop(cmd.substring(3));
-  } else {
-    lockedPrintln("E:Unknown CMD:", cmd.c_str());
-  }
-}
-
-static void handleChar(int newChar)
-{
-  if (newChar == '\n') {
-    if (skippingInput)
-      Serial.println("E:Skipped too-long line");
-    else
-      handleCommand(inputString);
-    inputString = "";
-    skippingInput = false;
-  } else if (inputString.length() > MAX_CMD_LEN) {
-    skippingInput = true;
-  } else {
-    inputString += (char)newChar;
-  }
-}
-
-static void inputLoop()
-{
-  int newChar;
-  int charsRead = 0;
-  while ((newChar = Serial.read()) != -1 && (charsRead++ <= MAX_LOOP_LEN))
-    handleChar(newChar);
-}
-
-static void mainLoop()
-{
-  updateInputBuffer();
-
-  // Record if it took longer than expected
-  /*updateTime = readTimer();
-  if (updateTime > 1000 * MICRO_CYCLES) {
-      Serial.print(F("Input buffer update took too long ("));
-      Serial.print(updateTime / MICRO_CYCLES);
-      Serial.println(F(" us)"));
-  }*/
-}
-
-#ifdef HAVE_EEPROM
-static void runEEPROM()
-{
-  int i = 0;
-  while (i < 1000) {
-    int c = EEPROM.read(i);
-    if (!c)
-      break;
-    handleChar(c);
-    i++;
-  }
-  if (i)
-    handleChar('\n');
-}
-#endif
-
-void loop()
-{
-  inputLoop();
-  mainLoop();
-#ifdef HAVE_EEPROM
-  if (doLoop) {
-    static bool isClearing = false;
-    uint64_t curTime = read64Timer();
-
-    if ((finished && timer64Started && (curTime - finalTime) > (MICRO_BUS_CYCLES * 1000 * 1000 * (isClearing ? 1 : 30)))
-//        || (timer64Started && (curTime - lastFrameTime) > (MICRO_BUS_CYCLES * 1000 * 1000 * 30))
-       ) {
-      setPower("0");
-      while ((read64Timer() - curTime) < (MICRO_BUS_CYCLES * 1000 * 1000 * 2));
-      isClearing = !isClearing;
-      if (isClearing)
-        openTAS("clear.m64");
-      else
-        runEEPROM();
-    }
-  }
-#endif
-
-  bool first = true;
-  bool gotData = false;
-  do {
-    int i = 0;
-    gotData = false;
-    if (first) {
-      for (; i < N_SER_BUFS; i++) {
-        if (!bufHasData[i])
-          break;
-        else
-          gotData = true;
-      }
-    }
-    first = false;
-    for (; i < N_SER_BUFS; i++) {
-      if (bufHasData[i]) {
-#ifdef LOG_CB
-        LOG_CB(&serBuffer[i][0]);
-#endif
-        Serial.println(&serBuffer[i][0]);
-        bufHasData[i] = 0;
-        Serial.flush();
-        gotData = true;
-      }
-    }
-  } while (gotData);
-}
-
-#ifdef VI_PIN
-static void viInterrupt()
-{
-  viCount++;
-}
-#endif
-
-void printSDError(const char* msg) {
-  (void)msg;
-  if (sd.sdErrorCode()) {
-    if (sd.sdErrorCode() == SD_CARD_ERROR_ACMD41) {
-      Serial.println("Try power cycling the SD card.");
-    }
-    printSdErrorSymbol(&Serial, sd.sdErrorCode());
-    Serial.print(", ErrorData: 0X");
-    Serial.println(sd.sdErrorData(), HEX);
-  }
-}
-
-void setup()
-{
-#ifdef ARM_DEMCR
-  ARM_DEMCR |= ARM_DEMCR_TRCENA;
-#endif
-#ifdef ARM_DWT_CTRL
-  ARM_DWT_CTRL |= ARM_DWT_CTRL_CYCCNTENA;
-#endif
-
-  startTimer();
-
-#ifdef SERIAL_TIMEOUT_US
-  while (readTimer() > MICRO_CYCLES * 1000 * 1000);
-#endif
-
-  Serial.begin(SERIAL_BAUD_RATE);
-
-#ifdef SERIAL_TIMEOUT_US
-  while (!Serial) {
-    if (readTimer() > MICRO_CYCLES * SERIAL_TIMEOUT_US) {
-      doLoop = 1;
-      break;
-    }
-  } // wait for serial port to connect. Needed for native USB port only
-
-  Serial.print(F("L:Serial init timer exited: doLoop="));
-  Serial.println(doLoop);
-#endif
-
-  LED_HIGH;
-
-  // Status LED
-#ifdef STATUS_PIN
-  digitalWrite(STATUS_PIN, LOW);
-  pinMode(STATUS_PIN, OUTPUT);
-#endif
-
-  // Configure controller pins
-#ifdef N64_PIN
-  pinMode(N64_PIN, INPUT_PULLUP);
-  digitalWrite(N64_PIN, LOW);
-#endif
-
-#ifdef SNES_LATCH_PIN
-  pinMode(SNES_LATCH_PIN, INPUT);
-  pinMode(SNES_CLOCK_PIN, INPUT);
-  pinMode(SNES_DATA_PIN, OUTPUT);
-  digitalWrite(SNES_DATA_PIN, LOW);
-#endif
-
-  // Power
-#ifdef POWER_PIN
-  digitalWrite(POWER_PIN, LOW);
-  pinMode(POWER_PIN, OUTPUT);
-#endif
-
-  // VI pulse
-#ifdef VI_PIN
-  pinMode(VI_PIN, INPUT);
-  attachInterrupt(VI_PIN, viInterrupt, FALLING);
-#endif
-
-  // Let the controller pins interrupt anything else
-#ifdef IRQ_PORTC
-  NVIC_SET_PRIORITY(IRQ_PORTC, 0);
-#endif
-
-  // Let the VI pin interrupt anything other than controller pins
-//  NVIC_SET_PRIORITY(IRQ_PORTC, 16);
-
-#ifndef SD_CONFIG
-#define SD_CONFIG BUILTIN_SDCARD
-#endif
-
-  // Initialize SD card
-  if (!sd.begin(SD_CONFIG)) {
-    printSDError("init");
-    Serial.println(F("E:SD initialization failed!"));
-    return;
-  }
-  Serial.println(F("L:SD initialization done."));
-
-  // Setup buffer
-  initBuffers();
-
-  Serial.println(F("L:Initialization done."));
-
-#ifdef HAVE_EEPROM
-  if (doLoop)
-    runEEPROM();
-#endif
-}

+ 0 - 325
apps_source_code/4inrow_game/4inrow.c

@@ -1,325 +0,0 @@
-#include <stdio.h>
-#include <furi.h>
-#include <gui/gui.h>
-#include <input/input.h>
-#include <notification/notification.h>
-#include <notification/notification_messages.h>
-#include <dolphin/dolphin.h>
-
-static int matrix[6][7] = {0};
-static int cursorx = 3;
-static int cursory = 5;
-static int player = 1;
-static int scoreX = 0;
-static int scoreO = 0;
-
-typedef struct {
-    FuriMutex* mutex;
-} FourInRowState;
-
-void init() {
-    for(size_t i = 0; i < 6; i++) {
-        for(size_t j = 0; j < 7; j++) {
-            matrix[i][j] = 0;
-        }
-    }
-    cursorx = 3;
-    cursory = 5;
-    player = 1;
-}
-
-const NotificationSequence end = {
-    &message_vibro_on,
-
-    &message_note_ds4,
-    &message_delay_10,
-    &message_sound_off,
-    &message_delay_10,
-
-    &message_note_ds4,
-    &message_delay_10,
-    &message_sound_off,
-    &message_delay_10,
-
-    &message_note_ds4,
-    &message_delay_10,
-    &message_sound_off,
-    &message_delay_10,
-
-    &message_vibro_off,
-    NULL,
-};
-
-void intToStr(int num, char* str) {
-    int i = 0, sign = 0;
-
-    if(num < 0) {
-        num = -num;
-        sign = 1;
-    }
-
-    do {
-        str[i++] = num % 10 + '0';
-        num /= 10;
-    } while(num > 0);
-
-    if(sign) {
-        str[i++] = '-';
-    }
-
-    str[i] = '\0';
-
-    // Reverse the string
-    int j, len = i;
-    char temp;
-    for(j = 0; j < len / 2; j++) {
-        temp = str[j];
-        str[j] = str[len - j - 1];
-        str[len - j - 1] = temp;
-    }
-}
-
-int next_height(int x) {
-    if(matrix[0][x] != 0) {
-        return -1;
-    }
-    for(size_t y = 1; y < 6; y++) {
-        if(matrix[y][x] != 0) {
-            return y - 1;
-        }
-    }
-    return 5;
-}
-
-int wincheck() {
-    for(size_t y = 0; y <= 2; y++) {
-        for(size_t x = 0; x <= 6; x++) {
-            if(matrix[y][x] != 0 && matrix[y][x] == matrix[y + 1][x] &&
-               matrix[y][x] == matrix[y + 2][x] && matrix[y][x] == matrix[y + 3][x]) {
-                return matrix[y][x];
-            }
-        }
-    }
-
-    for(size_t y = 0; y <= 5; y++) {
-        for(size_t x = 0; x <= 3; x++) {
-            if(matrix[y][x] != 0 && matrix[y][x] == matrix[y][x + 1] &&
-               matrix[y][x] == matrix[y][x + 2] && matrix[y][x] == matrix[y][x + 3]) {
-                return matrix[y][x];
-            }
-        }
-    }
-
-    for(size_t y = 0; y <= 2; y++) {
-        for(size_t x = 0; x <= 3; x++) {
-            if(matrix[y][x] != 0 && matrix[y][x] == matrix[y + 1][x + 1] &&
-               matrix[y][x] == matrix[y + 2][x + 2] && matrix[y][x] == matrix[y + 3][x + 3]) {
-                return matrix[y][x];
-            }
-        }
-    }
-
-    for(size_t y = 3; y <= 5; y++) {
-        for(size_t x = 0; x <= 3; x++) {
-            if(matrix[y][x] != 0 && matrix[y][x] == matrix[y - 1][x + 1] &&
-               matrix[y][x] == matrix[y - 2][x + 2] && matrix[y][x] == matrix[y - 3][x + 3]) {
-                return matrix[y][x];
-            }
-        }
-    }
-
-    bool tf = true;
-    for(size_t y = 0; y < 6; y++) {
-        for(size_t x = 0; x < 7; x++) {
-            if(matrix[y][x] == 0) {
-                tf = false;
-            }
-        }
-    }
-    if(tf) {
-        return 0;
-    }
-
-    return -1;
-}
-
-static void draw_callback(Canvas* canvas, void* ctx) {
-    furi_assert(ctx);
-    const FourInRowState* fourinrow_state = ctx;
-
-    furi_mutex_acquire(fourinrow_state->mutex, FuriWaitForever);
-    canvas_clear(canvas);
-
-    if(wincheck() != -1) {
-        canvas_set_font(canvas, FontPrimary);
-
-        if(wincheck() == 0) {
-            canvas_draw_str(canvas, 30, 35, "Draw! O_o");
-        }
-        if(wincheck() == 1) {
-            canvas_draw_str(canvas, 30, 35, "Player X win!");
-        }
-        if(wincheck() == 2) {
-            canvas_draw_str(canvas, 30, 35, "Player O win!");
-        }
-
-        furi_mutex_release(fourinrow_state->mutex);
-
-        return;
-    }
-
-    for(size_t i = 0; i < 6; i++) {
-        for(size_t j = 0; j < 7; j++) {
-            char el[2];
-            switch(matrix[i][j]) {
-            case 0:
-                strcpy(el, "_\0");
-                break;
-
-            case 1:
-                strcpy(el, "X\0");
-                break;
-
-            case 2:
-                strcpy(el, "O\0");
-                break;
-            }
-            canvas_draw_str(canvas, j * 10 + 10, i * 10 + 10, el);
-        }
-    }
-    canvas_draw_str(canvas, cursorx * 10 + 8, cursory * 10 + 10, "[ ]");
-
-    if(player == 1) {
-        canvas_draw_str(canvas, 80, 10, "Turn: X");
-    }
-    if(player == 2) {
-        canvas_draw_str(canvas, 80, 10, "Turn: O");
-    }
-    char scX[1];
-    intToStr(scoreX, scX);
-    char scO[1];
-    intToStr(scoreO, scO);
-
-    canvas_draw_str(canvas, 80, 20, "X:");
-    canvas_draw_str(canvas, 90, 20, scX);
-
-    canvas_draw_str(canvas, 80, 30, "O:");
-    canvas_draw_str(canvas, 90, 30, scO);
-
-    furi_mutex_release(fourinrow_state->mutex);
-}
-
-static void input_callback(InputEvent* input_event, void* ctx) {
-    // Проверяем, что контекст не нулевой
-    furi_assert(ctx);
-    FuriMessageQueue* event_queue = ctx;
-
-    furi_message_queue_put(event_queue, input_event, FuriWaitForever);
-}
-
-int32_t four_in_row_app(void* p) {
-    UNUSED(p);
-
-    // Текущее событие типа InputEvent
-    InputEvent event;
-    // Очередь событий на 8 элементов размера InputEvent
-    FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(InputEvent));
-
-    FourInRowState* fourinrow_state = malloc(sizeof(FourInRowState));
-
-    fourinrow_state->mutex = furi_mutex_alloc(FuriMutexTypeNormal); // Alloc Mutex
-    if(!fourinrow_state->mutex) {
-        FURI_LOG_E("4inRow", "cannot create mutex\r\n");
-        furi_message_queue_free(event_queue);
-        free(fourinrow_state);
-        return 255;
-    }
-
-    dolphin_deed(DolphinDeedPluginGameStart);
-
-    // Создаем новый view port
-    ViewPort* view_port = view_port_alloc();
-    // Создаем callback отрисовки, без контекста
-    view_port_draw_callback_set(view_port, draw_callback, fourinrow_state);
-    // Создаем callback нажатий на клавиши, в качестве контекста передаем
-    // нашу очередь сообщений, чтоб запихивать в неё эти события
-    view_port_input_callback_set(view_port, input_callback, event_queue);
-
-    // Создаем GUI приложения
-    Gui* gui = furi_record_open(RECORD_GUI);
-    // Подключаем view port к GUI в полноэкранном режиме
-    gui_add_view_port(gui, view_port, GuiLayerFullscreen);
-    NotificationApp* notification = furi_record_open(RECORD_NOTIFICATION);
-    notification_message_block(notification, &sequence_display_backlight_enforce_on);
-
-    // Бесконечный цикл обработки очереди событий
-    while(1) {
-        // Выбираем событие из очереди в переменную event (ждем бесконечно долго, если очередь пуста)
-        // и проверяем, что у нас получилось это сделать
-        if(furi_message_queue_get(event_queue, &event, FuriWaitForever) == FuriStatusOk) {
-            if((event.type == InputTypePress) && (event.key == InputKeyBack)) {
-                break;
-            }
-
-            furi_mutex_acquire(fourinrow_state->mutex, FuriWaitForever);
-            if(wincheck() != -1) {
-                notification_message(notification, &end);
-                furi_delay_ms(1000);
-                if(wincheck() == 1) {
-                    scoreX++;
-                }
-                if(wincheck() == 2) {
-                    scoreO++;
-                }
-                init();
-                furi_mutex_release(fourinrow_state->mutex);
-                continue;
-            }
-
-            if(event.type == InputTypePress) {
-                if(event.key == InputKeyOk) {
-                    int nh = next_height(cursorx);
-                    if(nh != -1) {
-                        matrix[nh][cursorx] = player;
-                        player = 3 - player;
-                    }
-                }
-                if(event.key == InputKeyUp) {
-                    //cursory--;
-                }
-                if(event.key == InputKeyDown) {
-                    //cursory++;
-                }
-                if(event.key == InputKeyLeft) {
-                    if(cursorx > 0) {
-                        cursorx--;
-                    }
-                }
-                if(event.key == InputKeyRight) {
-                    if(cursorx < 6) {
-                        cursorx++;
-                    }
-                }
-            }
-
-            furi_mutex_release(fourinrow_state->mutex);
-        }
-        view_port_update(view_port);
-    }
-
-    // Чистим созданные объекты, связанные с интерфейсом
-    view_port_enabled_set(view_port, false);
-    gui_remove_view_port(gui, view_port);
-    view_port_free(view_port);
-    furi_message_queue_free(event_queue);
-    furi_record_close(RECORD_GUI);
-    // Clear notification
-    notification_message_block(notification, &sequence_display_backlight_enforce_auto);
-    furi_record_close(RECORD_NOTIFICATION);
-
-    furi_mutex_free(fourinrow_state->mutex);
-
-    free(fourinrow_state);
-
-    return 0;
-}

TEMPAT SAMPAH
apps_source_code/4inrow_game/4inrow_10px.png


+ 0 - 1
apps_source_code/4inrow_game/ReadMe.md

@@ -1 +0,0 @@
-Four in row for flipper zero!!

+ 0 - 17
apps_source_code/4inrow_game/application.fam

@@ -1,17 +0,0 @@
-App(
-    appid="4inrow",
-    name="4 in row",
-    apptype=FlipperAppType.EXTERNAL,
-    entry_point="four_in_row_app",
-    requires=[
-        "gui",
-    ],
-    stack_size=1 * 1024,
-    order=90,
-    fap_icon="4inrow_10px.png",
-    fap_category="Games",
-    fap_author="leo-need-more-coffee",
-    fap_weburl="https://github.com/leo-need-more-coffee/flipperzero-4inrow",
-    fap_version="1.1",
-    fap_description="4 in row Game",
-)

TEMPAT SAMPAH
apps_source_code/4inrow_game/img/1.png


TEMPAT SAMPAH
apps_source_code/4inrow_game/img/2.png


TEMPAT SAMPAH
apps_source_code/4inrow_game/img/3.png


+ 0 - 52
apps_source_code/Snake_2/.gitignore

@@ -1,52 +0,0 @@
-# Prerequisites
-*.d
-
-# Object files
-*.o
-*.ko
-*.obj
-*.elf
-
-# Linker output
-*.ilk
-*.map
-*.exp
-
-# Precompiled Headers
-*.gch
-*.pch
-
-# Libraries
-*.lib
-*.a
-*.la
-*.lo
-
-# Shared objects (inc. Windows DLLs)
-*.dll
-*.so
-*.so.*
-*.dylib
-
-# Executables
-*.exe
-*.out
-*.app
-*.i*86
-*.x86_64
-*.hex
-
-# Debug files
-*.dSYM/
-*.su
-*.idb
-*.pdb
-
-# Kernel Module Compile Results
-*.mod*
-*.cmd
-.tmp_versions/
-modules.order
-Module.symvers
-Mkfile.old
-dkms.conf

+ 0 - 28
apps_source_code/Snake_2/ReadMe.md

@@ -1,28 +0,0 @@
-# SNAKE 2.0
-
-A new version of Snake Game.
-
-![Snake_2.0](https://github.com/Willzvul/Snake_2.0/blob/main/Snake%202.0.png)
-
-
-## Features
-
-1. Pause of game proccess
-2. Possibility of speed Up by holding the arrows
-3. Snake has a head.
-4. The target is an apple
-5. Complete progress bar
-
-## Building FAP
-
-https://fap.playmean.xyz/Willzvul/Snake_2.0
-
-## Links
-
-Special thanks for *.c file in https://github.com/DarkFlippers/unleashed-firmware.git
-
-## Free Beer
-
-You can support me by using this link:
-(only RU payments accepted) 
-https://yoomoney.ru/to/410018138145748/100

TEMPAT SAMPAH
apps_source_code/Snake_2/Snake 2.0.png


+ 0 - 16
apps_source_code/Snake_2/application.fam

@@ -1,16 +0,0 @@
-App(
-    appid="snake20",
-    name="Snake 2.0",
-    apptype=FlipperAppType.EXTERNAL,
-    entry_point="snake_20_app",
-    cdefines=["APP_SNAKE_20"],
-    requires=["gui"],
-    stack_size=1 * 1024,
-    order=30,
-    fap_icon="snake_10px.png",
-    fap_category="Games",
-    fap_author="@Willzvul",
-    fap_weburl="https://github.com/Willzvul/Snake_2.0",
-    fap_version="2.1",
-    fap_description="Advanced Snake Game (Remake of original Snake)",
-)

TEMPAT SAMPAH
apps_source_code/Snake_2/img/1.png


TEMPAT SAMPAH
apps_source_code/Snake_2/img/2.png


TEMPAT SAMPAH
apps_source_code/Snake_2/img/3.png


TEMPAT SAMPAH
apps_source_code/Snake_2/snake_10px.png


+ 0 - 528
apps_source_code/Snake_2/snake_20.c

@@ -1,528 +0,0 @@
-#include <furi.h>
-#include <gui/gui.h>
-#include <input/input.h>
-#include <stdlib.h>
-#include <dolphin/dolphin.h>
-#include <notification/notification.h>
-#include <notification/notification_messages.h>
-
-typedef struct {
-    //    +-----x
-    //    |
-    //    |
-    //    y
-    uint8_t x;
-    uint8_t y;
-} Point;
-
-typedef enum {
-    GameStateLife,
-    GameStatePause,
-    // https://melmagazine.com/en-us/story/snake-nokia-6110-oral-history-taneli-armanto
-    // Armanto: While testing the early versions of the game, I noticed it was hard
-    // to control the snake upon getting close to and edge but not crashing — especially
-    // in the highest speed levels. I wanted the highest level to be as fast as I could
-    // possibly make the device "run," but on the other hand, I wanted to be friendly
-    // and help the player manage that level. Otherwise it might not be fun to play. So
-    // I implemented a little delay. A few milliseconds of extra time right before
-    // the player crashes, during which she can still change the directions. And if
-    // she does, the game continues.
-    GameStateLastChance,
-    GameStateGameOver,
-} GameState;
-
-// Note: do not change without purpose. Current values are used in smart
-// orthogonality calculation in `snake_game_get_turn_snake`.
-typedef enum {
-    DirectionUp,
-    DirectionRight,
-    DirectionDown,
-    DirectionLeft,
-} Direction;
-
-#define MAX_SNAKE_LEN 15 * 31 //128 * 64 / 4
-
-#define x_back_symbol 50
-#define y_back_symbol 9
-
-typedef struct {
-    FuriMutex* mutex;
-    Point points[MAX_SNAKE_LEN];
-    uint16_t len;
-    Direction currentMovement;
-    Direction nextMovement; // if backward of currentMovement, ignore
-    Point fruit;
-    GameState state;
-} SnakeState;
-
-typedef enum {
-    EventTypeTick,
-    EventTypeKey,
-} EventType;
-
-typedef struct {
-    EventType type;
-    InputEvent input;
-} SnakeEvent;
-
-const NotificationSequence sequence_fail = {
-    &message_vibro_on,
-
-    &message_note_ds4,
-    &message_delay_10,
-    &message_sound_off,
-    &message_delay_10,
-
-    &message_note_ds4,
-    &message_delay_10,
-    &message_sound_off,
-    &message_delay_10,
-
-    &message_note_ds4,
-    &message_delay_10,
-    &message_sound_off,
-    &message_delay_10,
-
-    &message_vibro_off,
-    NULL,
-};
-
-const NotificationSequence sequence_eat = {
-
-    &message_vibro_on,
-    &message_note_c7,
-    &message_delay_50,
-    &message_sound_off,
-    &message_vibro_off,
-    NULL,
-};
-
-static void snake_game_render_callback(Canvas* const canvas, void* ctx) {
-    furi_assert(ctx);
-    const SnakeState* snake_state = ctx;
-    furi_mutex_acquire(snake_state->mutex, FuriWaitForever);
-
-    // Before the function is called, the state is set with the canvas_reset(canvas)
-
-    // Frame
-    canvas_draw_frame(canvas, 0, 0, 128, 64);
-
-    // Fruit
-    Point f = snake_state->fruit;
-    f.x = f.x * 4 + 1;
-    f.y = f.y * 4 + 1;
-    canvas_draw_rframe(canvas, f.x, f.y, 6, 6, 2);
-    canvas_draw_dot(canvas, f.x + 3, f.y - 1);
-    canvas_draw_dot(canvas, f.x + 4, f.y - 2);
-    //canvas_draw_dot(canvas,f.x+4,f.y-3);
-
-    // Snake
-    for(uint16_t i = 0; i < snake_state->len; i++) {
-        Point p = snake_state->points[i];
-        p.x = p.x * 4 + 2;
-        p.y = p.y * 4 + 2;
-        canvas_draw_box(canvas, p.x, p.y, 4, 4);
-        if(i == 0) {
-            canvas_set_color(canvas, ColorWhite);
-            canvas_draw_box(canvas, p.x + 1, p.y + 1, 2, 2);
-            canvas_set_color(canvas, ColorBlack);
-        }
-    }
-
-    // Pause and GameOver banner
-    if(snake_state->state == GameStatePause || snake_state->state == GameStateGameOver) {
-        // Screen is 128x64 px
-        canvas_set_color(canvas, ColorWhite);
-        canvas_draw_box(canvas, 33, 19, 64, 26);
-
-        canvas_set_color(canvas, ColorBlack);
-        canvas_draw_frame(canvas, 34, 20, 62, 24);
-
-        canvas_set_font(canvas, FontPrimary);
-        if(snake_state->state == GameStateGameOver) {
-            canvas_draw_str_aligned(canvas, 65, 31, AlignCenter, AlignBottom, "Game Over");
-        }
-        if(snake_state->state == GameStatePause) {
-            canvas_draw_str_aligned(canvas, 65, 31, AlignCenter, AlignBottom, "Pause");
-        }
-
-        canvas_set_font(canvas, FontSecondary);
-        char buffer[20];
-        snprintf(buffer, sizeof(buffer), "Score: %u", snake_state->len - 7U);
-        canvas_draw_str_aligned(canvas, 65, 41, AlignCenter, AlignBottom, buffer);
-
-        // Painting "back"-symbol, Help message for Exit App, ProgressBar
-        canvas_set_color(canvas, ColorWhite);
-        canvas_draw_box(canvas, 25, 2, 81, 11);
-        canvas_draw_box(canvas, 28, 54, 73, 9);
-        canvas_set_color(canvas, ColorBlack);
-        canvas_draw_str_aligned(
-            canvas, 65, 10, AlignCenter, AlignBottom, "Hold        to Exit App");
-        snprintf(
-            buffer, sizeof(buffer), "Complete: %-5.1f%%", (double)((snake_state->len - 7U) / 4.58));
-        canvas_draw_str_aligned(canvas, 65, 62, AlignCenter, AlignBottom, buffer);
-        {
-            canvas_draw_dot(canvas, x_back_symbol + 0, y_back_symbol);
-            canvas_draw_dot(canvas, x_back_symbol + 1, y_back_symbol);
-            canvas_draw_dot(canvas, x_back_symbol + 2, y_back_symbol);
-            canvas_draw_dot(canvas, x_back_symbol + 3, y_back_symbol);
-            canvas_draw_dot(canvas, x_back_symbol + 4, y_back_symbol);
-            canvas_draw_dot(canvas, x_back_symbol + 5, y_back_symbol - 1);
-            canvas_draw_dot(canvas, x_back_symbol + 6, y_back_symbol - 2);
-            canvas_draw_dot(canvas, x_back_symbol + 6, y_back_symbol - 3);
-            canvas_draw_dot(canvas, x_back_symbol + 5, y_back_symbol - 4);
-            canvas_draw_dot(canvas, x_back_symbol + 4, y_back_symbol - 5);
-            canvas_draw_dot(canvas, x_back_symbol + 3, y_back_symbol - 5);
-            canvas_draw_dot(canvas, x_back_symbol + 2, y_back_symbol - 5);
-            canvas_draw_dot(canvas, x_back_symbol + 1, y_back_symbol - 5);
-            canvas_draw_dot(canvas, x_back_symbol + 0, y_back_symbol - 5);
-            canvas_draw_dot(canvas, x_back_symbol - 1, y_back_symbol - 5);
-            canvas_draw_dot(canvas, x_back_symbol - 2, y_back_symbol - 5);
-            canvas_draw_dot(canvas, x_back_symbol - 3, y_back_symbol - 5);
-            canvas_draw_dot(canvas, x_back_symbol - 2, y_back_symbol - 6);
-            canvas_draw_dot(canvas, x_back_symbol - 2, y_back_symbol - 4);
-            canvas_draw_dot(canvas, x_back_symbol - 1, y_back_symbol - 6);
-            canvas_draw_dot(canvas, x_back_symbol - 1, y_back_symbol - 4);
-            canvas_draw_dot(canvas, x_back_symbol - 1, y_back_symbol - 7);
-            canvas_draw_dot(canvas, x_back_symbol - 1, y_back_symbol - 3);
-        }
-    }
-
-    furi_mutex_release(snake_state->mutex);
-}
-
-static void snake_game_input_callback(InputEvent* input_event, FuriMessageQueue* event_queue) {
-    furi_assert(event_queue);
-
-    SnakeEvent event = {.type = EventTypeKey, .input = *input_event};
-    furi_message_queue_put(event_queue, &event, FuriWaitForever);
-}
-
-static void snake_game_update_timer_callback(FuriMessageQueue* event_queue) {
-    furi_assert(event_queue);
-
-    SnakeEvent event = {.type = EventTypeTick};
-    furi_message_queue_put(event_queue, &event, 0);
-}
-
-static void snake_game_init_game(SnakeState* const snake_state) {
-    Point p[] = {{8, 6}, {7, 6}, {6, 6}, {5, 6}, {4, 6}, {3, 6}, {2, 6}};
-    memcpy(snake_state->points, p, sizeof(p)); //-V1086
-
-    snake_state->len = 7;
-
-    snake_state->currentMovement = DirectionRight;
-
-    snake_state->nextMovement = DirectionRight;
-
-    Point f = {18, 6};
-    snake_state->fruit = f;
-
-    snake_state->state = GameStateLife;
-}
-
-static Point snake_game_get_new_fruit(SnakeState const* const snake_state) {
-    // 1 bit for each point on the playing field where the snake can turn
-    // and where the fruit can appear
-    uint16_t buffer[8];
-    memset(buffer, 0, sizeof(buffer));
-    uint8_t empty = 8 * 16;
-
-    for(uint16_t i = 0; i < snake_state->len; i++) {
-        Point p = snake_state->points[i];
-
-        if(p.x % 2 != 0 || p.y % 2 != 0) {
-            continue;
-        }
-        p.x /= 2;
-        p.y /= 2;
-
-        buffer[p.y] |= 1 << p.x;
-        empty--;
-    }
-    // Bit set if snake use that playing field
-
-    uint16_t newFruit = rand() % empty;
-
-    // Skip random number of _empty_ fields
-    for(uint8_t y = 0; y < 8; y++) {
-        for(uint16_t x = 0, mask = 1; x < 16; x += 1, mask <<= 1) {
-            if((buffer[y] & mask) == 0) {
-                if(newFruit == 0) {
-                    Point p = {
-                        .x = x * 2,
-                        .y = y * 2,
-                    };
-                    return p;
-                }
-                newFruit--;
-            }
-        }
-    }
-    // We will never be here
-    Point p = {0, 0};
-    return p;
-}
-
-static bool snake_game_collision_with_frame(Point const next_step) {
-    // if x == 0 && currentMovement == left then x - 1 == 255 ,
-    // so check only x > right border
-    return next_step.x > 30 || next_step.y > 14;
-}
-
-static bool
-    snake_game_collision_with_tail(SnakeState const* const snake_state, Point const next_step) {
-    for(uint16_t i = 0; i < snake_state->len; i++) {
-        Point p = snake_state->points[i];
-        if(p.x == next_step.x && p.y == next_step.y) {
-            return true;
-        }
-    }
-
-    return false;
-}
-
-static Direction snake_game_get_turn_snake(SnakeState const* const snake_state) {
-    // Sum of two `Direction` lies between 0 and 6, odd values indicate orthogonality.
-    bool is_orthogonal = (snake_state->currentMovement + snake_state->nextMovement) % 2 == 1;
-    return is_orthogonal ? snake_state->nextMovement : snake_state->currentMovement;
-}
-
-static Point snake_game_get_next_step(SnakeState const* const snake_state) {
-    Point next_step = snake_state->points[0];
-    switch(snake_state->currentMovement) {
-    // +-----x
-    // |
-    // |
-    // y
-    case DirectionUp:
-        next_step.y--;
-        break;
-    case DirectionRight:
-        next_step.x++;
-        break;
-    case DirectionDown:
-        next_step.y++;
-        break;
-    case DirectionLeft:
-        next_step.x--;
-        break;
-    }
-    return next_step;
-}
-
-static void snake_game_move_snake(SnakeState* const snake_state, Point const next_step) {
-    memmove(snake_state->points + 1, snake_state->points, snake_state->len * sizeof(Point));
-    snake_state->points[0] = next_step;
-}
-
-static void
-    snake_game_process_game_step(SnakeState* const snake_state, NotificationApp* notification) {
-    if(snake_state->state == GameStateGameOver) {
-        return;
-    }
-
-    snake_state->currentMovement = snake_game_get_turn_snake(snake_state);
-
-    Point next_step = snake_game_get_next_step(snake_state);
-
-    bool crush = snake_game_collision_with_frame(next_step);
-    if(crush) {
-        if(snake_state->state == GameStateLife) {
-            snake_state->state = GameStateLastChance;
-            return;
-        } else if(snake_state->state == GameStateLastChance) {
-            snake_state->state = GameStateGameOver;
-            notification_message_block(notification, &sequence_fail);
-            return;
-        }
-    } else {
-        if(snake_state->state == GameStateLastChance) {
-            snake_state->state = GameStateLife;
-        }
-    }
-
-    crush = snake_game_collision_with_tail(snake_state, next_step);
-    if(crush) {
-        snake_state->state = GameStateGameOver;
-        notification_message_block(notification, &sequence_fail);
-        return;
-    }
-
-    bool eatFruit = (next_step.x == snake_state->fruit.x) && (next_step.y == snake_state->fruit.y);
-    if(eatFruit) {
-        snake_state->len++;
-        if(snake_state->len >= MAX_SNAKE_LEN) {
-            //You win!!!
-            snake_state->state = GameStateGameOver;
-            notification_message_block(notification, &sequence_fail);
-            return;
-        }
-    }
-
-    snake_game_move_snake(snake_state, next_step);
-
-    if(eatFruit) {
-        snake_state->fruit = snake_game_get_new_fruit(snake_state);
-        notification_message(notification, &sequence_eat);
-        notification_message(notification, &sequence_blink_red_100);
-    }
-}
-
-int32_t snake_20_app(void* p) {
-    UNUSED(p);
-
-    FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(SnakeEvent));
-
-    SnakeState* snake_state = malloc(sizeof(SnakeState));
-    snake_game_init_game(snake_state);
-
-    snake_state->mutex = furi_mutex_alloc(FuriMutexTypeNormal);
-    if(!snake_state->mutex) {
-        FURI_LOG_E("SnakeGame", "cannot create mutex\r\n");
-        furi_message_queue_free(event_queue);
-        free(snake_state);
-        return 255;
-    }
-
-    ViewPort* view_port = view_port_alloc();
-    view_port_draw_callback_set(view_port, snake_game_render_callback, snake_state);
-    view_port_input_callback_set(view_port, snake_game_input_callback, event_queue);
-
-    FuriTimer* timer =
-        furi_timer_alloc(snake_game_update_timer_callback, FuriTimerTypePeriodic, event_queue);
-    furi_timer_start(timer, furi_kernel_get_tick_frequency() / 4);
-
-    // Open GUI and register view_port
-    Gui* gui = furi_record_open(RECORD_GUI);
-    gui_add_view_port(gui, view_port, GuiLayerFullscreen);
-    NotificationApp* notification = furi_record_open(RECORD_NOTIFICATION);
-
-    notification_message_block(notification, &sequence_display_backlight_enforce_on);
-
-    dolphin_deed(DolphinDeedPluginGameStart);
-
-    SnakeEvent event;
-    for(bool processing = true; processing;) {
-        FuriStatus event_status = furi_message_queue_get(event_queue, &event, 100);
-
-        furi_mutex_acquire(snake_state->mutex, FuriWaitForever);
-
-        if(event_status == FuriStatusOk) {
-            if(event.type == EventTypeKey) {
-                // press events
-                if(event.input.type == InputTypePress) {
-                    switch(event.input.key) {
-                    case InputKeyUp:
-                        if(snake_state->state != GameStatePause) {
-                            snake_state->nextMovement = DirectionUp;
-                        }
-                        break;
-                    case InputKeyDown:
-                        if(snake_state->state != GameStatePause) {
-                            snake_state->nextMovement = DirectionDown;
-                        }
-                        break;
-                    case InputKeyRight:
-                        if(snake_state->state != GameStatePause) {
-                            snake_state->nextMovement = DirectionRight;
-                        }
-                        break;
-                    case InputKeyLeft:
-                        if(snake_state->state != GameStatePause) {
-                            snake_state->nextMovement = DirectionLeft;
-                        }
-                        break;
-                    case InputKeyOk:
-                        if(snake_state->state == GameStateGameOver) {
-                            snake_game_init_game(snake_state);
-                        }
-                        if(snake_state->state == GameStatePause) {
-                            furi_timer_start(timer, furi_kernel_get_tick_frequency() / 4);
-                            snake_state->state = GameStateLife;
-                        }
-                        break;
-                    case InputKeyBack:
-                        if(snake_state->state == GameStateLife) {
-                            furi_timer_stop(timer);
-                            snake_state->state = GameStatePause;
-                            break;
-                        }
-                        if(snake_state->state == GameStatePause) {
-                            furi_timer_start(timer, furi_kernel_get_tick_frequency() / 4);
-                            snake_state->state = GameStateLife;
-                            break;
-                        }
-                        if(snake_state->state == GameStateGameOver) {
-                            snake_game_init_game(snake_state);
-                        }
-                    default:
-                        break;
-                    }
-                }
-                //LongPress Events
-                if(event.input.type == InputTypeLong) {
-                    switch(event.input.key) {
-                    case InputKeyUp:
-                        if(snake_state->state != GameStatePause) {
-                            snake_state->nextMovement = DirectionUp;
-                            furi_timer_start(timer, furi_kernel_get_tick_frequency() / 8);
-                        }
-                        break;
-                    case InputKeyDown:
-                        if(snake_state->state != GameStatePause) {
-                            snake_state->nextMovement = DirectionDown;
-                            furi_timer_start(timer, furi_kernel_get_tick_frequency() / 8);
-                        }
-                        break;
-                    case InputKeyRight:
-                        if(snake_state->state != GameStatePause) {
-                            snake_state->nextMovement = DirectionRight;
-                            furi_timer_start(timer, furi_kernel_get_tick_frequency() / 8);
-                        }
-                        break;
-                    case InputKeyLeft:
-                        if(snake_state->state != GameStatePause) {
-                            snake_state->nextMovement = DirectionLeft;
-                            furi_timer_start(timer, furi_kernel_get_tick_frequency() / 8);
-                        }
-                        break;
-                    case InputKeyBack:
-                        processing = false;
-                        break;
-                    default:
-                        break;
-                    }
-                }
-                //ReleaseKey Event
-                if(event.input.type == InputTypeRelease) {
-                    if(snake_state->state != GameStatePause) {
-                        furi_timer_start(timer, furi_kernel_get_tick_frequency() / 4);
-                    }
-                }
-            } else if(event.type == EventTypeTick) {
-                snake_game_process_game_step(snake_state, notification);
-            }
-        } else {
-            // event timeout
-        }
-
-        furi_mutex_release(snake_state->mutex);
-        view_port_update(view_port);
-    }
-
-    // Wait for all notifications to be played and return backlight to normal state
-    notification_message_block(notification, &sequence_display_backlight_enforce_auto);
-
-    furi_timer_free(timer);
-    view_port_enabled_set(view_port, false);
-    gui_remove_view_port(gui, view_port);
-    furi_record_close(RECORD_GUI);
-    furi_record_close(RECORD_NOTIFICATION);
-    view_port_free(view_port);
-    furi_message_queue_free(event_queue);
-    furi_mutex_free(snake_state->mutex);
-    free(snake_state);
-
-    return 0;
-}

+ 0 - 66
apps_source_code/airmon/.gitignore

@@ -1,66 +0,0 @@
-*~
-*.swp
-*.swo
-*.gdb_history
-*.old
-
-
-# LSP
-.cache
-compile_commands.json
-
-# JetBrains IDEs
-.idea/
-
-# Python VirtEnvironments
-.env
-.venv
-env/
-venv/
-
-# Python Byte-compiled / optimized files
-__pycache__/
-*.py[cod]
-*$py.class
-*.pickle
-
-.obj/
-bindings/
-.DS_Store
-.mxproject
-Brewfile.lock.json
-
-# Visual Studio Code
-/.vscode/
-
-# Kate
-.kateproject
-.kateconfig
-
-# legendary cmake's
-build
-CMakeLists.txt
-
-# bundle output
-dist
-
-# kde
-.directory
-
-# SCons
-.sconsign.dblite
-# SCons build dir
-build/
-
-# Toolchain
-/toolchain
-
-# openocd output file
-openocd.log
-
-# PVS Studio temporary files
-.PVS-Studio/
-PVS-Studio.log
-*.PVS-Studio.*
-
-.gdbinit

+ 0 - 674
apps_source_code/airmon/LICENSE

@@ -1,674 +0,0 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <https://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program>  Copyright (C) <year>  <name of author>
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<https://www.gnu.org/licenses/>.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-<https://www.gnu.org/licenses/why-not-lgpl.html>.

+ 0 - 45
apps_source_code/airmon/README.md

@@ -1,45 +0,0 @@
-# Airmon for Flipper Zero
-
-A simple Flipper Zero air quality monitoring application. 
-It displays measured PM1.0/PM2.5/PM10 [Particulate Matter] concentrations 
-and calculated [Air Quality Index (AQI)].
-
-<div align="left">
-<img src="images/screen_pm25.png" width="240">
-<img src="images/screen_aqi.png" width="240">
-</div>
-
-## Hardware setup
-
-Connect the Plantower PMS5003/PMS7003/PMS9003 sensor according to the wiring diagram below.
-
-<div align="left">
-<img src="images/wiring.png" width="500">
-</div>
-
-| Flipper Pin | Sensor Pin |
-|:-----------:|:----------:|
-| 1 (5V)      | 1 (5V)     |
-| 11 (GND)    | 2 (GND)    |
-| 13 (TX)     | 4 (RX)     |
-| 14 (RX)     | 5 (TX)     |
-
-## Building and installing
-
-1. Clone `airmon` repository using `git clone https://github.com/3cky/flipperzero-airmon` command.
-2. Install [uFBT] Flipper Build Tool.
-3. Compile application running `ufbt` command in the cloned directory root.
-4. Install and start `airmon` application on Flipper attached over USB using `ufbt launch` command.
-
-## Application controls
-
-Use left/right arrows for PM/AQI display mode switching. 
-Flipper LED will blink green once every successful sensor reads.
-
-## License
-
-Airmon is available under the GPL 3 license. See the [LICENSE](LICENSE) file for more info.
-
-[Particulate Matter]: https://www.epa.gov/pm-pollution/particulate-matter-pm-basics
-[Air Quality Index (AQI)]: https://www.airnow.gov/aqi/aqi-basics/
-[uFBT]: https://github.com/flipperdevices/flipperzero-ufbt

+ 0 - 265
apps_source_code/airmon/airmon.c

@@ -1,265 +0,0 @@
-#include <gui/gui.h>
-#include <gui/view_port.h>
-#include <power/power_service/power.h>
-
-#include <core/thread.h>
-#include <core/kernel.h>
-
-#include <expansion/expansion.h>
-
-#include "airmon_icons.h"
-#include "airmon_pms.h"
-#include "airmon_aqi.h"
-
-#define TAG "Airmon"
-
-#define STR_BUF_SIZE 32
-
-typedef enum {
-    AirmonDisplayModePm1_0 = 0,
-    AirmonDisplayModePm2_5,
-    AirmonDisplayModePm10,
-    AirmonDisplayModeAqi,
-
-    AirmonDisplayModeCount
-} AirmonDisplayMode;
-
-typedef struct {
-    Gui* gui;
-    ViewPort* view_port;
-    Power* power;
-    PowerInfo power_info;
-    FuriMessageQueue* event_queue;
-
-    AirmonDisplayMode display_mode;
-
-    AirmonPmsContext* pms_context;
-} AirmonContext;
-
-typedef enum {
-    AirmonEventTypeKey,
-} AirmonEventType;
-
-typedef struct {
-    AirmonEventType type;
-    InputEvent input;
-} AirmonEvent;
-
-static void airmon_draw_battery(Canvas* canvas, AirmonContext* ctx) {
-    // Sourced from https://github.com/flipperdevices/flipperzero-firmware/blob/09edf66a/applications/services/power/power_service/power.c#L9
-    if(!ctx->power_info.gauge_is_ok) {
-        return;
-    }
-    canvas_draw_icon(canvas, 100, 0, &I_Battery_26x8);
-    canvas_draw_box(canvas, 102, 2, (ctx->power_info.charge + 4) / 5, 4);
-}
-
-static void airmon_draw_callback(Canvas* canvas, void* ctx) {
-    static char buffer[STR_BUF_SIZE];
-
-    AirmonContext* context = ctx;
-    AirmonPmsContext* pms_context = context->pms_context;
-
-    const uint8_t canvas_h = canvas_height(canvas);
-    const uint8_t canvas_w = canvas_width(canvas);
-
-    canvas_clear(canvas);
-    canvas_set_color(canvas, ColorBlack);
-
-    uint16_t data_value;
-
-    // Obtain value to draw
-    furi_mutex_acquire(pms_context->mutex, FuriWaitForever);
-    switch(context->display_mode) {
-    case AirmonDisplayModePm1_0:
-        data_value = pms_context->pms_data.pm1_0at;
-        break;
-    case AirmonDisplayModePm2_5:
-        data_value = pms_context->pms_data.pm2_5at;
-        break;
-    case AirmonDisplayModePm10:
-        data_value = pms_context->pms_data.pm10at;
-        break;
-    case AirmonDisplayModeAqi:
-        data_value = airmon_aqi(pms_context->pms_data.pm2_5at, pms_context->pms_data.pm10at);
-        break;
-    default:
-        data_value = 0;
-        break;
-    }
-    furi_mutex_release(pms_context->mutex);
-
-    // Draw value
-    canvas_set_font(canvas, FontBigNumbers);
-    snprintf(buffer, STR_BUF_SIZE, "%d", data_value);
-    canvas_draw_str_aligned(canvas, canvas_w / 2, canvas_h / 2, AlignCenter, AlignBottom, buffer);
-
-    // Draw value legend (air quality level / density units of measurement)
-    const uint8_t legend_y = canvas_h / 2;
-    if(context->display_mode == AirmonDisplayModeAqi) {
-        canvas_set_font(canvas, FontSecondary);
-        snprintf(buffer, STR_BUF_SIZE, "%s", airmon_aqi_level(data_value));
-        canvas_draw_str_aligned(canvas, canvas_w / 2, legend_y + 5, AlignCenter, AlignTop, buffer);
-    } else {
-        const Icon* density_icon = &I_Density_33x11;
-        const uint8_t density_icon_w = icon_get_width(density_icon);
-        canvas_draw_icon(canvas, (canvas_w - density_icon_w) / 2, legend_y + 3, density_icon);
-    }
-
-    // Draw mode bottom menu
-    canvas_set_font(canvas, FontSecondary);
-    const uint8_t label_w = canvas_w / AirmonDisplayModeCount;
-    const uint8_t label_h = canvas_current_font_height(canvas);
-    const uint8_t label_y = canvas_h - label_h - 1;
-    for(AirmonDisplayMode mode = 0; mode < AirmonDisplayModeCount; mode++) {
-        uint8_t label_x = mode * label_w;
-        bool mode_active = mode == context->display_mode;
-        if(mode_active) {
-            canvas_draw_box(canvas, label_x, label_y, label_w, label_h);
-            canvas_invert_color(canvas);
-        }
-        const char* label_str;
-        switch(mode) {
-        case AirmonDisplayModePm1_0:
-            label_str = "PM1.0";
-            break;
-        case AirmonDisplayModePm2_5:
-            label_str = "PM2.5";
-            break;
-        case AirmonDisplayModePm10:
-            label_str = "PM10";
-            break;
-        case AirmonDisplayModeAqi:
-            label_str = "AQI";
-            break;
-        default:
-            label_str = "";
-            break;
-        }
-        const uint8_t label_str_w = canvas_string_width(canvas, label_str);
-        canvas_draw_str(
-            canvas, label_x + (label_w - label_str_w) / 2, label_y + label_h - 2, label_str);
-        if(mode_active) {
-            canvas_invert_color(canvas);
-        }
-    }
-
-    airmon_draw_battery(canvas, context);
-}
-
-static void airmon_input_callback(InputEvent* input_event, void* ctx) {
-    AirmonContext* context = ctx;
-    AirmonEvent event = {.type = AirmonEventTypeKey, .input = *input_event};
-    furi_message_queue_put(context->event_queue, &event, FuriWaitForever);
-}
-
-static AirmonContext* airmon_context_alloc() {
-    AirmonContext* ctx = malloc(sizeof(AirmonContext));
-
-    ctx->pms_context = airmon_pms_context_alloc();
-    if(!ctx->pms_context) {
-        free(ctx);
-        return NULL;
-    }
-
-    ctx->display_mode = AirmonDisplayModePm2_5;
-
-    ctx->event_queue = furi_message_queue_alloc(8, sizeof(AirmonEvent));
-
-    ctx->view_port = view_port_alloc();
-    view_port_draw_callback_set(ctx->view_port, airmon_draw_callback, ctx);
-    view_port_input_callback_set(ctx->view_port, airmon_input_callback, ctx);
-
-    ctx->gui = furi_record_open(RECORD_GUI);
-    ctx->power = furi_record_open(RECORD_POWER);
-
-    gui_add_view_port(ctx->gui, ctx->view_port, GuiLayerFullscreen);
-
-    return ctx;
-}
-
-static void airmon_run(AirmonContext* ctx) {
-    airmon_pms_init(ctx->pms_context);
-
-    AirmonEvent event;
-    bool processing = true;
-    while(processing) {
-        FuriStatus event_status = furi_message_queue_get(ctx->event_queue, &event, 1000);
-
-        if(event_status == FuriStatusOk) {
-            // press events
-            if(event.type == AirmonEventTypeKey) {
-                if(event.input.type == InputTypePress) {
-                    switch(event.input.key) {
-                    case InputKeyBack:
-                        processing = false;
-                        break;
-                    case InputKeyLeft:
-                        if(ctx->display_mode-- == 0) {
-                            ctx->display_mode = AirmonDisplayModeCount - 1;
-                        }
-                        break;
-                    case InputKeyRight:
-                        if(++ctx->display_mode >= AirmonDisplayModeCount) {
-                            ctx->display_mode -= AirmonDisplayModeCount;
-                        }
-                        break;
-                    default:
-                        break;
-                    }
-                }
-            }
-        }
-
-        power_get_info(ctx->power, &ctx->power_info);
-
-        view_port_update(ctx->view_port);
-    }
-
-    airmon_pms_deinit(ctx->pms_context);
-}
-
-static void airmon_context_free(AirmonContext* ctx) {
-    view_port_enabled_set(ctx->view_port, false);
-    gui_remove_view_port(ctx->gui, ctx->view_port);
-
-    view_port_free(ctx->view_port);
-    furi_message_queue_free(ctx->event_queue);
-
-    furi_record_close(RECORD_GUI);
-    furi_record_close(RECORD_POWER);
-
-    airmon_pms_context_free(ctx->pms_context);
-
-    free(ctx);
-}
-
-/* The application's entry point. Execution starts from here. */
-int32_t airmon_app(void* p) {
-    UNUSED(p);
-
-    // Disable expansion protocol to avoid interference with UART Handle
-    Expansion* expansion = furi_record_open(RECORD_EXPANSION);
-    expansion_disable(expansion);
-
-    // Allocate all of the necessary structures
-    AirmonContext* ctx = airmon_context_alloc();
-    if(!ctx) {
-        // Return previous state of expansion
-        expansion_enable(expansion);
-        furi_record_close(RECORD_EXPANSION);
-        return 255;
-    }
-
-    // Start the applicaton's main loop. It won't return until the application was requested to exit
-    airmon_run(ctx);
-
-    // Release all resources
-    airmon_context_free(ctx);
-
-    // Return previous state of expansion
-    expansion_enable(expansion);
-    furi_record_close(RECORD_EXPANSION);
-
-    return 0;
-}

TEMPAT SAMPAH
apps_source_code/airmon/airmon_10px.png


+ 0 - 59
apps_source_code/airmon/airmon_aqi.c

@@ -1,59 +0,0 @@
-#include "airmon_aqi.h"
-
-#include <math.h>
-
-#define CLAMP(x, min, max) ((x > max) ? max : (x < min) ? min : x)
-#define LINTP(x, from_l, from_h, to_l, to_h) \
-    (((x - (from_l)) / (from_h - (from_l))) * (to_h - (to_l)) + to_l)
-
-#define NUM_BREAKPOINTS 8
-
-static const float pm2_5_breakpoints[NUM_BREAKPOINTS] =
-    {0.f, 12.1f, 35.5f, 55.5f, 150.5f, 250.5f, 350.5f, 500.f};
-
-static const float pm10_breakpoints[NUM_BREAKPOINTS] =
-    {0.f, 55.f, 155.f, 255.f, 355.f, 425.f, 505.f, 605.f};
-
-static const float aqi_breakpoints[NUM_BREAKPOINTS] =
-    {0.f, 51.f, 101.f, 151.f, 201.f, 301.f, 401.f, 500.f};
-
-const char* const aqi_levels[NUM_BREAKPOINTS] = {
-    "Good",
-    "Moderate",
-    "Unhealthy for Sensitive",
-    "Unhealthy",
-    "Very Unhealthy",
-    "Hazardous",
-    "Hazardous",
-    "Hazardous",
-};
-
-int airmon_aqi_breakpoint_idx(const float bps[], float value) {
-    int i = 0;
-    for(; i < NUM_BREAKPOINTS - 1; i++) {
-        if(bps[i] <= value && value < bps[i + 1]) {
-            break;
-        }
-    }
-    return i;
-}
-
-int airmon_aqi_pm(float pm, const float bps[], float q) {
-    float c = floorf(pm / q) * q;
-    int i = airmon_aqi_breakpoint_idx(bps, c);
-    float aqi = LINTP(c, bps[i], bps[i + 1] - q, aqi_breakpoints[i], aqi_breakpoints[i + 1] - 1);
-    return (int)(CLAMP(aqi, aqi_breakpoints[0], aqi_breakpoints[NUM_BREAKPOINTS - 1]));
-}
-
-int airmon_aqi(float pm2_5, float pm10) {
-    int aqi2_5 = airmon_aqi_pm(pm2_5, pm2_5_breakpoints, 0.1f);
-    int aqi10 = airmon_aqi_pm(pm10, pm10_breakpoints, 1.0f);
-    if(aqi10 > aqi2_5) {
-        return aqi10;
-    }
-    return aqi2_5;
-}
-
-const char* airmon_aqi_level(int aqi) {
-    return aqi_levels[airmon_aqi_breakpoint_idx(aqi_breakpoints, aqi)];
-}

+ 0 - 4
apps_source_code/airmon/airmon_aqi.h

@@ -1,4 +0,0 @@
-#pragma once
-
-int airmon_aqi(float pm2_5, float pm10);
-const char* airmon_aqi_level(int aqi);

+ 0 - 264
apps_source_code/airmon/airmon_pms.c

@@ -1,264 +0,0 @@
-#include "airmon_pms.h"
-
-#include <string.h>
-
-#define TAG "AirmonPms"
-
-#define UINT16BE(p) (((p)[0] << 8) | (p)[1])
-
-#define PMS_BAUDRATE 9600
-
-#define PMS_CTRL_FRAME_LEN 4
-#define PMS_DATA_FRAME_LEN 28
-
-#define PMS_START_CHAR_1 0x42
-#define PMS_START_CHAR_2 0x4d
-
-typedef enum {
-    WorkerEvtStop = (1 << 0),
-    WorkerEvtRxDone = (1 << 1),
-} WorkerEvtFlags;
-
-typedef enum {
-    RxStateStartChar1,
-    RxStateStartChar2,
-    RxStateFrameLength,
-    RxStateFrameData
-} RxState;
-
-#define WORKER_ALL_RX_EVENTS (WorkerEvtStop | WorkerEvtRxDone)
-
-static void airmon_pms_uart_on_irq_cb(
-    FuriHalSerialHandle* handle,
-    FuriHalSerialRxEvent event,
-    void* context) {
-    AirmonPmsContext* pms_context = context;
-
-    if(event == FuriHalSerialRxEventData) {
-        uint8_t data = furi_hal_serial_async_rx(handle);
-        furi_stream_buffer_send(pms_context->rx_stream, &data, 1, 0);
-        furi_thread_flags_set(furi_thread_get_id(pms_context->thread), WorkerEvtRxDone);
-    }
-}
-
-static void airmon_pms_serial_init(AirmonPmsContext* pms_context) {
-    pms_context->serial_handle = furi_hal_serial_control_acquire(UART_CH);
-    furi_check(pms_context->serial_handle);
-    furi_hal_serial_init(pms_context->serial_handle, PMS_BAUDRATE);
-    furi_hal_serial_async_rx_start(
-        pms_context->serial_handle, airmon_pms_uart_on_irq_cb, pms_context, false);
-}
-
-static void airmon_pms_serial_deinit(AirmonPmsContext* pms_context) {
-    furi_hal_serial_async_rx_stop(pms_context->serial_handle);
-    furi_hal_serial_deinit(pms_context->serial_handle);
-    furi_hal_serial_control_release(pms_context->serial_handle);
-}
-
-bool airmon_pms_frame_valid(AirmonPmsContext* pms_context, size_t frame_len) {
-    uint16_t checksum =
-        PMS_START_CHAR_1 + PMS_START_CHAR_2 + (frame_len >> 8) + (frame_len & 0xff);
-
-    uint8_t* p = pms_context->rx_buf;
-
-    while(p < pms_context->rx_buf + frame_len - 2) {
-        checksum += *p++ & 0xff;
-    }
-
-    return checksum == UINT16BE(p);
-}
-
-void airmon_pms_process_data_frame(AirmonPmsContext* pms_context) {
-    furi_mutex_acquire(pms_context->mutex, FuriWaitForever);
-
-    AirmonPmsData* d = &pms_context->pms_data;
-    uint8_t* p = pms_context->rx_buf;
-
-    d->pm1_0cf = UINT16BE(p);
-    d->pm2_5cf = UINT16BE(p + 2);
-    d->pm10cf = UINT16BE(p + 4);
-    d->pm1_0at = UINT16BE(p + 6);
-    d->pm2_5at = UINT16BE(p + 8);
-    d->pm10at = UINT16BE(p + 10);
-    d->ct0_3 = UINT16BE(p + 12);
-    d->ct0_5 = UINT16BE(p + 14);
-    d->ct1_0 = UINT16BE(p + 16);
-    d->ct2_5 = UINT16BE(p + 18);
-    d->ct5_0 = UINT16BE(p + 20);
-    d->ct10 = UINT16BE(p + 22);
-
-    furi_mutex_release(pms_context->mutex);
-}
-
-void airmon_pms_process_frame(AirmonPmsContext* pms_context, size_t frame_len) {
-    if(!airmon_pms_frame_valid(pms_context, frame_len)) {
-        notification_message_block(pms_context->notifications, &sequence_blink_red_10);
-        return;
-    }
-
-    if(frame_len == PMS_DATA_FRAME_LEN) {
-        airmon_pms_process_data_frame(pms_context);
-        notification_message_block(pms_context->notifications, &sequence_blink_green_10);
-    } else if(frame_len == PMS_CTRL_FRAME_LEN) {
-        notification_message_block(pms_context->notifications, &sequence_blink_blue_10);
-    } else {
-        notification_message_block(pms_context->notifications, &sequence_blink_magenta_10);
-    }
-}
-
-static int32_t airmon_pms_worker(void* context) {
-    FURI_LOG_D(TAG, "Worker started");
-
-    AirmonPmsContext* pms_context = context;
-
-    pms_context->rx_stream = furi_stream_buffer_alloc(RX_BUF_SIZE, 1);
-    size_t rx_offset = 0;
-
-    airmon_pms_serial_init(pms_context);
-
-    FURI_LOG_D(TAG, "Entering event loop");
-
-    RxState rx_state = RxStateStartChar1;
-    size_t rx_frame_len = 0;
-
-    while(1) {
-        uint32_t events =
-            furi_thread_flags_wait(WORKER_ALL_RX_EVENTS, FuriFlagWaitAny, FuriWaitForever);
-        furi_check((events & FuriFlagError) == 0);
-
-        if(events & WorkerEvtStop) {
-            break;
-        }
-
-        if(events & WorkerEvtRxDone) {
-            size_t rx_len = 0;
-
-            while(
-                (rx_len = furi_stream_buffer_receive(
-                     pms_context->rx_stream,
-                     pms_context->rx_buf + rx_offset,
-                     RX_BUF_SIZE - rx_offset - 1,
-                     0))) {
-                FURI_LOG_D(TAG, "rx_len: %d", rx_len);
-
-                rx_offset += rx_len;
-
-                bool rx_available = true;
-                size_t rx_processed;
-
-                while(rx_available) {
-                    rx_processed = 0;
-
-                    switch(rx_state) {
-                    case RxStateStartChar1:
-                        if(*pms_context->rx_buf == PMS_START_CHAR_1) {
-                            rx_state = RxStateStartChar2;
-                        }
-                        rx_processed = 1;
-                        break;
-
-                    case RxStateStartChar2:
-                        if(*pms_context->rx_buf == PMS_START_CHAR_2) {
-                            rx_state = RxStateFrameLength;
-                            rx_processed = 1;
-                        } else {
-                            rx_state = RxStateStartChar1;
-                        }
-                        break;
-
-                    case RxStateFrameLength:
-                        if(rx_offset > 2) {
-                            rx_frame_len = UINT16BE(pms_context->rx_buf);
-                            FURI_LOG_D(TAG, "rx_frame_len: %d", rx_frame_len);
-                            rx_processed = 2;
-                            rx_state = (rx_frame_len >= PMS_CTRL_FRAME_LEN &&
-                                        rx_frame_len <= PMS_DATA_FRAME_LEN) ?
-                                           RxStateFrameData :
-                                           RxStateStartChar1;
-                        } else {
-                            rx_available = false;
-                        }
-                        break;
-
-                    case RxStateFrameData:
-                        if(rx_offset >= rx_frame_len) {
-                            airmon_pms_process_frame(pms_context, rx_frame_len);
-                            rx_processed = rx_frame_len;
-                            rx_state = RxStateStartChar1;
-                        } else {
-                            rx_available = false;
-                        }
-                        break;
-
-                    default:
-                        rx_state = RxStateStartChar1;
-                        break;
-                    }
-
-                    FURI_LOG_D(TAG, "RxState: %d", rx_state);
-
-                    if(rx_processed) {
-                        rx_offset -= rx_processed;
-                        rx_available = !!rx_offset;
-                        if(rx_available) {
-                            memmove(
-                                pms_context->rx_buf,
-                                pms_context->rx_buf + rx_processed,
-                                rx_offset);
-                        }
-                    }
-                }
-            };
-        }
-    }
-
-    airmon_pms_serial_deinit(pms_context);
-    furi_stream_buffer_free(pms_context->rx_stream);
-
-    FURI_LOG_D(TAG, "Worker stopped");
-
-    return 0;
-}
-
-AirmonPmsContext* airmon_pms_context_alloc() {
-    AirmonPmsContext* pms_context = malloc(sizeof(AirmonPmsContext));
-
-    pms_context->mutex = furi_mutex_alloc(FuriMutexTypeNormal);
-    if(!pms_context->mutex) {
-        FURI_LOG_E("AirmonPms", "cannot create mutex\r\n");
-        free(pms_context);
-        return NULL;
-    }
-
-    memset(&pms_context->pms_data, 0, sizeof(AirmonPmsData));
-
-    pms_context->notifications = furi_record_open(RECORD_NOTIFICATION);
-
-    pms_context->thread = furi_thread_alloc();
-    furi_thread_set_name(pms_context->thread, "AirmonPmsWorker");
-    furi_thread_set_stack_size(pms_context->thread, 1024);
-    furi_thread_set_context(pms_context->thread, pms_context);
-    furi_thread_set_callback(pms_context->thread, airmon_pms_worker);
-
-    return pms_context;
-}
-
-void airmon_pms_context_free(AirmonPmsContext* pms_context) {
-    furi_assert(pms_context);
-    furi_thread_free(pms_context->thread);
-    furi_record_close(RECORD_NOTIFICATION);
-    free(pms_context);
-}
-
-void airmon_pms_init(AirmonPmsContext* pms_context) {
-    furi_assert(pms_context);
-    furi_hal_power_enable_otg();
-    furi_thread_start(pms_context->thread);
-}
-
-void airmon_pms_deinit(AirmonPmsContext* pms_context) {
-    furi_assert(pms_context);
-    furi_thread_flags_set(furi_thread_get_id(pms_context->thread), WorkerEvtStop);
-    furi_thread_join(pms_context->thread);
-    furi_hal_power_disable_otg();
-}

+ 0 - 40
apps_source_code/airmon/airmon_pms.h

@@ -1,40 +0,0 @@
-#pragma once
-
-#include <furi_hal.h>
-#include <notification/notification_messages.h>
-
-#define RX_BUF_SIZE 64
-#define UART_CH (FuriHalSerialIdUsart)
-
-typedef struct {
-    uint16_t pm1_0cf; // PM1.0 ug/m3 (ultrafine particles)
-    uint16_t pm2_5cf; // PM2.5 ug/m3 (combustion particles, organic compounds, metals)
-    uint16_t pm10cf; // PM10 ug/m3  (dust, pollen, mould spores)
-    uint16_t pm1_0at; // PM1.0 ug/m3 (atmos env)
-    uint16_t pm2_5at; // PM2.5 ug/m3 (atmos env)
-    uint16_t pm10at; // PM10 ug/m3 (atmos env)
-    uint16_t ct0_3; // count of >0.3um in 0.1L air
-    uint16_t ct0_5; // count of >0.5um in 0.1L air
-    uint16_t ct1_0; // count of >1.0um in 0.1L air
-    uint16_t ct2_5; // count of >2.5um in 0.1L air
-    uint16_t ct5_0; // count of >5.0um in 0.1L air
-    uint16_t ct10; // count of >10um in 0.1L air
-} AirmonPmsData;
-
-typedef struct {
-    FuriMutex* mutex;
-    FuriThread* thread;
-    FuriStreamBuffer* rx_stream;
-    uint8_t rx_buf[RX_BUF_SIZE];
-
-    NotificationApp* notifications;
-
-    AirmonPmsData pms_data;
-    FuriHalSerialHandle* serial_handle;
-} AirmonPmsContext;
-
-AirmonPmsContext* airmon_pms_context_alloc();
-void airmon_pms_context_free(AirmonPmsContext* pms_context);
-
-void airmon_pms_init(AirmonPmsContext* pms_context);
-void airmon_pms_deinit(AirmonPmsContext* pms_context);

+ 0 - 15
apps_source_code/airmon/application.fam

@@ -1,15 +0,0 @@
-App(
-    appid="airmon",
-    name="[PMSx003] Airmon",
-    apptype=FlipperAppType.EXTERNAL,
-    entry_point="airmon_app",
-    requires=["gui", "power"],
-    stack_size=1 * 1024,
-    fap_icon="airmon_10px.png",
-    fap_category="GPIO",
-    fap_icon_assets="icons",
-    fap_author="3cky",
-    fap_weburl="https://github.com/3cky/flipperzero-airmon",
-    fap_version="1.2",
-    fap_description="Plantower PMSx003 sensor reader",
-)

TEMPAT SAMPAH
apps_source_code/airmon/icons/Battery_26x8.png


TEMPAT SAMPAH
apps_source_code/airmon/icons/Density_33x11.png


TEMPAT SAMPAH
apps_source_code/airmon/images/screen_aqi.png


TEMPAT SAMPAH
apps_source_code/airmon/images/screen_pm25.png


TEMPAT SAMPAH
apps_source_code/airmon/images/wiring.png


TEMPAT SAMPAH
apps_source_code/airmon/img/1.png


TEMPAT SAMPAH
apps_source_code/airmon/img/2.png


+ 0 - 11
apps_source_code/bluetooth-trigger/README-catalog.md

@@ -1,11 +0,0 @@
-With the BT Trigger app, you can remotely take pictures with the help of your Flipper Zero via Bluetooth Low Energy.
-
-To take a picture remotely, do as follows:
-
-1. Run the BT Trigger app and connect to your smartphone. Your Flipper Zero will be displayed as Control (device name) in Bluetooth settings.
-2. Run the Camera app on your smartphone.
-3. To take one picture, press the Right button.
-
-
-You can take multiple pictures by pressing the Ok button. You can also set the delay between shots by pressing the Up and Down buttons. The number of photos taken is displayed in the app. To reset the shot count, press the Left button.
-

+ 0 - 15
apps_source_code/bluetooth-trigger/README.md

@@ -1,15 +0,0 @@
-# BT Trigger
-
-Control your smartphone camera via your Flipper Zero
-
-With the BT Trigger app, you can remotely take pictures with the help of your Flipper Zero via Bluetooth Low Energy.
-
-To take a picture remotely, do as follows:
-
-1. Run the BT Trigger app and connect to your smartphone. Your Flipper Zero will be displayed as Control <device name> in Bluetooth settings.
-2. Run the Camera app on your smartphone.
-3. To take one picture, press the Right button.
-
-
-You can take multiple pictures by pressing the Ok button. You can also set the delay between shots by pressing the Up and Down buttons. The number of photos taken is displayed in the app. To reset the shot count, press the Left button.
-

+ 0 - 17
apps_source_code/bluetooth-trigger/application.fam

@@ -1,17 +0,0 @@
-App(
-    appid="bt_trigger",
-    apptype=FlipperAppType.EXTERNAL,
-    name="BT Trigger",
-    entry_point="bt_trigger_app",
-    cdefines=["APP_BT_TRIGGER"],
-    requires=["gui"],
-    stack_size=1 * 1024,
-    fap_icon="bt_trigger_logo.png",
-    fap_category="Bluetooth",
-    fap_icon_assets="assets",
-    fap_libs=["ble_profile"],
-    fap_author="@Nem0oo",
-    fap_weburl="https://github.com/Nem0oo/flipper-zero-bluetooth-trigger",
-    fap_version="1.3",
-    fap_description="Control your smartphone camera via your Flipper Zero",
-)

TEMPAT SAMPAH
apps_source_code/bluetooth-trigger/assets/Ble_connected_15x15.png


TEMPAT SAMPAH
apps_source_code/bluetooth-trigger/assets/Ble_disconnected_15x15.png


TEMPAT SAMPAH
apps_source_code/bluetooth-trigger/assets/ButtonDown_7x4.png


TEMPAT SAMPAH
apps_source_code/bluetooth-trigger/assets/ButtonLeft_4x7.png


TEMPAT SAMPAH
apps_source_code/bluetooth-trigger/assets/ButtonRight_4x7.png


TEMPAT SAMPAH
apps_source_code/bluetooth-trigger/assets/ButtonUp_7x4.png


TEMPAT SAMPAH
apps_source_code/bluetooth-trigger/assets/Ok_btn_9x9.png


TEMPAT SAMPAH
apps_source_code/bluetooth-trigger/assets/WarningDolphin_45x42.png


TEMPAT SAMPAH
apps_source_code/bluetooth-trigger/assets/dir_10px.png


+ 0 - 249
apps_source_code/bluetooth-trigger/bt_trigger.c

@@ -1,249 +0,0 @@
-#include "bt_trigger.h"
-
-__int32_t bt_trigger_app(void* p) {
-    //Fake using p to compile
-    UNUSED(p);
-    AppStruct* app = appStructAlloc();
-
-    bt_disconnect(app->bt);
-
-    // Wait 2nd core to update nvm storage
-    furi_delay_ms(200);
-
-    bt_keys_storage_set_storage_path(app->bt, HID_BT_KEYS_STORAGE_PATH);
-
-    app->ble_hid_profile = bt_profile_start(app->bt, ble_profile_hid, NULL);
-    furi_check(app->ble_hid_profile);
-
-    furi_hal_bt_start_advertising();
-    bt_set_status_changed_callback(app->bt, bt_hid_connection_status_changed_callback, app);
-
-    dolphin_deed(DolphinDeedPluginStart);
-
-    //An event
-    IosTriggerEvent event;
-    //List of 8 events
-    FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(IosTriggerEvent));
-    //A timer
-    FuriTimer* timer = furi_timer_alloc(timer_callback, FuriTimerTypePeriodic, event_queue);
-
-    //Callback for the display
-    view_port_draw_callback_set(app->view_port, draw_callback, app);
-    //Callback for the inputs passing the list as param
-    view_port_input_callback_set(app->view_port, input_callback, event_queue);
-
-    //Linking the drawin on the display
-    gui_add_view_port(app->gui, app->view_port, GuiLayerFullscreen);
-
-    //Main loop
-    while(app->running) {
-        //Geting new event from the envent list in the event variable
-        //waiting forever if the list is empty
-        //checking status as ok
-        furi_check(furi_message_queue_get(event_queue, &event, FuriWaitForever) == FuriStatusOk);
-
-        //Dealing with events one by one
-        switch(event.type) {
-        case(EventTypeInput):
-            //On ne considère que les appuies courts
-            if(event.input.type == InputTypeShort) {
-                switch(event.input.key) {
-                case(InputKeyBack):
-                    //Breaking main loop if the back key is pressed
-                    app->shooting = false;
-                    app->running = false;
-                    break;
-                case(InputKeyOk): //Take a shot and start intervalometer
-                    if(app->delay > 0) {
-                        app->shooting = !app->shooting;
-                        if(app->shooting) {
-                            ble_profile_hid_consumer_key_press(
-                                app->ble_hid_profile, HID_CONSUMER_VOLUME_INCREMENT);
-                            ble_profile_hid_consumer_key_release(
-                                app->ble_hid_profile, HID_CONSUMER_VOLUME_INCREMENT);
-                            notification_message(app->notifications, &sequence_blink_blue_100);
-                            app->shots++;
-                            //Timer triggered every delay ms
-                            furi_timer_start(timer, app->delay * 1000);
-                        } else {
-                            //Timer triggered every delay ms
-                            furi_timer_stop(timer);
-                        }
-                    }
-                    break;
-                case(InputKeyUp): //Increase delay
-                    if(!app->shooting) {
-                        app->delay++;
-                    }
-                    break;
-                case(InputKeyDown): //Decrease delay
-                    if(!app->shooting && app->delay > 1) {
-                        app->delay--;
-                    }
-                    break;
-                case(InputKeyLeft): //Reset shots counter
-                    if(!app->shooting) {
-                        app->shots = 0;
-                    }
-                    break;
-                case(InputKeyRight): //Take a shot
-                    if(!app->shooting) {
-                        ble_profile_hid_consumer_key_press(
-                            app->ble_hid_profile, HID_CONSUMER_VOLUME_INCREMENT);
-                        ble_profile_hid_consumer_key_release(
-                            app->ble_hid_profile, HID_CONSUMER_VOLUME_INCREMENT);
-                        notification_message(app->notifications, &sequence_blink_blue_100);
-                        app->shots++;
-                    }
-                    break;
-                default:
-                    break;
-                }
-            }
-            view_port_update(app->view_port);
-            break;
-        case(EventTypeTick):
-            if(app->shooting) {
-                //sending command to trigger via BT
-                ble_profile_hid_consumer_key_press(
-                    app->ble_hid_profile, HID_CONSUMER_VOLUME_INCREMENT);
-                ble_profile_hid_consumer_key_release(
-                    app->ble_hid_profile, HID_CONSUMER_VOLUME_INCREMENT);
-                notification_message(app->notifications, &sequence_blink_blue_100);
-                app->shots++;
-            }
-            view_port_update(app->view_port);
-            break;
-        default:
-            break;
-        }
-    }
-
-    //Going back to serial mode BT
-    bt_set_status_changed_callback(app->bt, NULL, NULL);
-    bt_disconnect(app->bt);
-    // Wait 2nd core to update nvm storage
-    furi_delay_ms(200);
-    bt_keys_storage_set_default_path(app->bt);
-    furi_check(bt_profile_restore_default(app->bt));
-
-    //Freeing memory
-    furi_message_queue_free(event_queue);
-    //Freeing timer
-    furi_timer_free(timer);
-    cleanUpBeforeYouLeave(app);
-
-    return 0;
-}
-
-//Callback display
-static void draw_callback(Canvas* canvas, void* ctx) {
-    AppStruct* app = ctx;
-    char chaine_photo[36];
-    char chaine_delais[36];
-    char chaine_shooting[36];
-
-    snprintf(chaine_photo, sizeof(chaine_photo), "%i shots", app->shots);
-    snprintf(chaine_delais, sizeof(chaine_delais), "%i", app->delay);
-    if(app->shooting) {
-        snprintf(chaine_shooting, sizeof(chaine_shooting), "Press to stop");
-    } else {
-        snprintf(chaine_shooting, sizeof(chaine_shooting), "Press to start");
-    }
-
-    canvas_clear(canvas);
-    canvas_draw_frame(canvas, 0, 0, 128, 64);
-    canvas_set_font(canvas, FontPrimary);
-    canvas_draw_str(canvas, 2, 10, "iOS Intervalometer");
-    //Represent
-    canvas_set_font(canvas, FontSecondary);
-    canvas_draw_str(canvas, 92, 62, "Nem0oo");
-    if(app->connected) {
-        canvas_draw_icon(canvas, 111, 2, &I_Ble_connected_15x15);
-
-        canvas_set_font(canvas, FontSecondary);
-        //Delay line
-        canvas_draw_icon(canvas, 3, 19, &I_ButtonDown_7x4);
-        canvas_draw_icon(canvas, 3, 14, &I_ButtonUp_7x4);
-        canvas_draw_str(canvas, 13, 22, "Delay (in sec)");
-        canvas_draw_str(canvas, 71, 22, chaine_delais);
-        //Start/stop line
-        canvas_draw_icon(canvas, 2, 25, &I_Ok_btn_9x9);
-        canvas_draw_str(canvas, 13, 33, chaine_shooting);
-        //Single shot line
-        canvas_draw_icon(canvas, 6, 36, &I_ButtonRight_4x7);
-        canvas_draw_str(canvas, 13, 43, "Single shot");
-        //Reset shot count line
-        canvas_draw_icon(canvas, 3, 45, &I_ButtonLeft_4x7);
-        canvas_draw_str(canvas, 13, 52, "Reset shot count");
-        //Shots number line
-        canvas_draw_icon(canvas, 2, 53, &I_dir_10px);
-        canvas_draw_str(canvas, 14, 62, chaine_photo);
-    } else {
-        canvas_draw_icon(canvas, 111, 2, &I_Ble_disconnected_15x15);
-        canvas_draw_icon(canvas, 1, 21, &I_WarningDolphin_45x42);
-        canvas_set_font(canvas, FontSecondary);
-        canvas_draw_str(canvas, 48, 37, "Awaiting bluetooth");
-    }
-}
-
-//Input callbacks
-static void input_callback(InputEvent* input_event, void* ctx) {
-    furi_assert(ctx);
-    //Getting our event queue
-    FuriMessageQueue* event_queue = ctx;
-
-    //Adding the event to our custom Struct
-    IosTriggerEvent event = {.type = EventTypeInput, .input = *input_event};
-
-    //Adding our event to the event queue
-    furi_message_queue_put(event_queue, &event, FuriWaitForever);
-}
-
-//Timer callback
-static void timer_callback(FuriMessageQueue* event_queue) {
-    //check eventqueue is not null
-    furi_assert(event_queue);
-    //creating event and adding it to the event list
-    IosTriggerEvent event = {.type = EventTypeTick};
-    furi_message_queue_put(event_queue, &event, 0);
-}
-
-static void bt_hid_connection_status_changed_callback(BtStatus status, void* context) {
-    furi_assert(context);
-    AppStruct* app = context;
-    app->connected = (status == BtStatusConnected);
-    view_port_update(app->view_port);
-}
-
-AppStruct* appStructAlloc() {
-    AppStruct* app = malloc(sizeof(AppStruct));
-    //Init bluetooth
-    app->bt = furi_record_open(RECORD_BT);
-    //Drawing to be displayed
-    app->gui = furi_record_open(RECORD_GUI);
-    //Display
-    app->view_port = view_port_alloc();
-    //Init notifications (used for led blink)
-    app->notifications = furi_record_open(RECORD_NOTIFICATION);
-    app->connected = false;
-    app->running = true;
-    app->delay = 1;
-    return app;
-}
-
-void cleanUpBeforeYouLeave(AppStruct* app) {
-    furi_assert(app);
-    //Freeing notifications
-    furi_record_close(RECORD_NOTIFICATION);
-    app->notifications = NULL;
-    //Remove gui from display
-    gui_remove_view_port(app->gui, app->view_port);
-    //Freeing display
-    view_port_free(app->view_port);
-    furi_record_close(RECORD_GUI);
-    app->gui = NULL;
-    furi_record_close(RECORD_BT);
-    app->bt = NULL;
-    free(app);
-}

+ 0 - 53
apps_source_code/bluetooth-trigger/bt_trigger.h

@@ -1,53 +0,0 @@
-#pragma once
-
-#include <stdio.h>
-#include <furi.h>
-#include <furi_hal_bt.h>
-#include <furi_hal_usb_hid.h>
-#include <extra_profiles/hid_profile.h>
-#include <gui/gui.h>
-#include <input/input.h>
-#include <notification/notification_messages.h>
-#include <bt/bt_service/bt.h>
-#include <storage/storage.h>
-#include <gui/modules/dialog_ex.h>
-#include <gui/modules/popup.h>
-#include <dolphin/dolphin.h>
-#include "bt_trigger_icons.h"
-
-
-#define HID_BT_KEYS_STORAGE_PATH EXT_PATH("apps_data/hid_ble/.bt_hid.keys")
-#define TAG "bt_trigger"
-
-// Enum of allowed event types
-typedef enum {
-    EventTypeTick,
-    EventTypeInput,
-
-} EventType;
-
-// Struct to store an event and its type
-typedef struct {
-    EventType type;
-    InputEvent input;
-} IosTriggerEvent;
-
-typedef struct {
-    Bt* bt;
-    FuriHalBleProfileBase* ble_hid_profile;
-    Gui* gui;
-    NotificationApp* notifications;
-    ViewPort* view_port;
-    bool connected;
-    bool running;
-    bool shooting;
-    int shots;
-    int delay; // in ms
-} AppStruct;
-
-static void draw_callback(Canvas* canvas, void* ctx);
-static void input_callback(InputEvent* input_event, void* ctx);
-static void timer_callback(FuriMessageQueue* event_queue);
-static void bt_hid_connection_status_changed_callback(BtStatus status, void* context);
-AppStruct* appStructAlloc();
-void cleanUpBeforeYouLeave(AppStruct* app);

TEMPAT SAMPAH
apps_source_code/bluetooth-trigger/bt_trigger_logo.png


TEMPAT SAMPAH
apps_source_code/bluetooth-trigger/img/1.png


TEMPAT SAMPAH
apps_source_code/bluetooth-trigger/img/2.png


+ 0 - 674
apps_source_code/bpmtapper/LICENSE

@@ -1,674 +0,0 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <https://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program>  Copyright (C) <year>  <name of author>
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<https://www.gnu.org/licenses/>.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-<https://www.gnu.org/licenses/why-not-lgpl.html>.

+ 0 - 14
apps_source_code/bpmtapper/README.md

@@ -1,14 +0,0 @@
-# BPM Tapper
-
-A BPM Tapper for the Flipper Zero.
-
-![screenshot](img/screenshot.png)
-
-Hit any button other than back repeatedly. Calculates based on the average of the last 8 inputs.
-
-## Compiling
-
-```
-./fbt firmware_bpm_tapper
-```
-

+ 0 - 17
apps_source_code/bpmtapper/application.fam

@@ -1,17 +0,0 @@
-App(
-    appid="bpm_tapper",
-    name="BPM Tapper",
-    apptype=FlipperAppType.EXTERNAL,
-    entry_point="bpm_tapper_app",
-    cdefines=["APP_BPM_TAPPER"],
-    requires=["gui"],
-    stack_size=2 * 1024,
-    fap_icon="bpm_10px.png",
-    fap_category="Media",
-    fap_icon_assets="icons",
-    order=15,
-    fap_author="@panki27",
-    fap_weburl="https://github.com/panki27/bpm-tapper",
-    fap_version="1.1",
-    fap_description="Tap center button to measure BPM",
-)

+ 0 - 260
apps_source_code/bpmtapper/bpm.c

@@ -1,260 +0,0 @@
-#include <furi.h>
-#include <furi_hal.h>
-#include <dialogs/dialogs.h>
-#include <gui/gui.h>
-#include <input/input.h>
-#include <stdlib.h>
-#include "bpm_tapper_icons.h"
-
-typedef enum {
-    EventTypeTick,
-    EventTypeKey,
-} EventType;
-
-typedef struct {
-    EventType type;
-    InputEvent input;
-} PluginEvent;
-
-//QUEUE
-
-struct node {
-    int interval;
-    struct node* next;
-};
-typedef struct node node;
-
-typedef struct {
-    int size;
-    int max_size;
-    node* front;
-    node* rear;
-} queue;
-
-static void init_queue(queue* q) {
-    q->size = 0;
-    q->max_size = 8;
-    q->front = NULL;
-    q->rear = NULL;
-}
-
-static void queue_remove(queue* q) {
-    node* tmp;
-    tmp = q->front;
-    q->front = q->front->next;
-    q->size--;
-    free(tmp);
-}
-
-static void queue_add(queue* q, int value) {
-    node* tmp = malloc(sizeof(node));
-    tmp->interval = value;
-    tmp->next = NULL;
-    if(q->size == q->max_size) {
-        queue_remove(q);
-    }
-    // check if empty
-    if(q->rear == NULL) {
-        q->front = tmp;
-        q->rear = tmp;
-    } else {
-        q->rear->next = tmp;
-        q->rear = tmp;
-    }
-    q->size++;
-}
-
-static float queue_avg(queue* q) {
-    float avg = 0.0;
-    if(q->size == 0) {
-        return avg;
-    } else {
-        node* tmp;
-        float sum = 0.0;
-        tmp = q->front;
-        while(tmp != NULL) {
-            sum = sum + tmp->interval;
-            tmp = tmp->next;
-        }
-        avg = sum / q->size;
-        FURI_LOG_D("BPM-Tapper", "Sum: %.2f Avg: %.2f", (double)sum, (double)avg);
-        return avg;
-    }
-}
-
-// TOO SLOW!
-//uint64_t dolphin_state_timestamp() {
-//    DateTime datetime;
-//    furi_hal_rtc_get_datetime(&datetime);
-//    return datetime_datetime_to_timestamp(&datetime);
-//}
-//
-typedef struct {
-    FuriMutex* mutex;
-    int taps;
-    double bpm;
-    uint32_t last_stamp;
-    uint32_t interval;
-    queue* tap_queue;
-} BPMTapper;
-
-static void show_hello() {
-    // BEGIN HELLO DIALOG
-    DialogsApp* dialogs = furi_record_open(RECORD_DIALOGS);
-    DialogMessage* message = dialog_message_alloc();
-
-    const char* header_text = "BPM Tapper";
-    const char* message_text = "Tap center to start";
-
-    dialog_message_set_header(message, header_text, 63, 3, AlignCenter, AlignTop);
-    dialog_message_set_text(message, message_text, 0, 17, AlignLeft, AlignTop);
-    dialog_message_set_buttons(message, NULL, "Tap", NULL);
-
-    dialog_message_set_icon(message, &I_DolphinCommon_56x48, 72, 17);
-
-    dialog_message_show(dialogs, message);
-
-    dialog_message_free(message);
-    furi_record_close(RECORD_DIALOGS);
-    // END HELLO DIALOG
-}
-
-static void input_callback(InputEvent* input_event, FuriMessageQueue* event_queue) {
-    furi_assert(event_queue);
-
-    PluginEvent event = {.type = EventTypeKey, .input = *input_event};
-    furi_message_queue_put(event_queue, &event, FuriWaitForever);
-}
-
-static void render_callback(Canvas* const canvas, void* ctx) {
-    furi_assert(ctx);
-    const BPMTapper* bpm_state = ctx;
-    furi_mutex_acquire(bpm_state->mutex, FuriWaitForever);
-
-    FuriString* tempStr;
-    // border
-    //canvas_draw_frame(canvas, 0, 0, 128, 64);
-    canvas_set_font(canvas, FontPrimary);
-
-    tempStr = furi_string_alloc();
-
-    furi_string_printf(tempStr, "Taps: %d", bpm_state->taps);
-    canvas_draw_str_aligned(canvas, 5, 10, AlignLeft, AlignBottom, furi_string_get_cstr(tempStr));
-    furi_string_reset(tempStr);
-
-    furi_string_printf(tempStr, "Queue: %d", bpm_state->tap_queue->size);
-    canvas_draw_str_aligned(canvas, 70, 10, AlignLeft, AlignBottom, furi_string_get_cstr(tempStr));
-    furi_string_reset(tempStr);
-
-    furi_string_printf(tempStr, "Interval: %ldms", bpm_state->interval);
-    canvas_draw_str_aligned(canvas, 5, 20, AlignLeft, AlignBottom, furi_string_get_cstr(tempStr));
-    furi_string_reset(tempStr);
-
-    furi_string_printf(tempStr, "x2 %.2f /2 %.2f", bpm_state->bpm * 2, bpm_state->bpm / 2);
-    canvas_draw_str_aligned(
-        canvas, 64, 60, AlignCenter, AlignCenter, furi_string_get_cstr(tempStr));
-    furi_string_reset(tempStr);
-
-    furi_string_printf(tempStr, "%.2f", bpm_state->bpm);
-    canvas_set_font(canvas, FontBigNumbers);
-    canvas_draw_str_aligned(
-        canvas, 64, 40, AlignCenter, AlignCenter, furi_string_get_cstr(tempStr));
-    furi_string_reset(tempStr);
-
-    furi_string_free(tempStr);
-
-    furi_mutex_release(bpm_state->mutex);
-}
-
-static void bpm_state_init(BPMTapper* const plugin_state) {
-    plugin_state->taps = 0;
-    plugin_state->bpm = 120.0;
-    plugin_state->last_stamp = 0; // furi_get_tick();
-    plugin_state->interval = 0;
-    queue* q;
-    q = malloc(sizeof(queue));
-    init_queue(q);
-    plugin_state->tap_queue = q;
-}
-
-int32_t bpm_tapper_app(void* p) {
-    UNUSED(p);
-
-    FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(PluginEvent));
-
-    BPMTapper* bpm_state = malloc(sizeof(BPMTapper));
-    // setup
-    bpm_state_init(bpm_state);
-
-    bpm_state->mutex = furi_mutex_alloc(FuriMutexTypeNormal);
-    if(!bpm_state->mutex) {
-        FURI_LOG_E("BPM-Tapper", "cannot create mutex\r\n");
-        free(bpm_state);
-        return 255;
-    }
-    show_hello();
-
-    // BEGIN IMPLEMENTATION
-
-    // Set system callbacks
-    ViewPort* view_port = view_port_alloc();
-    view_port_draw_callback_set(view_port, render_callback, bpm_state);
-    view_port_input_callback_set(view_port, input_callback, event_queue);
-
-    // Open GUI and register view_port
-    Gui* gui = furi_record_open("gui");
-    gui_add_view_port(gui, view_port, GuiLayerFullscreen);
-
-    PluginEvent event;
-    for(bool processing = true; processing;) {
-        FuriStatus event_status = furi_message_queue_get(event_queue, &event, 100);
-        furi_mutex_acquire(bpm_state->mutex, FuriWaitForever);
-        if(event_status == FuriStatusOk) {
-            // press events
-            if(event.type == EventTypeKey) {
-                if(event.input.type == InputTypePress) {
-                    switch(event.input.key) {
-                    case InputKeyUp:
-                    case InputKeyDown:
-                    case InputKeyRight:
-                    case InputKeyLeft:
-                    case InputKeyOk:
-                        bpm_state->taps++;
-                        uint32_t new_stamp = furi_get_tick();
-                        if(bpm_state->last_stamp == 0) {
-                            bpm_state->last_stamp = new_stamp;
-                            break;
-                        }
-                        bpm_state->interval = new_stamp - bpm_state->last_stamp;
-                        bpm_state->last_stamp = new_stamp;
-                        queue_add(bpm_state->tap_queue, bpm_state->interval);
-                        float avg = queue_avg(bpm_state->tap_queue);
-                        float bps = 1.0 / (avg / 1000.0);
-                        bpm_state->bpm = bps * 60.0;
-                        break;
-                    case InputKeyBack:
-                        // Exit the plugin
-                        processing = false;
-                        break;
-                    default:
-                        break;
-                    }
-                }
-            }
-        }
-
-        furi_mutex_release(bpm_state->mutex);
-        view_port_update(view_port);
-    }
-    view_port_enabled_set(view_port, false);
-    gui_remove_view_port(gui, view_port);
-    furi_record_close("gui");
-    view_port_free(view_port);
-    furi_message_queue_free(event_queue);
-    furi_mutex_free(bpm_state->mutex);
-    queue* q = bpm_state->tap_queue;
-    free(q);
-    free(bpm_state);
-
-    return 0;
-}

TEMPAT SAMPAH
apps_source_code/bpmtapper/bpm_10px.png


TEMPAT SAMPAH
apps_source_code/bpmtapper/icons/DolphinCommon_56x48.png


TEMPAT SAMPAH
apps_source_code/bpmtapper/images/DolphinCommon_56x48.png


TEMPAT SAMPAH
apps_source_code/bpmtapper/img/1.png


Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini