-
-
Notifications
You must be signed in to change notification settings - Fork 181
Open
Description
Describe the bug
studio/packages/project-editor/build/flows.ts
Line 941 in bc2d692
| get = ".getDoulbe()"; |
See above for the exact typo in the source.
A type in the string used for a replacement to access the member for a double in auto-generated code in structs.h causes an lsp error.
To Reproduce
Steps to reproduce the behavior:
- Create a project in EEZ Studio as LVGL with Flow
- Create a struct in the "Variable" view
- Add a field to the structure of type
double - See emitted
structs.hfor lsp error
Desktop:
- OS: Linux (Arch)
- Version: 6.16.8-arch3-1
** LVGL version (if used)**
- 8.x or 9.x
Additional context
In this example you can see the auto-generated code containts the incorrect call to a structs member:
/* structs.h */
typedef ArrayOf<heartbeatValue, FLOW_ARRAY_OF_STRUCTURE_HEARTBEAT> ArrayOfheartbeatValue;
struct can_snap_metaValue {
Value value;
can_snap_metaValue() {
value = Value::makeArrayRef(FLOW_STRUCTURE_CAN_SNAP_META_NUM_FIELDS, FLOW_STRUCTURE_CAN_SNAP_META, 0);
}
can_snap_metaValue(Value value) : value(value) {}
operator Value() const { return value; }
operator bool() const { return value.isArray(); }
double valid_mask() {
return value.getArray()->values[FLOW_STRUCTURE_CAN_SNAP_META_FIELD_VALID_MASK].getDoulbe();
}
void valid_mask(double valid_mask) {
value.getArray()->values[FLOW_STRUCTURE_CAN_SNAP_META_FIELD_VALID_MASK] = DoubleValue(valid_mask);
}
double last_update_ms() {
return value.getArray()->values[FLOW_STRUCTURE_CAN_SNAP_META_FIELD_LAST_UPDATE_MS].getDoulbe();
}
void last_update_ms(double last_update_ms) {
value.getArray()->values[FLOW_STRUCTURE_CAN_SNAP_META_FIELD_LAST_UPDATE_MS] = DoubleValue(last_update_ms);
}
double frames_rx() {
return value.getArray()->values[FLOW_STRUCTURE_CAN_SNAP_META_FIELD_FRAMES_RX].getDoulbe();
}
void frames_rx(double frames_rx) {
value.getArray()->values[FLOW_STRUCTURE_CAN_SNAP_META_FIELD_FRAMES_RX] = DoubleValue(frames_rx);
}
double frames_dropped() {
return value.getArray()->values[FLOW_STRUCTURE_CAN_SNAP_META_FIELD_FRAMES_DROPPED].getDoulbe();
}
void frames_dropped(double frames_dropped) {
value.getArray()->values[FLOW_STRUCTURE_CAN_SNAP_META_FIELD_FRAMES_DROPPED] = DoubleValue(frames_dropped);
}
double errors() {
return value.getArray()->values[FLOW_STRUCTURE_CAN_SNAP_META_FIELD_ERRORS].getDoulbe();
}
void errors(double errors) {
value.getArray()->values[FLOW_STRUCTURE_CAN_SNAP_META_FIELD_ERRORS] = DoubleValue(errors);
}
};