Update apps

This commit is contained in:
Willy-JL
2023-03-28 04:47:54 +01:00
parent 927fa4f99c
commit ad7aa172d8
18 changed files with 73 additions and 25 deletions

View File

@@ -4,6 +4,6 @@ App(
apptype=FlipperAppType.EXTERNAL, apptype=FlipperAppType.EXTERNAL,
entry_point="air_mouse_app", entry_point="air_mouse_app",
stack_size=10 * 1024, stack_size=10 * 1024,
fap_icon="mouse_10px.png",
fap_category="GPIO", fap_category="GPIO",
fap_icon="mouse_10px.png",
) )

View File

@@ -8,8 +8,8 @@ App(
stack_size=8 * 1024, stack_size=8 * 1024,
order=50, order=50,
fap_icon="appicon.png", fap_icon="appicon.png",
fap_category="Games",
fap_icon_assets="assets", # Image assets to compile for this application fap_icon_assets="assets", # Image assets to compile for this application
fap_category="Games",
fap_description="An implementation of the classic arcade game Asteroids", fap_description="An implementation of the classic arcade game Asteroids",
fap_author="antirez, SimplyMinimal", fap_author="antirez, SimplyMinimal",
fap_weburl="https://github.com/SimplyMinimal/FlipperZero-Asteroids", fap_weburl="https://github.com/SimplyMinimal/FlipperZero-Asteroids",

View File

@@ -7,7 +7,7 @@ App(
requires=["gui"], requires=["gui"],
stack_size=2 * 1024, stack_size=2 * 1024,
fap_icon="bpm_10px.png", fap_icon="bpm_10px.png",
fap_icon_assets="icons",
fap_category="Music", fap_category="Music",
order=35, fap_icon_assets="icons",
order=15,
) )

View File

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@@ -0,0 +1,7 @@
Rate: 1
Ch: 122
ESB: 1
DPL: 0
CRC: 2
Payload: 4
P0: C8C8C1

View File

@@ -0,0 +1,7 @@
Rate: 1
Ch: 120
ESB: 1
DPL: 1
CRC: 2
Payload: 4
P0: C8C8E5

View File

@@ -0,0 +1,11 @@
Rate: 1
Ch: 2
ESB: 1
DPL: 0
CRC: 2
Payload: 4
P0: C8C8C0
P1: C8C8C1
P2: C2
P3: C3
P4: E5

View File

@@ -0,0 +1,5 @@
SNIFF
ESB: 1
CRC: 2
P0: 00AA
P1: 0055

View File

@@ -532,6 +532,7 @@ static void prepare_nrf24(bool fsend_packet) {
nrf24_HANDLE, nrf24_HANDLE,
REG_FEATURE, REG_FEATURE,
0); // Enables the W_TX_PAYLOAD_NOACK command, Disable Payload with ACK, set Dynamic Payload 0); // Enables the W_TX_PAYLOAD_NOACK command, Disable Payload with ACK, set Dynamic Payload
// EN_DYN_ACK(0x01) for W_TX_PAYLOAD_NOACK cmd broke AA on some fake nRF24l01+ modules
} else if(setup_from_log) { // Scan } else if(setup_from_log) { // Scan
nrf24_write_reg( nrf24_write_reg(
nrf24_HANDLE, nrf24_HANDLE,
@@ -544,8 +545,8 @@ static void prepare_nrf24(bool fsend_packet) {
nrf24_HANDLE, nrf24_HANDLE,
REG_FEATURE, REG_FEATURE,
*(rec + 2 + addr_size) >> 2 != 0x33 ? *(rec + 2 + addr_size) >> 2 != 0x33 ?
4 + 1 : 4 :
1); // Enables the W_TX_PAYLOAD_NOACK command, Disable Payload with ACK, set Dynamic Payload 0); // Enables the W_TX_PAYLOAD_NOACK command, Disable Payload with ACK, set Dynamic Payload
if(*(rec + 1) & 0b100) { // ESB if(*(rec + 1) & 0b100) { // ESB
nrf24_write_reg(nrf24_HANDLE, REG_SETUP_RETR, 0x01); // Automatic Retransmission nrf24_write_reg(nrf24_HANDLE, REG_SETUP_RETR, 0x01); // Automatic Retransmission
nrf24_write_reg(nrf24_HANDLE, REG_EN_AA, 0x3F); // Auto acknowledgement nrf24_write_reg(nrf24_HANDLE, REG_EN_AA, 0x3F); // Auto acknowledgement
@@ -570,8 +571,8 @@ static void prepare_nrf24(bool fsend_packet) {
nrf24_HANDLE, nrf24_HANDLE,
REG_FEATURE, REG_FEATURE,
NRF_DPL ? NRF_DPL ?
4 + 1 : 4 :
1); // Enables the W_TX_PAYLOAD_NOACK command, Disable Payload with ACK, set Dynamic Payload 0); // Enables the W_TX_PAYLOAD_NOACK command, Disable Payload with ACK, set Dynamic Payload
nrf24_write_reg( nrf24_write_reg(
nrf24_HANDLE, REG_DYNPD, NRF_DPL ? 0x3F : 0); // Enable dynamic payload reg nrf24_HANDLE, REG_DYNPD, NRF_DPL ? 0x3F : 0); // Enable dynamic payload reg
nrf24_write_reg(nrf24_HANDLE, REG_RF_CH, NRF_channel); nrf24_write_reg(nrf24_HANDLE, REG_RF_CH, NRF_channel);
@@ -909,7 +910,7 @@ bool nrf24_send_packet() {
nrf24_set_maclen(nrf24_HANDLE, 2); nrf24_set_maclen(nrf24_HANDLE, 2);
nrf24_set_mac(REG_RX_ADDR_P0, adr, 2); nrf24_set_mac(REG_RX_ADDR_P0, adr, 2);
nrf24_set_mac(REG_TX_ADDR, adr, 2); nrf24_set_mac(REG_TX_ADDR, adr, 2);
last_packet_send_st = nrf24_txpacket(nrf24_HANDLE, ptr + 2 + 2, 32 - 2, false); last_packet_send_st = nrf24_txpacket(nrf24_HANDLE, ptr + 2 + 2, 32 - 2, true);
} else { } else {
nrf24_write_reg( nrf24_write_reg(
nrf24_HANDLE, REG_SETUP_RETR, NRF_ESB ? 0x11 : 0); // Automatic Retransmission nrf24_HANDLE, REG_SETUP_RETR, NRF_ESB ? 0x11 : 0); // Automatic Retransmission
@@ -943,7 +944,7 @@ bool nrf24_send_packet() {
NRF_CRC == 2 ? 0b1100 : NRF_CRC == 2 ? 0b1100 :
0))); // Mask all interrupts 0))); // Mask all interrupts
nrf24_write_reg(nrf24_HANDLE, REG_DYNPD, NRF_DPL ? 0x3F : 0); // Enable dynamic payload reg nrf24_write_reg(nrf24_HANDLE, REG_DYNPD, NRF_DPL ? 0x3F : 0); // Enable dynamic payload reg
last_packet_send_st = nrf24_txpacket(nrf24_HANDLE, ptr + 2, a, false); last_packet_send_st = nrf24_txpacket(nrf24_HANDLE, ptr + 2, a, true);
} }
last_packet_send = view_log_arr_idx; last_packet_send = view_log_arr_idx;
notification_message( notification_message(
@@ -954,10 +955,9 @@ bool nrf24_send_packet() {
} }
static void render_callback(Canvas* const canvas, void* ctx) { static void render_callback(Canvas* const canvas, void* ctx) {
furi_assert(ctx);
const PluginState* plugin_state = ctx; const PluginState* plugin_state = ctx;
furi_mutex_acquire(plugin_state->mutex, FuriWaitForever); if(plugin_state == NULL) return;
if(furi_mutex_acquire(plugin_state->mutex, 25) != FuriStatusOk) return;
//canvas_draw_frame(canvas, 0, 0, 128, 64); // border around the edge of the screen //canvas_draw_frame(canvas, 0, 0, 128, 64); // border around the edge of the screen
if(what_doing == 0) { if(what_doing == 0) {
canvas_set_font(canvas, FontSecondary); // 8x10 font, 6 lines canvas_set_font(canvas, FontSecondary); // 8x10 font, 6 lines
@@ -1334,12 +1334,12 @@ int32_t nrf24scan_app(void* p) {
APP = malloc(sizeof(Nrf24Scan)); APP = malloc(sizeof(Nrf24Scan));
DOLPHIN_DEED(DolphinDeedPluginStart); DOLPHIN_DEED(DolphinDeedPluginStart);
APP->event_queue = furi_message_queue_alloc(8, sizeof(PluginEvent)); APP->event_queue = furi_message_queue_alloc(8, sizeof(PluginEvent));
APP->plugin_state = malloc(sizeof(PluginState)); PluginState* plugin_state = malloc(sizeof(PluginState));
APP->plugin_state->mutex = furi_mutex_alloc(FuriMutexTypeNormal); plugin_state->mutex = furi_mutex_alloc(FuriMutexTypeNormal);
if(!APP->plugin_state->mutex) { if(!plugin_state->mutex) {
furi_message_queue_free(APP->event_queue); furi_message_queue_free(APP->event_queue);
FURI_LOG_E(TAG, "cannot create mutex"); FURI_LOG_E(TAG, "cannot create mutex");
free(APP->plugin_state); free(plugin_state);
return 255; return 255;
} }
APP->log_arr = malloc(LOG_REC_SIZE * MAX_LOG_RECORDS); APP->log_arr = malloc(LOG_REC_SIZE * MAX_LOG_RECORDS);
@@ -1365,7 +1365,7 @@ int32_t nrf24scan_app(void* p) {
// Set system callbacks // Set system callbacks
APP->view_port = view_port_alloc(); APP->view_port = view_port_alloc();
view_port_draw_callback_set(APP->view_port, render_callback, APP->plugin_state); view_port_draw_callback_set(APP->view_port, render_callback, plugin_state);
view_port_input_callback_set(APP->view_port, input_callback, APP->event_queue); view_port_input_callback_set(APP->view_port, input_callback, APP->event_queue);
// Open GUI and register view_port // Open GUI and register view_port
@@ -1406,7 +1406,7 @@ int32_t nrf24scan_app(void* p) {
PluginEvent event; PluginEvent event;
for(bool processing = true; processing;) { for(bool processing = true; processing;) {
FuriStatus event_status = furi_message_queue_get(APP->event_queue, &event, 100); FuriStatus event_status = furi_message_queue_get(APP->event_queue, &event, 100);
furi_mutex_acquire(APP->plugin_state->mutex, FuriWaitForever); furi_mutex_acquire(plugin_state->mutex, FuriWaitForever);
if(event_status == FuriStatusOk) { if(event_status == FuriStatusOk) {
// press events // press events
@@ -1633,7 +1633,7 @@ int32_t nrf24scan_app(void* p) {
} }
view_port_update(APP->view_port); view_port_update(APP->view_port);
furi_mutex_release(APP->plugin_state->mutex); furi_mutex_release(plugin_state->mutex);
} }
nrf24_set_idle(nrf24_HANDLE); nrf24_set_idle(nrf24_HANDLE);
if(log_arr_idx && (log_to_file == 1 || log_to_file == 2)) { if(log_arr_idx && (log_to_file == 1 || log_to_file == 2)) {
@@ -1648,11 +1648,11 @@ int32_t nrf24scan_app(void* p) {
furi_record_close(RECORD_NOTIFICATION); furi_record_close(RECORD_NOTIFICATION);
furi_record_close(RECORD_STORAGE); furi_record_close(RECORD_STORAGE);
view_port_free(APP->view_port); view_port_free(APP->view_port);
furi_mutex_free(APP->plugin_state->mutex);
furi_message_queue_free(APP->event_queue); furi_message_queue_free(APP->event_queue);
free(APP->plugin_state);
if(APP->log_arr) free(APP->log_arr); if(APP->log_arr) free(APP->log_arr);
if(APP->found) free(APP->found); if(APP->found) free(APP->found);
furi_mutex_free(plugin_state->mutex);
free(plugin_state);
free(APP); free(APP);
return 0; return 0;
} }

View File

@@ -31,7 +31,6 @@ struct FOUND {
typedef struct { typedef struct {
Gui* gui; Gui* gui;
FuriMessageQueue* event_queue; FuriMessageQueue* event_queue;
PluginState* plugin_state;
ViewPort* view_port; ViewPort* view_port;
Storage* storage; Storage* storage;
NotificationApp* notification; NotificationApp* notification;

21
applications/external/qrcode/LICENSE vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 Bob Matcuk
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.

View File

@@ -1,5 +1,3 @@
# qv. https://github.com/flipperdevices/flipperzero-firmware/blob/dev/documentation/AppManifests.md
App( App(
appid="usb_hid_autofire", appid="usb_hid_autofire",
name="USB HID Autofire", name="USB HID Autofire",