Skip to content

Commit 800e592

Browse files
authored
Merge branch 'develop' into feature/svelte-5
2 parents 3127c04 + 207531d commit 800e592

29 files changed

+117
-84
lines changed

.github/actions/cdn-bump-version/action.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,22 @@ inputs:
2626
runs:
2727
using: composite
2828
steps:
29-
- name: Upload version file
29+
- name: Prepare Upload Folder
3030
shell: bash
3131
run: |
3232
mkdir -p upload
3333
echo "${{ inputs.version }}" >> upload/version-${{ inputs.release-channel }}.txt
34-
sshpass -p "${{ inputs.bunny-stor-password }}" scp -v -r upload/* ${{ inputs.bunny-stor-username }}@${{ inputs.bunny-stor-hostname }}:/
34+
35+
- name: Upload version file
36+
uses: milanmk/actions-file-deployer@master
37+
with:
38+
remote-protocol: "sftp"
39+
remote-host: "${{ inputs.bunny-stor-hostname }}"
40+
remote-user: "${{ inputs.bunny-stor-username }}"
41+
remote-password: "${{ inputs.bunny-stor-password }}"
42+
remote-path: "/"
43+
local-path: "upload"
44+
sync: "full"
3545

3646
- name: Purge CDN cache
3747
shell: bash

.github/actions/cdn-upload-firmware/action.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,20 @@ runs:
4949
find . -type f -name '*.bin' -exec md5sum {} \; > hashes.md5.txt
5050
find . -type f -name '*.bin' -exec sha256sum {} \; > hashes.sha256.txt
5151
52-
- name: Upload artifacts to CDN
52+
- name: Prepare Upload Folder
5353
shell: bash
5454
run: |
5555
mkdir -p upload
5656
mv *.bin upload/
5757
mv hashes.*.txt upload/
58-
sshpass -p "${{ inputs.bunny-stor-password }}" scp -r upload/ ${{ inputs.bunny-stor-username }}@${{ inputs.bunny-stor-hostname }}:/${{ inputs.fw-version }}/${{ inputs.board }}
58+
59+
- name: Upload artifacts to CDN
60+
uses: milanmk/actions-file-deployer@master
61+
with:
62+
remote-protocol: "sftp"
63+
remote-host: "${{ inputs.bunny-stor-hostname }}"
64+
remote-user: "${{ inputs.bunny-stor-username }}"
65+
remote-password: "${{ inputs.bunny-stor-password }}"
66+
remote-path: "/${{ inputs.fw-version }}/${{ inputs.board }}"
67+
local-path: "upload"
68+
sync: "full"

.github/actions/cdn-upload-version-info/action.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,25 @@ inputs:
2323
runs:
2424
using: composite
2525
steps:
26-
- name: Create boards.txt
26+
27+
- name: Prepare Upload Folder
2728
shell: bash
2829
run: |
29-
echo -e '${{ inputs.boards }}' >> boards.txt
30+
rm -rf upload/
31+
mkdir -p upload/
3032
31-
- name: Upload artifacts to CDN
33+
- name: Create boards.txt
3234
shell: bash
3335
run: |
34-
mkdir -p upload
35-
mv boards.txt upload/
36-
sshpass -p "${{ inputs.bunny-stor-password }}" scp -r upload/* ${{ inputs.bunny-stor-username }}@${{ inputs.bunny-stor-hostname }}:/${{ inputs.fw-version }}/${{ inputs.board }}
36+
echo -e '${{ inputs.boards }}' >> upload/boards.txt
37+
38+
- name: Upload artifacts to CDN
39+
uses: milanmk/actions-file-deployer@master
40+
with:
41+
remote-protocol: "sftp"
42+
remote-host: "${{ inputs.bunny-stor-hostname }}"
43+
remote-user: "${{ inputs.bunny-stor-username }}"
44+
remote-password: "${{ inputs.bunny-stor-password }}"
45+
remote-path: "/${{ inputs.fw-version }}/${{ inputs.board }}"
46+
local-path: "upload"
47+
sync: "full"

include/Chipset.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ namespace OpenShock {
281281
return count;
282282
}
283283

284-
const uint8_t ValidInputPinsCount = GetValidInputPinsCount();
285-
const uint8_t ValidOutputPinsCount = GetValidOutputPinsCount();
284+
constexpr uint8_t ValidInputPinsCount = GetValidInputPinsCount();
285+
constexpr uint8_t ValidOutputPinsCount = GetValidOutputPinsCount();
286286
typedef std::bitset<GPIO_NUM_MAX> GPIOPinSet;
287287

288288
constexpr GPIOPinSet GetValidGPIOPins()

include/GatewayClient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace OpenShock {
1919
GatewayClient(const std::string& authToken);
2020
~GatewayClient();
2121

22-
constexpr GatewayClientState state() const { return m_state; }
22+
inline GatewayClientState state() const { return m_state; }
2323

2424
void connect(const char* lcgFqdn);
2525
void disconnect();

include/Hashing.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include <array> // TODO: When we use C++20, change this to <span>
1010
#include <cstdint>
11+
#include <string_view>
1112

1213
namespace OpenShock {
1314
class MD5 {
@@ -20,6 +21,7 @@ namespace OpenShock {
2021

2122
inline bool begin() { return mbedtls_md5_starts_ret(&ctx) == 0; }
2223
inline bool update(const uint8_t* data, std::size_t dataLen) { return mbedtls_md5_update_ret(&ctx, data, dataLen) == 0; }
24+
inline bool update(std::string_view data) { return update(reinterpret_cast<const uint8_t*>(data.data()), data.length()); }
2325
inline bool finish(std::array<uint8_t, 16>& hash) { return mbedtls_md5_finish_ret(&ctx, hash.data()) == 0; }
2426

2527
private:
@@ -35,6 +37,7 @@ namespace OpenShock {
3537

3638
inline bool begin() { return mbedtls_sha1_starts_ret(&ctx) == 0; }
3739
inline bool update(const uint8_t* data, std::size_t dataLen) { return mbedtls_sha1_update_ret(&ctx, data, dataLen) == 0; }
40+
inline bool update(std::string_view data) { return update(reinterpret_cast<const uint8_t*>(data.data()), data.length()); }
3841
inline bool finish(std::array<uint8_t, 20>& hash) { return mbedtls_sha1_finish_ret(&ctx, hash.data()) == 0; }
3942

4043
private:
@@ -50,6 +53,7 @@ namespace OpenShock {
5053

5154
inline bool begin() { return mbedtls_sha256_starts_ret(&ctx, 0) == 0; }
5255
inline bool update(const uint8_t* data, std::size_t dataLen) { return mbedtls_sha256_update_ret(&ctx, data, dataLen) == 0; }
56+
inline bool update(std::string_view data) { return update(reinterpret_cast<const uint8_t*>(data.data()), data.length()); }
5357
inline bool finish(std::array<uint8_t, 32>& hash) { return mbedtls_sha256_finish_ret(&ctx, hash.data()) == 0; }
5458

5559
private:

include/SemVer.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ namespace OpenShock {
4444
inline bool operator>(const SemVer& other) const { return !(*this <= other); }
4545
inline bool operator>=(const SemVer& other) const { return !(*this < other); }
4646

47-
bool operator==(const std::string_view& other) const;
48-
inline bool operator!=(const std::string_view& other) const { return !(*this == other); }
49-
bool operator<(const std::string_view& other) const;
50-
inline bool operator<=(const std::string_view& other) const { return *this < other || *this == other; }
51-
inline bool operator>(const std::string_view& other) const { return !(*this <= other); }
52-
inline bool operator>=(const std::string_view& other) const { return !(*this < other); }
47+
bool operator==(std::string_view other) const;
48+
inline bool operator!=(std::string_view other) const { return !(*this == other); }
49+
bool operator<(std::string_view other) const;
50+
inline bool operator<=(std::string_view other) const { return *this < other || *this == other; }
51+
inline bool operator>(std::string_view other) const { return !(*this <= other); }
52+
inline bool operator>=(std::string_view other) const { return !(*this < other); }
5353

5454
bool isValid() const;
5555

include/VisualStateManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#include "EStopManager.h"
3+
#include "estop/EStopManager.h"
44
#include <cstdint>
55

66
namespace OpenShock::VisualStateManager {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#include "EStopState.h"
3+
#include "estop/EStopState.h"
44

55
#include <hal/gpio_types.h>
66

0 commit comments

Comments
 (0)