mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-08 14:12:05 +00:00
Merge branch 'master' into rework-ch341
This commit is contained in:
commit
da3187e12d
41
.github/workflows/hook_copr.yml
vendored
41
.github/workflows/hook_copr.yml
vendored
@ -3,9 +3,7 @@ name: Trigger COPR build
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
secrets:
|
secrets:
|
||||||
COPR_HOOK_DAILY:
|
COPR_API_CONFIG:
|
||||||
COPR_HOOK_ALPHA:
|
|
||||||
COPR_HOOK_BETA:
|
|
||||||
inputs:
|
inputs:
|
||||||
copr_project:
|
copr_project:
|
||||||
description: COPR project to target
|
description: COPR project to target
|
||||||
@ -32,30 +30,13 @@ jobs:
|
|||||||
pip install requests
|
pip install requests
|
||||||
|
|
||||||
- name: Trigger COPR build
|
- name: Trigger COPR build
|
||||||
shell: python
|
uses: akdev1l/copr-build@main
|
||||||
run: |
|
id: copr_build
|
||||||
import requests
|
env:
|
||||||
|
COPR_API_TOKEN_CONFIG: ${{ secrets.COPR_API_CONFIG }}
|
||||||
project_name = "${{ inputs.copr_project }}"
|
with:
|
||||||
if project_name == "daily":
|
owner: meshtastic
|
||||||
hook_secret = "${{ secrets.COPR_HOOK_DAILY }}"
|
package-name: meshtasticd
|
||||||
project_id = 160277
|
project-name: ${{ inputs.copr_project }}
|
||||||
elif project_name == "alpha":
|
git-remote: "${{ github.server_url }}/${{ github.repository }}.git"
|
||||||
hook_secret = "${{ secrets.COPR_HOOK_ALPHA }}"
|
committish: ${{ github.sha }}
|
||||||
project_id = 160278
|
|
||||||
elif project_name == "beta":
|
|
||||||
hook_secret = "${{ secrets.COPR_HOOK_BETA }}"
|
|
||||||
project_id = 160279
|
|
||||||
else:
|
|
||||||
raise ValueError(f"Unknown COPR project: {project_name}")
|
|
||||||
|
|
||||||
webhook_url = f"https://copr.fedorainfracloud.org/webhooks/github/{project_id}/{hook_secret}/meshtasticd/"
|
|
||||||
copr_payload = {
|
|
||||||
"ref": "${{ github.ref }}",
|
|
||||||
"after": "${{ github.sha }}",
|
|
||||||
"repository": {
|
|
||||||
"clone_url": "${{ github.server_url }}/${{ github.repository }}.git",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
r = requests.post(webhook_url, json=copr_payload, headers={"X-GitHub-Event": "push"})
|
|
||||||
r.raise_for_status()
|
|
||||||
|
@ -197,9 +197,8 @@ NodeDB::NodeDB()
|
|||||||
uint32_t channelFileCRC = crc32Buffer(&channelFile, sizeof(channelFile));
|
uint32_t channelFileCRC = crc32Buffer(&channelFile, sizeof(channelFile));
|
||||||
|
|
||||||
int saveWhat = 0;
|
int saveWhat = 0;
|
||||||
// bool hasUniqueId = false;
|
|
||||||
// Get device unique id
|
// Get device unique id
|
||||||
#if defined(ARCH_ESP32) && defined(ESP_EFUSE_OPTIONAL_UNIQUE_ID)
|
#if defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
|
||||||
uint32_t unique_id[4];
|
uint32_t unique_id[4];
|
||||||
// ESP32 factory burns a unique id in efuse for S2+ series and evidently C3+ series
|
// ESP32 factory burns a unique id in efuse for S2+ series and evidently C3+ series
|
||||||
// This is used for HMACs in the esp-rainmaker AIOT platform and seems to be a good choice for us
|
// This is used for HMACs in the esp-rainmaker AIOT platform and seems to be a good choice for us
|
||||||
@ -207,7 +206,6 @@ NodeDB::NodeDB()
|
|||||||
if (err == ESP_OK) {
|
if (err == ESP_OK) {
|
||||||
memcpy(myNodeInfo.device_id.bytes, unique_id, sizeof(unique_id));
|
memcpy(myNodeInfo.device_id.bytes, unique_id, sizeof(unique_id));
|
||||||
myNodeInfo.device_id.size = 16;
|
myNodeInfo.device_id.size = 16;
|
||||||
hasUniqueId = true;
|
|
||||||
} else {
|
} else {
|
||||||
LOG_WARN("Failed to read unique id from efuse");
|
LOG_WARN("Failed to read unique id from efuse");
|
||||||
}
|
}
|
||||||
@ -221,12 +219,12 @@ NodeDB::NodeDB()
|
|||||||
memcpy(myNodeInfo.device_id.bytes + sizeof(device_id_start), &device_id_end, sizeof(device_id_end));
|
memcpy(myNodeInfo.device_id.bytes + sizeof(device_id_start), &device_id_end, sizeof(device_id_end));
|
||||||
myNodeInfo.device_id.size = 16;
|
myNodeInfo.device_id.size = 16;
|
||||||
// Uncomment below to print the device id
|
// Uncomment below to print the device id
|
||||||
// hasUniqueId = true;
|
|
||||||
#else
|
#else
|
||||||
// FIXME - implement for other platforms
|
// FIXME - implement for other platforms
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// if (hasUniqueId) {
|
// if (myNodeInfo.device_id.size == 16) {
|
||||||
// std::string deviceIdHex;
|
// std::string deviceIdHex;
|
||||||
// for (size_t i = 0; i < myNodeInfo.device_id.size; ++i) {
|
// for (size_t i = 0; i < myNodeInfo.device_id.size; ++i) {
|
||||||
// char buf[3];
|
// char buf[3];
|
||||||
|
Loading…
Reference in New Issue
Block a user