Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Ujhhgtg committed Nov 11, 2023
2 parents 77dc320 + 9095a65 commit b7bc03d
Show file tree
Hide file tree
Showing 174 changed files with 5,029 additions and 1,594 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: CynthiaLabs
patreon: crazyco
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
Expand Down
6 changes: 6 additions & 0 deletions .github/workflow_data/devbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
event = json.load(f)

client = nextcloud_client.Client(os.environ["NC_HOST"])
_session = requests.session
def session(*args, **kwargs):
s = _session(*args, **kwargs)
s.headers["User-Agent"] = os.environ["NC_USERAGENT"]
return s
requests.session = session
client.login(os.environ["NC_USER"], os.environ["NC_PASS"])

for file in (
Expand Down
84 changes: 42 additions & 42 deletions .github/workflow_data/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,56 +36,56 @@
for i, commit in enumerate(event["commits"]):
msg = commit['message'].splitlines()[0].replace("`", "")
msg = msg[:50] + ("..." if len(msg) > 50 else "")
desc += f"\n[`{commit['id'][:7]}`]({commit['url']}): {msg} - [__{commit['author']['username']}__](https://github.com/{commit['author']['username']})"
desc += f"\n[`{commit['id'][:7]}`]({commit['url']}): {msg} - [__{commit['author'].get('username')}__](https://github.com/{commit['author'].get('username')})"
if len(desc) > 2020:
desc = desc.rsplit("\n", 1)[0] + f"\n+ {count - i} more commits"
break
url = event["compare"]
color = 16723712 if event["forced"] else 3669797

case "pull_request":
pr = event["pull_request"]
url = pr["html_url"]
branch = pr["base"]["ref"] + (
""
if pr["base"]["repo"]["full_name"] != pr["head"]["repo"]["full_name"]
else f" <- {pr['head']['ref']}"
)
name = pr["title"][:50] + ("..." if len(pr["title"]) > 50 else "")
title = f"Pull Request {event['action'].title()} ({branch}): {name}"
match event["action"]:
case "opened":
desc = (pr["body"][:2045] + "...") if len(pr["body"]) > 2048 else pr["body"]
color = 3669797
# case "pull_request":
# pr = event["pull_request"]
# url = pr["html_url"]
# branch = pr["base"]["ref"] + (
# ""
# if pr["base"]["repo"]["full_name"] != pr["head"]["repo"]["full_name"]
# else f" <- {pr['head']['ref']}"
# )
# name = pr["title"][:50] + ("..." if len(pr["title"]) > 50 else "")
# title = f"Pull Request {event['action'].title()} ({branch}): {name}"
# match event["action"]:
# case "opened":
# desc = (pr["body"][:2045] + "...") if len(pr["body"]) > 2048 else pr["body"]
# color = 3669797

fields.append(
{
"name": "Changed Files:",
"value": str(pr["changed_files"]),
"inline": True,
}
)
fields.append(
{
"name": "Added:",
"value": "+" + str(pr["additions"]),
"inline": True,
}
)
fields.append(
{
"name": "Removed:",
"value": "-" + str(pr["deletions"]),
"inline": True,
}
)
# fields.append(
# {
# "name": "Changed Files:",
# "value": str(pr["changed_files"]),
# "inline": True,
# }
# )
# fields.append(
# {
# "name": "Added:",
# "value": "+" + str(pr["additions"]),
# "inline": True,
# }
# )
# fields.append(
# {
# "name": "Removed:",
# "value": "-" + str(pr["deletions"]),
# "inline": True,
# }
# )

case "closed":
color = 16723712
case "reopened":
color = 16751872
case _:
sys.exit(1)
# case "closed":
# color = 16723712
# case "reopened":
# color = 16751872
# case _:
# sys.exit(1)

case "release":
match event["action"]:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflow_data/webupdater.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import nextcloud_client
import requests
import json
import os

if __name__ == "__main__":
client = nextcloud_client.Client(os.environ["NC_HOST"])
_session = requests.session
def session(*args, **kwargs):
s = _session(*args, **kwargs)
s.headers["User-Agent"] = os.environ["NC_USERAGENT"]
return s
requests.session = session
client.login(os.environ["NC_USER"], os.environ["NC_PASS"])

file = os.environ["ARTIFACT_TGZ"]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ concurrency:
env:
TARGETS: f7
DEFAULT_TARGET: f7
FBT_GIT_SUBMODULE_SHALLOW: 1

jobs:
build:
Expand Down Expand Up @@ -71,3 +72,4 @@ jobs:
name: "${{ env.VERSION_TAG }}"
tag_name: "${{ env.VERSION_TAG }}"
target_commitish: ${{ github.event.pull_request.base.ref }}

1 change: 1 addition & 0 deletions .github/workflows/hotfix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
- name: "Upload to webupdater"
env:
NC_HOST: "https://cloud.cynthialabs.net/"
NC_USERAGENT: "${{ secrets.NC_USERAGENT }}"
NC_USER: "${{ secrets.NC_USER }}"
NC_PASS: "${{ secrets.NC_PASS }}"
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sonarcloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: 'SonarCloud'

on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened]
# pull_request:
# types: [opened, synchronize, reopened]

env:
TARGETS: f7
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/webhook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: 'Webhook'

on:
push:
pull_request:
types:
- "opened"
- "closed"
- "reopened"
# pull_request:
# types:
# - "opened"
# - "closed"
# - "reopened"
release:
types:
- "published"
Expand Down
4 changes: 2 additions & 2 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ $ ./fbt launch APPSRC=some_appid
## ❤️ Support
If you like what you're seeing, **please consider donating to us**. We won't ever put this behind a paywall, but we'd still appreciate a few bucks!

- **[Patreon](https://patreon.com/CynthiaLabs)**: ❤️ Account needed, subscription with perks across my entire org.
- **[Patreon](https://patreon.com/crazyco)**: ❤️ Account needed, subscription with perks across my entire org.
- **[Wire-transfer](https://bunq.me/ClaraK)**: No account needed, one-time
- **[Paypal](https://paypal.me/RdX2020)**: Account needed, one-time
- **[Paypal](https://paypal.me/ClaraCrazy)**: Account needed, one-time
- **[ko-fi](https://ko-fi.com/cynthialabs)**: No account needed, one-time
- **Monero**: `41kyWeeoVdK4quzQ4M9ikVGs6tCQCLfdx8jLExTNsAu2SF1QAyDqRdjfGM6EL8L9NpXwt89HJeAoGf1aoArk7nDr4AMMV4T`

Expand Down
11 changes: 5 additions & 6 deletions applications/drivers/subghz/cc1101_ext/cc1101_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,16 +214,15 @@ bool subghz_device_cc1101_ext_alloc(SubGhzDeviceConf* conf) {
subghz_device_cc1101_ext->async_rx.capture_delta_duration = 0;

subghz_device_cc1101_ext->spi_bus_handle =
(XTREME_SETTINGS()->spi_cc1101_handle == SpiDefault ?
(xtreme_settings.spi_cc1101_handle == SpiDefault ?
&furi_hal_spi_bus_handle_external :
&furi_hal_spi_bus_handle_external_extra);

// this is needed if multiple SPI devices are connected to the same bus but with different CS pins
if(XTREME_SETTINGS()->spi_cc1101_handle == SpiDefault &&
!furi_hal_subghz_get_ext_power_amp()) {
if(xtreme_settings.spi_cc1101_handle == SpiDefault && !furi_hal_subghz_get_ext_power_amp()) {
furi_hal_gpio_init_simple(&gpio_ext_pc3, GpioModeOutputPushPull);
furi_hal_gpio_write(&gpio_ext_pc3, true);
} else if(XTREME_SETTINGS()->spi_cc1101_handle == SpiExtra) {
} else if(xtreme_settings.spi_cc1101_handle == SpiExtra) {
furi_hal_gpio_init_simple(&gpio_ext_pa4, GpioModeOutputPushPull);
furi_hal_gpio_write(&gpio_ext_pa4, true);
}
Expand All @@ -245,9 +244,9 @@ void subghz_device_cc1101_ext_free() {
free(subghz_device_cc1101_ext);

// resetting the CS pins to floating
if(XTREME_SETTINGS()->spi_nrf24_handle == SpiDefault || subghz_device_cc1101_ext->power_amp) {
if(xtreme_settings.spi_nrf24_handle == SpiDefault || subghz_device_cc1101_ext->power_amp) {
furi_hal_gpio_init_simple(&gpio_ext_pc3, GpioModeAnalog);
} else if(XTREME_SETTINGS()->spi_nrf24_handle == SpiExtra) {
} else if(xtreme_settings.spi_nrf24_handle == SpiExtra) {
furi_hal_gpio_init_simple(&gpio_ext_pa4, GpioModeAnalog);
}

Expand Down
10 changes: 4 additions & 6 deletions applications/external/advanced_wifisniff/sniffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@
#define MAX_SSID_LENGTH 32
#define MAX_BSSID_LENGTH 18

#define UART_CH_ESP \
(XTREME_SETTINGS()->uart_esp_channel == UARTDefault ? FuriHalUartIdUSART1 : \
FuriHalUartIdLPUART1)
#define UART_CH_ESP \
(xtreme_settings.uart_esp_channel == UARTDefault ? FuriHalUartIdUSART1 : FuriHalUartIdLPUART1)

#define UART_CH_GPS \
(XTREME_SETTINGS()->uart_nmea_channel == UARTDefault ? FuriHalUartIdUSART1 : \
FuriHalUartIdLPUART1)
#define UART_CH_GPS \
(xtreme_settings.uart_nmea_channel == UARTDefault ? FuriHalUartIdUSART1 : FuriHalUartIdLPUART1)

#define WORKER_ALL_RX_EVENTS (WorkerEvtStop | WorkerEvtRxDone)

Expand Down
Loading

0 comments on commit b7bc03d

Please sign in to comment.