Merge remote-tracking branch 'mntm/dev' into js-app-internal

This commit is contained in:
Willy-JL
2024-11-27 13:12:25 +00:00
22 changed files with 130 additions and 269 deletions
+20 -235
View File
@@ -1,244 +1,29 @@
### Breaking Changes:
- OFW: Battery: Rework gauge driver initialization routine (by @skotopes)
- Reworks how communication with battery guage is done, improves reliability and fixes issues with battery percentage not showing
- After installing firmware with this change, downgrading to old firmware will cause battery percentage to be blank
- If you must downgrade firmware, use the [Guage Tool app](https://github.com/skotopes/flipperzero_gauge_tool) to unseal the guage
- OFW: JS: Modules backport & overhaul (by @portasynthinca3), backport of backport (by @Willy-JL & @xMasterX)
- OFW backported some modules we had, added lots of new stuff, and overhauled many other things
- Non-exhaustive list of changes to help you fix your scripts:
- `badusb`:
- `setup()`: `mfr_name`, `prod_name`, `layout_path` parameters renamed to `mfrName`, `prodName`, `layoutPath`
- effort required to update old scripts using badusb: very minimal
- `dialog`:
- removed, now replaced by `gui/dialog` and `gui/file_picker` (see below)
- `event_loop`:
- new module, allows timer functionality, callbacks and event-driven programming, used heavily alongside gpio and gui modules
- `gpio`:
- fully overhauled, now you `get()` pin instances and perform actions on them like `.init()`
- now supports interrupts, callbacks and more cool things
- effort required to update old scripts using gpio: moderate
- `gui`:
- new module, fully overhauled, replaces dialog, keyboard, submenu, textbox modules
- higher barrier to entry than older modules (requires usage of `event_loop` and `gui.viewDispatcher`), but much more flexible, powerful and easier to extend
- includes all previously available js gui functionality (except `widget`), and also adds `gui/loading` and `gui/empty_screen` views
- currently `gui/file_picker` works different than other new view objects, it is a simple `.pickFile()` synchronous function, but this [may change later](https://github.com/flipperdevices/flipperzero-firmware/pull/3961#discussion_r1805579153)
- effort required to update old scripts using gui: extensive
- `keyboard`:
- removed, now replaced by `gui/text_input` and `gui/byte_input` (see above)
- `math`:
- `is_equal()` renamed to `isEqual()`
- `storage`:
- fully overhauled, now you `openFile()`s and perform actions on them like `.read()`
- now supports many more operations including different open modes, directories and much more
- `virtualInit()`, `virtualMount()`, `virtualQuit()` still work the same
- effort required to update old scripts using storage: moderate
- `submenu`:
- removed, now replaced by `gui/submenu` (see above)
- `textbox`:
- removed, now replace by `gui/text_box` (see above)
- `widget`:
- only gui functionality not ported to new gui module, remains unchanged for now but likely to be ported later on
- globals:
- `__filepath` and `__dirpath` renamed to `__filename` and `__dirname` like in nodejs
- `to_string()` renamed and moved to number class as `n.toString()`, now supports optional base parameter
- `to_hex_string()` removed, now use `n.toString(16)`
- `parse_int()` renamed to `parseInt()`, now supports optional base parameter
- `to_upper_case()` and `to_lower_case()` renamed and moved to string class as `s.toUpperCase()` and `s.toLowerCase()`
- effort required to update old scripts using these: minimal
- Added type definitions (typescript files for type checking in IDE, Flipper does not run typescript)
- Documentation is incomplete and deprecated, from now on you should refer to type definitions (`applications/system/js_app/packages/fz-sdk`), those will always be correct
- Type definitions for extra modules we have that OFW doesn't will come later
- GUI: Refactored TextInput illegal symbols (by @Willy-JL)
- If your app used `text_input_add_illegal_symbols(text_input)` it should change to `text_input_show_illegal_symbols(text_input, true)`
### Added:
- Apps:
- NFC: Cyborg Detector (by @RocketGod-git)
- Sub-GHz: Radio Scanner (by @RocketGod-git)
- GPIO: FlipperHTTP app suite (by @jblanked):
- FlipLibrary
- FlipSocial
- FlipStore
- FlipTrader
- FlipWeather
- FlipWiFi
- Web Crawler
- Tools: uPython (by @ofabel)
- Games: Umpire Indicator (by @RocketGod-git)
- Sub-GHz:
- Show satellites count with an icon (#215 by @m7i-org)
- Add Bresser 3CH weather station protocol (#217 #245 by @m7i-org)
- Add Vauno-EN8822 weather station protocol (#262 by @m7i-org)
- UL: Add Marantec24 protocol (static 24 bit) with add manually (by @xMasterX)
- UL: Add GangQi protocol (static 34 bit) with button parsing and add manually (by @xMasterX & @Skorpionm)
- UL: Add Hollarm protocol (static 42 bit) with button parsing and add manually (by @xMasterX & @Skorpionm)
- UL: Add Hay21 protocol (dynamic 21 bit) with button parsing (by @xMasterX)
- UL: Add Keeloq Monarch full support, with add manually (by @ashphx & @xMasterX)
- UL: Princeton custom buttons support (by @xMasterX)
- NFC:
- OFW: MIFARE Classic Key Recovery Improvements (PR 3822 by @noproto)
- Accelerated dictionary attack: dictionary attacks reduced to several seconds - checks ~3500 keys per second
- Nested attack support: collects nested nonces to be cracked by MFKey, no longer requiring Flipper Nested app
- Static encrypted backdoor support: collects static encrypted nonces to be cracked by MFKey using NXP/Fudan backdoor, allowing key recovery of all non-hardened MIFARE Classic tags on-device
- Add SmartRider Parser (#203 by @jaylikesbunda)
- Add API to enforce ISO15693 mode (#225 by @aaronjamt)
- OFW: H World Hotel Chain Room Key Parser and MFC keys (by @zinongli)
- OFW: Parser for Tianjin Railway Transit (by @zinongli)
- Infrared:
- Bluray/DVD Universal Remote (#250 #264 by @jaylikesbunda)
- Option to "Load from Library File" for Universal Remotes (#255 by @zxkmm)
- Updater: New Yappy themed icon while updating (#253 by @the1anonlypr3 & @Kuronons & @nescap)
- JS:
- OFW: JS: Modules backport & overhaul (by @portasynthinca3)
- See above for list of breaking changes, here are listed strictly new functionalities
- New `event_loop` module for event-driven interactivity
- Interrupt and callback support for `gpio` module
- New `gui` module that allows much more developed interfaces, also new `gui/loading` and `gui/empty_screen` views
- Directory operations and many more file operations for `storage` module
- OFW: Full-fledged JS SDK + npm packages (by @portasynthinca3)
- CFWs can have their own JS SDKs too! Check ours out at [`@next-flip/fz-sdk-mntm`](https://www.npmjs.com/package/@next-flip/fz-sdk-mntm)
- New `i2c` module (#259 by @jamisonderek)
- New `spi` module (#272 by @jamisonderek)
- Added `illegalSymbols` prop for `gui/text_input` view (#290 by @Willy-JL)
- Added typedocs for all extra JS modules in Momentum (by @Willy-JL)
- RPC: Added ASCII event support (#284 by @Willy-JL)
- FBT/SDK: New app flag UnloadAssetPacks to free RAM in heavy apps like NFC, MFKey, uPython (#260 by @Willy-JL)
- Settings:
- OFW: Clock editing & Alarm function (目覚め時計) (by @skotopes)
- Add warnings for some settings you shouldn't touch like Debug, Sleep Method, Heap Trace (#296 by @Willy-JL)
- BadKB:
- OFW: Add linux/gnome badusb demo files (by @thomasnemer)
- Add older qFlipper install demos for windows and macos (by @DXVVAY & @grugnoymeme)
- OFW: New layout for es-LA (by @IRecabarren)
- OFW: Dolphin: Happy mode in Desktop settings (by @portasynthinca3)
- OFW: CLI: Improvements part I, `neofetch` command (by @portasynthinca3), fix for lab.flipper.net (by @xMasterX)
- GUI:
- ByteInput supports ASCII input (by @Willy-JL)
- OFW: Add up and down button drawing functions to GUI elements (by @DerSkythe)
- OFW: Extended icon draw function in Canvas (by @RebornedBrain)
- OFW: RPC: Support 5V on GPIO control for ext. modules (by @gsurkov)
- OFW: Toolbox: Proper integer parsing library `strint` (by @portasynthinca3)
- Furi:
- OFW: Add FuriEventLoop support for FuriEventFlag, simplify API (by @Skorpionm)
- OFW: Put errno into TCB, better integration with libc (by @portasynthinca3)
- OFW: FuriHalRtc Alarm support (目覚め時計) (by @skotopes)
- Games: Pinball0 (by @rdefeo)
- NFC: Metroflip (by @luu176)
### Updated:
- Apps:
- MFKey: Added Static Encrypted Nested key recovery, Added NFC app support, Dropped FlipperNested support (by @noproto)
- WAV Player: Better fix for unresponsiveness, handle thread exit signal (by @CookiePLMonster)
- Laser Tag: External Infrared board support, crash fixes (by @RocketGod-git), RFID support for ammo reload, thread leak fix (by @jamisonderek)
- ESP Flasher: Add FlipperHTTP firmware (by @jblanked), update blackmagic bin with WiFi Logs (by @DrZlo13), support more board types (by @xMasterX)
- Picopass: File loading improvements and fixes (by @bettse), force ISO15693 1OutOf4 mode (by @aaronjamt)
- Quac!: External IR board support (by @daniilty), import all IR from file, iButton support, code improvements (by @rdefeo)
- DTMF Dolphin: Add EAS tone support (by @JendrBendr)
- NFC Playlist: Better error handling with many new error screens, general improvements (by @acegoal07), refactor rename/new scene without thread (by @Willy-JL)
- CLI-GUI Bridge: Fixes and improvements (by @ranchordo)
- Seader: Enable T=1, show error for timeout, fix wrong LRC logging, fix crash scanning NTAG215 with MFC option (by @bettse)
- BLE Spam: Fix menu index callback (by @Willy-JL)
- Solitaire: App rewrite, Added quick solve, New effects and sounds, Removed hacky canvas manipulation (by @doofy-dev)
- Flappy Bird: Yappy Bird and Yappy Ghost characters, highscore system and bugfixes (by @jaylikesbunda & @the1anonlypr3)
- CLI-GUI Bridge: Add more symbols to keyboard (#222 by @Willy-JL)
- NRF24 Batch: Add Aeropac SN board txt file (by @vad7)
- UL: Sub-GHz Bruteforcer: Add new protocols for existing dump option (by @xMasterX), use FW functions for top buttons (by @DerSkythe)
- UL: NRF24 Apps: Use string library compatible with OFW SDK (by @xMasterX)
- UL: W5500 Ethernet: Various fixes and improvements (by @xMasterX)
- OFW: SPI Mem Manager: Fixed UI rendering bug related to line breaks (by @portasynthinca3)
- OFW: USB/BT Remote: Mouse clicker option to click as fast as possible (by @sumukhj1219)
- NFC:
- NDEF Parser:
- Mifare Classic support (#265 by @luu176), protocol-agnostic rewrite and more improvements (#265 by @Willy-JL)
- SLIX support, parse even with TLV terminator omitted, parse empty NDEF TLVs (#278 by @Willy-JL)
- Decoding of URL-encoded URI characters (#267 by @jaylikesbunda)
- SmartPoster record support (#275 by @Willy-JL)
- Enable parsing NTAG I2C Plus 1k and 2k chips too (#237 by @RocketGod-git)
- NFC: Updated MFC dict, +100 keys from RRG proxmark3, +17 keys from Mifare Classic Tool
- Added 6 new Mifare Classic keys from Bulgaria Hotel (#216 by @z3r0l1nk)
- UL: Add iq aparts hotel key (by @xMasterX)
- OFW/UL: Rename 'Detect Reader' to 'Extract MFC Keys' (by @bettse & @xMasterX)
- OFW: Plantain parser improvements (by @assasinfil) and fixes (by @mxcdoam)
- OFW: Moscow social card parser (by @assasinfil)
- OFW: Fixes and improvements to iso14443_4a listener and poller (by @RebornedBrain)
- OFW: Update BART station codes in Clipper plugin (by @ted-logan)
- OFW: Add Caltrain zones for Clipper parser (by @tomholford)
- Sub-GHz:
- UL: Frequency analyzer fixes and improvements (by @xMasterX):
- Enforce int module (like in OFW) usage due to lack of required hardware on external boards (PathIsolate (+rf switch for multiple paths)) and incorrect usage and/or understanding the purpose of frequency analyzer app by users, it should be used only to get frequency of the remote placed around 1-10cm around flipper's left corner
- Fix possible GSM mobile towers signal interference by limiting upper frequency to 920mhz max
- Fix duplicated frequency lists and use user config for nearest frequency selector too
- Nexus-TH weather station protocol improvements on detection (#256 by @m7i-org)
- Infrared:
- Additions to MNTM specific LED, Digital Sign, Monitor universal remotes from IRDB (#240 by @jaylikesbunda)
- UL: Replace LEDs universal remote with new one by Unleashed team, includes color options (by @amec0e & @xMasterX)
- UL: Update universal remote assets (by @amec0e)
- OFW: IR button operation fails now shows more informative messages (by @RebornedBrain)
- OFW: Add Airwell AW-HKD012-N91 to univeral AC remote (by @valeraOlexienko)
- OFW: Add TCL 75S451 to TV universal remote (by @christhetech131)
- OFW: Universal remote additions (by @jaylikesbunda)
- OFW: Heavily Expand Universal Remotes (by @jaylikesbunda)
- CLI:
- Print plugin name on load fail (by @Willy-JL)
- Move more commands as plugins on SD, refactor plugin wrapper (#276 by @Willy-JL)
- FBT: Optimize icons blob, scrub unused icons (#291 by @Willy-JL)
- OFW: BadKB: Improve ChromeOS and GNOME demo scripts (by @kowalski7cc)
- GUI:
- OFW: Change dialog_ex text ownership model (by @skotopes)
- Improve some error messages to be more clear, like Sub-GHz region missing and Main Menu .fap file missing (#296 by @Willy-JL)
- OFW: CCID: App changes and improvements (by @kidbomb)
- OFW: API: Exposed `view_dispatcher_get_event_loop` (by @CookiePLMonster)
- Furi:
- UL: Extra checks for OTG power enable/disable (by @xMasterX)
- OFW: Replace all calls to strncpy with strlcpy, use strdup more, expose strlcat (by @CookiePLMonster)
- OFW: Threading, Timers improvements (by @CookiePLMonster)
- OFW: FuriTimer uses an event instead of a volatile bool to wait for deletion (by @CookiePLMonster)
- OFW: Improve FuriThread state callbacks (by @CookiePLMonster)
- OFW: Increased heap size (by @hedger)
- Documentation:
- OFW: Update and cleanup (by @rnadyrshin)
- OFW: Improve bit_buffer.h docs (by @Astrrra)
- OFW: Wi-Fi Devboard documentation rework (by @rnadyrshin)
- OFW: Update unit tests docs (by @portasynthinca3)
- BT/USB Remote: Add PTT support for Gather (by @SapphicCode)
- ESP Flasher: Add c3 and c6 to s3 option (by @jaylikesbunda)
- FlipLibrary: Added Wikipedia, dog facts and random quotes, bug fixes (by @jblanked), connectivity and progress improvements (by @jamisonderek)
- FlipSocial: Improved authentication (by @jblanked)
- FlipStore: Many bugfixes, support ESP32 firmware downloads, allow deleting apps (by @jblanked)
- FlipTrader: Improved progress display, added connectivity check on startup (by @jamisonderek)
- FlipWeather: Stability improvements (by @jblanked), improved progress display, added connectivity check on startup (by @jamisonderek)
- FlipWiFi: Improved error handling, updated scan loading and parsing (by @jblanked), added connectivity check on startup (by @jamisonderek)
- FlipBIP: Refactor to make adding coins easier (by @xtruan)
- uPython: Enabled extra functions for the `random` module (by @ofabel)
- Pokemon Trade Tool: Update to gblink v0.63 which includes saving/loading of pin configurations for the EXT link interface (by @kbembedded)
- Snake 2.0: Progress saving, endless mode, game timer, fruit positioning bugfixes (by @Willzvul)
- WebCrawler: Improved progress display, added connectivity check on startup (by @jamisonderek)
- UL: NFC Magic: Added possibility to write 7b MFC to Gen1 tags (by @mishamyte)
- UL: Fixed apps for firmware USB CDC callback changes (by @xMasterX)
### Fixed:
- RFID:
- OFW: Fix detection of GProx II cards and false detection of other cards (by @Astrrra)
- OFW: Fix Guard GProxII False Positive and 36-bit Parsing (by @zinongli)
- OFW: GProxII Fix Writing and Rendering Conflict (by @zinongli)
- Asset Packer: Fix font terminator causing freezes/crashes, like in Marauder AP scan/list (#295 by @Willy-JL)
- Desktop:
- Fallback Poweroff prompt when power settings is unavailable (by @Willy-JL)
- Sub-GHz:
- Fix GPS "Latitute" typo, switch to "Lat" and "Lon" in .sub files (#246 by @m7i-org)
- UL: Fix zero issues in Princeton (by @xMasterX)
- UL: Code cleanup and fix for rare dupicated "Data" field cases (by @xMasterX)
- UL: Fix Nice One key display (by @xMasterX)
- Power: Suppress Shutdown on Idle While Charging / Plugged In (#244 by @luu176)
- Storage:
- Fallback SD format prompt when storage settings is unavailable (by @Willy-JL)
- OFW: Fix folder rename fails (by @portasynthinca3)
- About: Fix BLE stack version string (by @Willy-JL)
- RPC: Fixed apps not updating and staying at 100% (by @Willy-JL)
- OFW: Loader: Warn about missing SD card for main apps (by @Willy-JL)
- NFC:
- OFW: Fix crash on Ultralight unlock (by @Astrrra)
- OFW: FeliCa anti-collision fix (by @RebornedBrain)
- OFW: Emulation freeze fixed when pressing OK repeatedly (by @RebornedBrain)
- OFW: Fixed bug with reading pwd locked MFULs (by @mishamyte)
- OFW: RPC: Broken file interaction fixes (by @RebornedBrain)
- OFW: GPIO: Fix USB-UART bridge exit screen stopping the bridge prematurely (by @portasynthinca3)
- OFW: GUI: Fix dialog_ex NULL ptr crash (by @Willy-JL)
- Furi:
- OFW: Clean up of LFS traces (by @hedger)
- OFW: Prevent idle priority threads from potentially starving the FreeRTOS idle task (by @CookiePLMonster)
- OFW: Wait for RNG ready state and no errors before sampling (by @n1kolasM)
- OFW: A Lot of Fixes (by @skotopes)
- OFW: CLI: Add warning about stealth mode in vibro command (by @ivanbarsukov)
- OFW: Debug: Use proper hook for handle_exit in flipperapps (by @skotopes)
- OFW: API: Fix kerel typo in documentation (by @EntranceJew)
- Desktop: Fixed Wardriving animation design (by @Davim09)
- OFW: GPIO: Merged gsurkov/vcp_break_support branch for usb uart bridge (WIP!!!)
### Removed:
- Apps:
- Mifare Nested: Superseded by NFC app after OFW PR 3822 (MIFARE Classic Key Recovery Improvements)
- ESP Flasher:
- Removed Airtag Scanner and ESP32-S2 Wardriver due to low user interest and to make space for Ghost ESP
- API: Removed `furi_hal_bt_reverse_mac_addr()` and implemented in individual apps instead
- Nothing
+2
View File
@@ -346,6 +346,8 @@ black_commandline = [
black_base_args = [
"--include",
'"(\\.scons|\\.py|SConscript|SConstruct|\\.fam)$"',
"--exclude",
'"(mp_flipper/flipperzero/random\\.py)$"',
]
distenv.PhonyTarget(
+13 -2
View File
@@ -35,12 +35,12 @@ typedef enum {
WorkerEvtLineCfgSet = (1 << 6),
WorkerEvtCtrlLineSet = (1 << 7),
WorkerEvtSendBreak = (1 << 8),
} WorkerEvtFlags;
#define WORKER_ALL_RX_EVENTS \
(WorkerEvtStop | WorkerEvtRxDone | WorkerEvtCfgChange | WorkerEvtLineCfgSet | \
WorkerEvtCtrlLineSet | WorkerEvtCdcTxComplete)
WorkerEvtCtrlLineSet | WorkerEvtCdcTxComplete | WorkerEvtSendBreak)
#define WORKER_ALL_TX_EVENTS (WorkerEvtTxStop | WorkerEvtCdcRx)
struct UsbUartBridge {
@@ -69,6 +69,7 @@ static void vcp_on_cdc_rx(void* context);
static void vcp_state_callback(void* context, uint8_t state);
static void vcp_on_cdc_control_line(void* context, uint8_t state);
static void vcp_on_line_config(void* context, struct usb_cdc_line_coding* config);
static void vcp_on_cdc_break(void* context, uint16_t duration);
static const CdcCallbacks cdc_cb = {
vcp_on_cdc_tx_complete,
@@ -76,6 +77,7 @@ static const CdcCallbacks cdc_cb = {
vcp_state_callback,
vcp_on_cdc_control_line,
vcp_on_line_config,
vcp_on_cdc_break,
};
/* USB UART worker */
@@ -287,6 +289,9 @@ static int32_t usb_uart_worker(void* context) {
if(events & WorkerEvtCtrlLineSet) {
usb_uart_update_ctrl_lines(usb_uart);
}
if(events & WorkerEvtSendBreak) {
furi_hal_serial_send_break(usb_uart->serial_handle);
}
}
usb_uart_vcp_deinit(usb_uart, usb_uart->cfg.vcp_ch);
usb_uart_serial_deinit(usb_uart);
@@ -377,6 +382,12 @@ static void vcp_on_line_config(void* context, struct usb_cdc_line_coding* config
furi_thread_flags_set(furi_thread_get_id(usb_uart->thread), WorkerEvtLineCfgSet);
}
static void vcp_on_cdc_break(void* context, uint16_t duration) {
UNUSED(duration);
UsbUartBridge* usb_uart = (UsbUartBridge*)context;
furi_thread_flags_set(furi_thread_get_id(usb_uart->thread), WorkerEvtSendBreak);
}
UsbUartBridge* usb_uart_enable(UsbUartConfig* cfg) {
UsbUartBridge* usb_uart = malloc(sizeof(UsbUartBridge));
+1
View File
@@ -57,6 +57,7 @@ static CdcCallbacks cdc_cb = {
vcp_state_callback,
vcp_on_cdc_control_line,
NULL,
NULL,
};
static CliVcp* vcp = NULL;
+55 -3
View File
@@ -42,6 +42,7 @@ typedef struct {
enum HidPushToTalkAppIndex {
HidPushToTalkAppIndexDiscord,
HidPushToTalkAppIndexFaceTime,
HidPushToTalkAppIndexGather,
HidPushToTalkAppIndexGoogleMeet,
HidPushToTalkAppIndexGoogleHangouts,
HidPushToTalkAppIndexJamulus,
@@ -308,7 +309,6 @@ static void hid_ptt_trigger_mute_jamulus(HidPushToTalk* hid_ptt) {
}
// webex
static void hid_ptt_trigger_camera_webex(HidPushToTalk* hid_ptt) {
hid_hal_keyboard_press(hid_ptt->hid, KEY_MOD_LEFT_CTRL | KEY_MOD_LEFT_SHIFT | HID_KEYBOARD_V);
hid_hal_keyboard_release(
@@ -325,6 +325,30 @@ static void hid_ptt_trigger_hand_linux_webex(HidPushToTalk* hid_ptt) {
hid_ptt->hid, KEY_MOD_LEFT_CTRL | KEY_MOD_RIGHT_SHIFT | HID_KEYBOARD_R);
}
// Gather
static void hid_ptt_trigger_hand_gather(HidPushToTalk* hid_ptt) {
hid_hal_keyboard_press(hid_ptt->hid, HID_KEYBOARD_H);
hid_hal_keyboard_release(hid_ptt->hid, HID_KEYBOARD_H);
}
static void hid_ptt_trigger_camera_macos_gather(HidPushToTalk* hid_ptt) {
hid_hal_keyboard_press(hid_ptt->hid, KEY_MOD_LEFT_GUI | KEY_MOD_LEFT_SHIFT | HID_KEYBOARD_V);
hid_hal_keyboard_release(hid_ptt->hid, KEY_MOD_LEFT_GUI | KEY_MOD_LEFT_SHIFT | HID_KEYBOARD_V);
}
static void hid_ptt_trigger_mute_macos_gather(HidPushToTalk* hid_ptt) {
hid_hal_keyboard_press(hid_ptt->hid, KEY_MOD_LEFT_GUI | KEY_MOD_LEFT_SHIFT | HID_KEYBOARD_A);
hid_hal_keyboard_release(hid_ptt->hid, KEY_MOD_LEFT_GUI | KEY_MOD_LEFT_SHIFT | HID_KEYBOARD_A);
}
static void hid_ptt_trigger_camera_linux_gather(HidPushToTalk* hid_ptt) {
hid_hal_keyboard_press(hid_ptt->hid, KEY_MOD_LEFT_CTRL | KEY_MOD_LEFT_SHIFT | HID_KEYBOARD_V);
hid_hal_keyboard_release(
hid_ptt->hid, KEY_MOD_LEFT_CTRL | KEY_MOD_LEFT_SHIFT | HID_KEYBOARD_V);
}
static void hid_ptt_trigger_mute_linux_gather(HidPushToTalk* hid_ptt) {
hid_hal_keyboard_press(hid_ptt->hid, KEY_MOD_LEFT_CTRL | KEY_MOD_LEFT_SHIFT | HID_KEYBOARD_A);
hid_hal_keyboard_release(
hid_ptt->hid, KEY_MOD_LEFT_CTRL | KEY_MOD_LEFT_SHIFT | HID_KEYBOARD_A);
}
static void hid_ptt_menu_callback(
void* context,
uint32_t osIndex,
@@ -359,6 +383,13 @@ static void hid_ptt_menu_callback(
model->callback_start_ptt = hid_ptt_trigger_cmd_shift_m;
model->callback_stop_ptt = hid_ptt_trigger_cmd_shift_m;
break;
case HidPushToTalkAppIndexGather:
model->callback_trigger_mute = hid_ptt_trigger_mute_macos_gather;
model->callback_trigger_camera = hid_ptt_trigger_camera_macos_gather;
model->callback_trigger_hand = hid_ptt_trigger_hand_gather;
model->callback_start_ptt = hid_ptt_trigger_mute_macos_gather;
model->callback_stop_ptt = hid_ptt_trigger_mute_macos_gather;
break;
case HidPushToTalkAppIndexGoogleHangouts:
model->callback_trigger_mute = hid_ptt_trigger_mute_macos_hangouts;
model->callback_trigger_camera = hid_ptt_trigger_camera_macos_hangouts;
@@ -434,6 +465,13 @@ static void hid_ptt_menu_callback(
model->callback_start_ptt = hid_ptt_start_ptt_linux_discord;
model->callback_stop_ptt = hid_ptt_stop_ptt_linux_discord;
break;
case HidPushToTalkAppIndexGather:
model->callback_trigger_mute = hid_ptt_trigger_mute_linux_gather;
model->callback_trigger_camera = hid_ptt_trigger_camera_linux_gather;
model->callback_trigger_hand = hid_ptt_trigger_hand_gather;
model->callback_start_ptt = hid_ptt_trigger_mute_linux_gather;
model->callback_stop_ptt = hid_ptt_trigger_mute_linux_gather;
break;
case HidPushToTalkAppIndexGoogleHangouts:
model->callback_trigger_mute = hid_ptt_trigger_mute_linux_hangouts;
model->callback_trigger_camera = hid_ptt_trigger_camera_linux_hangouts;
@@ -873,6 +911,20 @@ HidPushToTalk* hid_ptt_alloc(Hid* hid) {
HidPushToTalkAppIndexFaceTime,
hid_ptt_menu_callback,
hid_ptt);
ptt_menu_add_item_to_list(
hid->hid_ptt_menu,
HidPushToTalkMacOS,
"Gather",
HidPushToTalkAppIndexGather,
hid_ptt_menu_callback,
hid_ptt);
ptt_menu_add_item_to_list(
hid->hid_ptt_menu,
HidPushToTalkLinux,
"Gather",
HidPushToTalkAppIndexGather,
hid_ptt_menu_callback,
hid_ptt);
ptt_menu_add_item_to_list(
hid->hid_ptt_menu,
HidPushToTalkMacOS,
@@ -932,14 +984,14 @@ HidPushToTalk* hid_ptt_alloc(Hid* hid) {
ptt_menu_add_item_to_list(
hid->hid_ptt_menu,
HidPushToTalkMacOS,
"Slack Hubble",
"Slack Huddle",
HidPushToTalkAppIndexSlackHubble,
hid_ptt_menu_callback,
hid_ptt);
ptt_menu_add_item_to_list(
hid->hid_ptt_menu,
HidPushToTalkLinux,
"Slack Hubble",
"Slack Huddle",
HidPushToTalkAppIndexSlackHubble,
hid_ptt_menu_callback,
hid_ptt);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 599 B

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 611 B

After

Width:  |  Height:  |  Size: 605 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 626 B

After

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 B

After

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 603 B

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 612 B

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 631 B

After

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 B

+6 -6
View File
@@ -3,12 +3,12 @@ Version: 1
Width: 128
Height: 64
Passive frames: 9
Passive frames: 8
Active frames: 0
Frames order: 0 1 2 3 4 5 6 7 7
Frames order: 0 1 2 3 4 5 6 6
Active cycles: 0
Frame rate: 2
Duration: 360
Frame rate: 1
Duration: 3600
Active cooldown: 0
Bubble slots: 1
@@ -19,5 +19,5 @@ Y: 14
Text: Pwned!
AlignH: Left
AlignV: Center
StartFrame: 7
EndFrame: 8
StartFrame: 6
EndFrame: 7
+3 -19
View File
@@ -15,25 +15,9 @@ const char* const name_generator_left[] = {
};
const char* const name_generator_right[] = {
"bidet",
"sus",
"fed",
"moroder",
"bobr",
"chomik",
"sidorovich",
"stalker",
"yapper",
"bnuuy",
"jezyk",
"juzyk",
"cult",
"pp",
"zalaz",
"breeky",
"bunker"
"pingwin",
"kot",
"bidet", "sus", "fed", "moroder", "bobr", "chomik", "sidorovich",
"stalker", "yapper", "bnuuy", "jezyk", "juzyk", "cult", "pp",
"zalaz", "breeky", "bunker", "pingwin", "kot",
};
void name_generator_make_auto_datetime(
+1
View File
@@ -1446,6 +1446,7 @@ Function,+,furi_hal_serial_get_gpio_pin,const GpioPin*,"FuriHalSerialHandle*, Fu
Function,+,furi_hal_serial_init,void,"FuriHalSerialHandle*, uint32_t"
Function,+,furi_hal_serial_is_baud_rate_supported,_Bool,"FuriHalSerialHandle*, uint32_t"
Function,+,furi_hal_serial_resume,void,FuriHalSerialHandle*
Function,+,furi_hal_serial_send_break,void,FuriHalSerialHandle*
Function,+,furi_hal_serial_set_br,void,"FuriHalSerialHandle*, uint32_t"
Function,+,furi_hal_serial_suspend,void,FuriHalSerialHandle*
Function,+,furi_hal_serial_tx,void,"FuriHalSerialHandle*, const uint8_t*, size_t"
1 entry status name type params
1446 Function + furi_hal_serial_init void FuriHalSerialHandle*, uint32_t
1447 Function + furi_hal_serial_is_baud_rate_supported _Bool FuriHalSerialHandle*, uint32_t
1448 Function + furi_hal_serial_resume void FuriHalSerialHandle*
1449 Function + furi_hal_serial_send_break void FuriHalSerialHandle*
1450 Function + furi_hal_serial_set_br void FuriHalSerialHandle*, uint32_t
1451 Function + furi_hal_serial_suspend void FuriHalSerialHandle*
1452 Function + furi_hal_serial_tx void FuriHalSerialHandle*, const uint8_t*, size_t
+1
View File
@@ -1691,6 +1691,7 @@ Function,+,furi_hal_serial_get_gpio_pin,const GpioPin*,"FuriHalSerialHandle*, Fu
Function,+,furi_hal_serial_init,void,"FuriHalSerialHandle*, uint32_t"
Function,+,furi_hal_serial_is_baud_rate_supported,_Bool,"FuriHalSerialHandle*, uint32_t"
Function,+,furi_hal_serial_resume,void,FuriHalSerialHandle*
Function,+,furi_hal_serial_send_break,void,FuriHalSerialHandle*
Function,+,furi_hal_serial_set_br,void,"FuriHalSerialHandle*, uint32_t"
Function,+,furi_hal_serial_suspend,void,FuriHalSerialHandle*
Function,+,furi_hal_serial_tx,void,"FuriHalSerialHandle*, const uint8_t*, size_t"
1 entry status name type params
1691 Function + furi_hal_serial_init void FuriHalSerialHandle*, uint32_t
1692 Function + furi_hal_serial_is_baud_rate_supported _Bool FuriHalSerialHandle*, uint32_t
1693 Function + furi_hal_serial_resume void FuriHalSerialHandle*
1694 Function + furi_hal_serial_send_break void FuriHalSerialHandle*
1695 Function + furi_hal_serial_set_br void FuriHalSerialHandle*, uint32_t
1696 Function + furi_hal_serial_suspend void FuriHalSerialHandle*
1697 Function + furi_hal_serial_tx void FuriHalSerialHandle*, const uint8_t*, size_t
+10
View File
@@ -950,3 +950,13 @@ const GpioPin*
return furi_hal_serial_config[handle->id].gpio[direction];
}
void furi_hal_serial_send_break(FuriHalSerialHandle* handle) {
furi_check(handle);
if(handle->id == FuriHalSerialIdUsart) {
LL_USART_RequestBreakSending(USART1);
} else {
LL_LPUART_RequestBreakSending(LPUART1);
}
}
+6
View File
@@ -239,6 +239,12 @@ void furi_hal_serial_dma_rx_stop(FuriHalSerialHandle* handle);
*/
size_t furi_hal_serial_dma_rx(FuriHalSerialHandle* handle, uint8_t* data, size_t len);
/** Send a break sequence (low level for the whole character duration)
*
* @param handle Serial handle
*/
void furi_hal_serial_send_break(FuriHalSerialHandle* handle);
#ifdef __cplusplus
}
#endif
+10 -3
View File
@@ -122,7 +122,7 @@ static const struct CdcConfigDescriptorSingle cdc_cfg_desc_single = {
.bFunctionLength = sizeof(struct usb_cdc_acm_desc),
.bDescriptorType = USB_DTYPE_CS_INTERFACE,
.bDescriptorSubType = USB_DTYPE_CDC_ACM,
.bmCapabilities = 0,
.bmCapabilities = USB_CDC_CAP_BRK,
},
.cdc_union =
{
@@ -235,7 +235,7 @@ static const struct CdcConfigDescriptorDual
.bFunctionLength = sizeof(struct usb_cdc_acm_desc),
.bDescriptorType = USB_DTYPE_CS_INTERFACE,
.bDescriptorSubType = USB_DTYPE_CDC_ACM,
.bmCapabilities = 0,
.bmCapabilities = USB_CDC_CAP_BRK,
},
.cdc_union =
{
@@ -330,7 +330,7 @@ static const struct CdcConfigDescriptorDual
.bFunctionLength = sizeof(struct usb_cdc_acm_desc),
.bDescriptorType = USB_DTYPE_CS_INTERFACE,
.bDescriptorSubType = USB_DTYPE_CDC_ACM,
.bmCapabilities = 0,
.bmCapabilities = USB_CDC_CAP_BRK,
},
.cdc_union =
{
@@ -680,6 +680,13 @@ static usbd_respond cdc_control(usbd_device* dev, usbd_ctlreq* req, usbd_rqc_cal
dev->status.data_ptr = &cdc_config[if_num];
dev->status.data_count = sizeof(cdc_config[0]);
return usbd_ack;
case USB_CDC_SEND_BREAK:
if(callbacks[if_num] != NULL) {
if(callbacks[if_num]->break_callback != NULL) {
callbacks[if_num]->break_callback(cb_ctx[if_num], req->wValue);
}
}
return usbd_ack;
default:
return usbd_fail;
}
+1
View File
@@ -15,6 +15,7 @@ typedef struct {
void (*state_callback)(void* context, uint8_t state);
void (*ctrl_line_callback)(void* context, uint8_t state);
void (*config_callback)(void* context, struct usb_cdc_line_coding* config);
void (*break_callback)(void* context, uint16_t duration);
} CdcCallbacks;
void furi_hal_cdc_set_callbacks(uint8_t if_num, CdcCallbacks* cb, void* context);