Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add primitive type to struct when installing #50

Merged
merged 2 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Primitives/arduino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ int prim_index = 0;
if (prim_index < ALL_PRIMITIVES) { \
PrimitiveEntry *p = &primitives[prim_index++]; \
p->name = #prim_name; \
p->t = &(prim_name##_type); \
p->f = &(prim_name); \
p->f_reverse = nullptr; \
p->f_serialize_state = nullptr; \
Expand Down
1 change: 1 addition & 0 deletions src/Primitives/emulated.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ double sensor_emu = 0;
if (prim_index < ALL_PRIMITIVES) { \
PrimitiveEntry *p = &primitives[prim_index++]; \
p->name = #prim_name; \
p->t = &(prim_name##_type); \
p->f = &(prim_name); \
p->f_reverse = nullptr; \
p->f_serialize_state = nullptr; \
Expand Down
1 change: 1 addition & 0 deletions src/Primitives/idf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ double sensor_emu = 0;
if (prim_index < ALL_PRIMITIVES) { \
PrimitiveEntry *p = &primitives[prim_index++]; \
p->name = #prim_name; \
p->t = &(prim_name##_type); \
p->f = &(prim_name); \
p->f_reverse = nullptr; \
p->f_serialize_state = nullptr; \
Expand Down
1 change: 1 addition & 0 deletions src/Primitives/zephyr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ double sensor_emu = 0;
if (prim_index < ALL_PRIMITIVES) { \
PrimitiveEntry *p = &primitives[prim_index++]; \
p->name = #prim_name; \
p->t = &(prim_name##_type); \
p->f = &(prim_name); \
p->f_reverse = nullptr; \
p->f_serialize_state = nullptr; \
Expand Down
2 changes: 1 addition & 1 deletion src/WARDuino.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ typedef struct PrimitiveEntry {
Primitive f;
void (*f_reverse)(Module *m, std::vector<IOStateElement>);
void (*f_serialize_state)(std::vector<IOStateElement *> &);
Type t;
Type *t;
} PrimitiveEntry;

class WARDuino {
Expand Down