Skip to content

Commit ab7b266

Browse files
committed
fix workflows
1 parent 3dd9471 commit ab7b266

File tree

9 files changed

+16
-9
lines changed

9 files changed

+16
-9
lines changed

.github/workflows/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ jobs:
179179
name: Google bloaty
180180
path: tools/bloaty/build
181181
- name: Debug
182-
run: ls docs/assets/tables
182+
run: ls firmware
183183
- name: Run bloaty
184184
run: |
185185
mkdir -p docs/assets/tables

src/MicroOcpp/Core/Time.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ Timestamp::Timestamp() : MemoryManaged("Timestamp") {
3636

3737
}
3838

39-
Timestamp::Timestamp(const Timestamp& other) : MemoryManaged("Timestamp") {
40-
*this = other;
41-
}
42-
4339
bool Timestamp::isUnixTime() const {
4440
return time >= MO_MIN_TIME && time <= MO_MAX_TIME;
4541
}

src/MicroOcpp/Core/Time.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ class Timestamp : public MemoryManaged {
4545
public:
4646

4747
Timestamp();
48-
Timestamp(const Timestamp& other);
48+
Timestamp(const Timestamp& other) = default;
49+
MicroOcpp::Timestamp& operator=(const Timestamp& other) = default;
4950

5051
bool isUnixTime() const;
5152
bool isUptime() const;

src/MicroOcpp/Model/Authorization/IdToken.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ IdToken::IdToken(const IdToken& other, const char *memoryTag) : IdToken(other.id
2828

2929
}
3030

31+
IdToken& IdToken::operator=(const IdToken& other) {
32+
snprintf(this->idToken, sizeof(this->idToken), "%s", other.idToken);
33+
this->type = other.type;
34+
updateMemoryTag(other.getMemoryTag(), nullptr);
35+
return *this;
36+
}
37+
3138
bool IdToken::parseCstr(const char *token, const char *typeCstr) {
3239
if (!token || !typeCstr) {
3340
return false;

src/MicroOcpp/Model/Authorization/IdToken.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ class IdToken : public MemoryManaged {
5353

5454
IdToken(const IdToken& other, const char *memoryTag = nullptr);
5555

56+
IdToken& operator=(const IdToken& other);
57+
5658
bool parseCstr(const char *token, const char *typeCstr);
5759

5860
const char *get() const;

src/MicroOcpp/Model/Boot/BootService.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ RegistrationStatus MicroOcpp::deserializeRegistrationStatus(const char *serializ
5252
}
5353

5454
BootService::BootService(Context& context) : MemoryManaged("v16/v201.Boot.BootService"), context(context) {
55-
55+
mo_bootNotificationData_init(&bnData);
5656
}
5757

5858
BootService::~BootService() {

src/MicroOcpp/Model/Boot/BootService.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class BootService : public MemoryManaged {
6666

6767
RegistrationStatus status = RegistrationStatus::Pending;
6868

69-
MO_BootNotificationData bnData {0};
69+
MO_BootNotificationData bnData;
7070
char *bnDataBuf = nullptr;
7171

7272
int ocppVersion = -1;

src/MicroOcpp/Model/Metering/MeterValue.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ SampledValue::~SampledValue() {
3535
case Type::String:
3636
MO_FREE(valueString);
3737
valueString = nullptr;
38+
break;
3839
#if MO_ENABLE_V201
3940
case Type::SignedValue:
4041
valueSigned->onDestroy(valueSigned->user_data);

src/MicroOcpp/Platform.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ uint32_t defaultTickCbImpl() {
7070
} //namespace MicroOcpp
7171
#else
7272
namespace MicroOcpp {
73-
void (*defaultDebugCbImpl)(const char*) = nullptr
73+
void (*defaultDebugCbImpl)(const char*) = nullptr;
7474
uint32_t (*defaultTickCbImpl)() = nullptr;
7575
} //namespace MicroOcpp
7676
#endif

0 commit comments

Comments
 (0)