Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into better-pet
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasvolcik committed Jun 4, 2024
2 parents 4005f8e + 8332ef1 commit 8366e7c
Show file tree
Hide file tree
Showing 409 changed files with 5,844 additions and 2,048 deletions.
17 changes: 17 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CompileFlags:
Add:
- -Wno-unknown-warning-option
- -Wno-format
Remove:
- -mword-relocations

Diagnostics:
ClangTidy:
FastCheckFilter: None

---

If:
PathMatch: .*\.h
Diagnostics:
UnusedIncludes: None
26 changes: 22 additions & 4 deletions .github/workflow_data/devbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@
with open(os.environ["GITHUB_EVENT_PATH"], "r") as f:
event = json.load(f)

release = "release"
before = event["before"]
after = event["after"]
compare = event["compare"].rsplit("/", 1)[0]

# Saved before uploading new devbuild
with open("previndex.json", "r") as f:
previndex = json.load(f)
for channel in previndex["channels"]:
if channel["id"] == "release":
release = channel["versions"][0]["version"]
if channel["id"] == "development":
before = channel["versions"][0]["version"]

requests.post(
os.environ["BUILD_WEBHOOK"],
headers={"Accept": "application/json", "Content-Type": "application/json"},
Expand All @@ -25,12 +39,16 @@
"color": 16751147,
"fields": [
{
"name": "Changes since last commit:",
"value": f"[Compare {event['before'][:7]} to {event['after'][:7]}]({event['compare']})"
"name": "Diff since last build:",
"value": f"[Compare {before[:8]} to {after[:8]}]({compare}/{before}...{after})"
},
{
"name": "Diff since last release:",
"value": f"[Compare {release} to {after[:8]}]({compare}/{release}...{after})"
},
{
"name": "Changes since last release:",
"value": f"[Compare release to {event['after'][:7]}]({event['compare'].rsplit('/', 1)[0] + '/release...' + event['after']})"
"name": "Changelog since last release:",
"value": f"[Changes since {release}]({event['repository']['html_url']}/blob/{after}/ChangeLog.md)"
},
{
"name": "Download artifacts:",
Expand Down
4 changes: 3 additions & 1 deletion .github/workflow_data/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
}
).json()
version_tag = release["tag_name"]
changelog = release["body"]

with open("ChangeLog.md", "r") as f:
changelog = f.read()

notes_path = '.github/workflow_data/release.md'
with open(notes_path, "r") as f:
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,24 @@ jobs:
exit 1
fi
- name: "Check API versions for consistency with OFW release"
env:
INDEXER_URL: ${{ secrets.INDEXER_URL }}
if: ${{ env.INDEXER_URL != '' && github.event_name == 'push' && ((github.ref_name == 'dev' && !contains(github.event.head_commit.message, '--nobuild')) || startsWith(github.ref, 'refs/tags/')) }}
run: |
set -e
for symbols in targets/f*/api_symbols.csv; do
ofw_api="$(curl -s "https://raw.githubusercontent.com/flipperdevices/flipperzero-firmware/release/${symbols}" | head -n2)"
our_api="$(head -n2 "${symbols}")"
if [ "$our_api" != "$ofw_api" ] ; then
echo API versions aren\'t matching OFW. Please update!
echo API versions are:
echo "OFW: $(tail -n1 <<< "$ofw_api")"
echo "Us: $(tail -n1 <<< "$our_api")"
exit 1
fi
done
- name: "Build the firmware and apps"
id: build-fw
run: |
Expand Down Expand Up @@ -97,6 +115,7 @@ jobs:
INDEXER_URL: ${{ secrets.INDEXER_URL }}
if: ${{ env.INDEXER_URL != '' && github.event_name == 'push' && ((github.ref_name == 'dev' && !contains(github.event.head_commit.message, '--nobuild')) || startsWith(github.ref, 'refs/tags/')) }}
run: |
curl "${{ secrets.INDEXER_URL }}"/firmware/directory.json > previndex.json
FILES=$(for ARTIFACT in $(find artifacts -maxdepth 1 -not -type d); do echo "-F files=@${ARTIFACT}"; done)
curl --fail -L -H "Token: ${{ secrets.INDEXER_TOKEN }}" \
-F "branch=${BRANCH_NAME}" \
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ compile_commands.json
# JetBrains IDEs
.idea/

# Sublime Text
.sublime-project.sublime-workspace

# Python VirtEnvironments
.env
.venv
Expand Down
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
[submodule "applications/external"]
path = applications/external
url = https://github.com/Next-Flip/Momentum-Apps.git
[submodule "assets/protobuf"]
path = assets/protobuf
url = https://github.com/Next-Flip/flipperzero-protobuf.git
shallow = false
[submodule "lib/mlib"]
path = lib/mlib
url = https://github.com/P-p-H-d/mlib.git
Expand All @@ -10,10 +14,6 @@
[submodule "lib/nanopb"]
path = lib/nanopb
url = https://github.com/nanopb/nanopb.git
[submodule "assets/protobuf"]
path = assets/protobuf
url = https://github.com/flipperdevices/flipperzero-protobuf.git
shallow = false
[submodule "lib/libusb_stm32"]
path = lib/libusb_stm32
url = https://github.com/flipperdevices/libusb_stm32.git
Expand Down
21 changes: 21 additions & 0 deletions .sublime-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"folders":
[
{
"path": ".",
}
],
"settings": {
"LSP": {
"clangd": {
"initializationOptions": {
"clangd.compile-commands-dir": "build/latest",
"clangd.header-insertion": null,
"clangd.query-driver": "**",
"clangd.clang-tidy": true,
},
"enabled": true,
},
},
},
}
4 changes: 3 additions & 1 deletion .vscode/example/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"clangd.arguments": [
// We might be able to tighten this a bit more to only include the correct toolchain.
"--query-driver=**",
"--compile-commands-dir=${workspaceFolder}/build/latest"
"--compile-commands-dir=${workspaceFolder}/build/latest",
"--clang-tidy",
"--header-insertion=never"
]
}
2 changes: 1 addition & 1 deletion .vscode/example/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"label": "[Debug:unit_tests] Flash (USB)",
"group": "build",
"type": "shell",
"command": "./fbt FIRMWARE_APP_SET=unit_tests FORCE=1 flash_usb"
"command": "./fbt FIRMWARE_APP_SET=unit_tests FORCE=1 flash_usb_full"
},
{
"label": "[Debug] Flash (USB, with resources)",
Expand Down
30 changes: 30 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
### Breaking Changes:
- VGM: Reworked color customization functionality over RPC (by @HaxSam & @Willy-JL)
- Better rainbow support, more responsive config, custom fore/back-ground
- If you used this, need to reflash your VGM and reconfigure the colors

### Added:
- Sub-GHz:
- New Legrand doorbell protocol (by @user890104)
- OFW: Princeton protocol add custom guard time (by @Skorpionm)
- FBT: New `SKIP_EXTERNAL` toggle and `EXTRA_EXT_APPS` config option (by @Willy-JL)
- Desktop: Added TV animation from OFW which was missing (internal on OFW)
- OFW: USB/CCID: Add initial ISO7816 support (by @kidbomb)
- OFW: FBT/VsCode: Tweaks for cdb generation for clangd (by @hedger)

### Updated:
- Apps:
- VGM Tool: Add new RGB VGM firmware to support Flipper FW changes (by @HaxSam)
- Picopass: Add acknowledgements page (by @bettse)
- Authenticator: Fix URL format (by @akopachov)
- Many apps updated for new message queue (by @Willy-JL)
- OFW: Furi: wrap message queue in container, prepare it for epoll (by @skotopes)

### Fixed:
- Archive: Fix favorite's parent folders thinking they are favorited too (by @Willy-JL)
- FBT: Consistent version/branch info, fix gitorigin (by @Willy-JL)
- OFW: Accessor: Disable expansion service on start (by @skotopes)
- OFW: cleanup of various warnings from clangd (by @hedger)

### Removed:
- API: Removed `Rgb565Color` and `rgb565cmp()` since VGM colors use normal RGB colors now
4 changes: 4 additions & 0 deletions applications/debug/accessor/accessor_app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,16 @@ void AccessorApp::run(void) {
AccessorApp::AccessorApp()
: text_store{0} {
notification = static_cast<NotificationApp*>(furi_record_open(RECORD_NOTIFICATION));
expansion = static_cast<Expansion*>(furi_record_open(RECORD_EXPANSION));
onewire_host = onewire_host_alloc(&gpio_ibutton);
expansion_disable(expansion);
furi_hal_power_enable_otg();
}

AccessorApp::~AccessorApp() {
furi_hal_power_disable_otg();
expansion_enable(expansion);
furi_record_close(RECORD_EXPANSION);
furi_record_close(RECORD_NOTIFICATION);
onewire_host_free(onewire_host);
}
Expand Down
2 changes: 2 additions & 0 deletions applications/debug/accessor/accessor_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "helpers/wiegand.h"
#include <one_wire/one_wire_host.h>
#include <notification/notification_messages.h>
#include <expansion/expansion.h>

class AccessorApp {
public:
Expand Down Expand Up @@ -51,4 +52,5 @@ class AccessorApp {
OneWireHost* onewire_host;

NotificationApp* notification;
Expansion* expansion;
};
1 change: 0 additions & 1 deletion applications/debug/accessor/scene/accessor_scene_start.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "../accessor_app.h"
#include "../accessor_view_manager.h"
#include "../accessor_event.h"
#include "callback_connector.h"
#include "accessor_scene_start.h"

void AccessorSceneStart::on_enter(AccessorApp* app) {
Expand Down
2 changes: 1 addition & 1 deletion applications/debug/battery_test_app/views/battery_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static void draw_battery(Canvas* canvas, BatteryInfoModel* data, int x, int y) {
drain_current > HIGH_DRAIN_CURRENT_THRESHOLD ? "mA!" : "mA");
} else if(drain_current != 0) {
snprintf(header, 20, "...");
} else if(data->charging_voltage < 4.2) {
} else if(data->charging_voltage < 4.2f) {
// Non-default battery charging limit, mention it
snprintf(emote, sizeof(emote), "Charged!");
snprintf(header, sizeof(header), "Limited to");
Expand Down
Loading

0 comments on commit 8366e7c

Please sign in to comment.