Skip to content

Commit 4d08d14

Browse files
author
Richard Unger
committed
fix RP2040 compile problems
1 parent 76f6514 commit 4d08d14

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/settings/rp2040/RP2040FlashSettingsStorage.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include "communication/SimpleFOCDebug.h"
77

88

9-
RP2040FlashSettingsStorage::RP2040FlashSettingsStorage(uint32_t offset = 0x0) {
9+
RP2040FlashSettingsStorage::RP2040FlashSettingsStorage(uint32_t offset) {
1010
_offset = offset;
1111
};
1212

@@ -60,23 +60,23 @@ RegisterIO& RP2040FlashSettingsStorage::operator>>(uint8_t& value) {
6060
uint8_t num = readBytes(&val, 1);
6161
if (num==1)
6262
value = val;
63-
return num;
63+
return *this;
6464
};
6565

6666
RegisterIO& RP2040FlashSettingsStorage::operator>>(float& value) {
6767
float val;
6868
uint8_t num = readBytes(&val, 4);
6969
if (num==4)
7070
value = val;
71-
return num;
71+
return *this;
7272
};
7373

7474
RegisterIO& RP2040FlashSettingsStorage::operator>>(uint32_t& value) {
7575
uint32_t val;
7676
uint8_t num = readBytes(&val, 4);
7777
if (num==4)
7878
value = val;
79-
return num;
79+
return *this;
8080
};
8181

8282

src/settings/rp2040/RP2040FlashSettingsStorage.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class RP2040FlashSettingsStorage : public SettingsStorage, public RegisterIO {
2727
int readBytes(void* valueToSet, int numBytes);
2828
void reset();
2929

30+
uint32_t _offset;
3031
uint8_t* _currptr;
3132
};
3233

0 commit comments

Comments
 (0)