Skip to content

Commit 21bce3c

Browse files
committed
can data padding optimization
1 parent 25ab027 commit 21bce3c

File tree

8 files changed

+10
-8
lines changed

8 files changed

+10
-8
lines changed

common/can_library/canpiler/templates/bus_header.h.jinja

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ static constexpr uint8_t {{ msg.macro_name }}_DLC = {{ msg.dlc }};
1919
static constexpr uint32_t {{ msg.macro_name }}_PERIOD_MS = {{ msg.period }};
2020

2121
typedef struct {
22+
uint32_t last_rx;
23+
// Begin signal defs
2224
{% for sig in msg.signals %}
2325
{{ sig.c_type }} {{ sig.name }};
2426
{% endfor %}
25-
uint32_t last_rx;
27+
// End signal defs
2628
bool stale;
2729
} {{ msg.name }}_data_t;
2830

common/can_library/canpiler/templates/node_header.h.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
{% endif %}
2727

2828
// System Version: {{ context.version }}
29-
static constexpr uint64_t GIT_HASH = 0x{{ context.version }};
29+
static constexpr uint32_t GIT_HASH = 0x{{ context.version }};
3030

3131
// Peripheral Configuration
3232
static constexpr uint8_t NUM_CAN_PERIPHERALS = {{ peripherals|length }};

common/can_library/configs/nodes/A_BOX.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@
491491
"signals": [
492492
{
493493
"sig_name": "git_hash",
494-
"type": "uint64_t",
494+
"type": "uint32_t",
495495
"sig_desc": "int representation of git short hash"
496496
}
497497
],

common/can_library/configs/nodes/DAQ.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"signals": [
6969
{
7070
"sig_name": "git_hash",
71-
"type": "uint64_t",
71+
"type": "uint32_t",
7272
"sig_desc": "int representation of git short hash"
7373
}
7474
],

common/can_library/configs/nodes/DASHBOARD.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@
285285
"signals": [
286286
{
287287
"sig_name": "git_hash",
288-
"type": "uint64_t",
288+
"type": "uint32_t",
289289
"sig_desc": "int representation of git short hash"
290290
}
291291
],

common/can_library/configs/nodes/MAIN_MODULE.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@
643643
"signals": [
644644
{
645645
"sig_name": "git_hash",
646-
"type": "uint64_t",
646+
"type": "uint32_t",
647647
"sig_desc": "int representation of git short hash"
648648
}
649649
],

common/can_library/configs/nodes/PDU.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@
232232
"signals": [
233233
{
234234
"sig_name": "git_hash",
235-
"type": "uint64_t",
235+
"type": "uint32_t",
236236
"sig_desc": "int representation of git short hash"
237237
}
238238
],

common/can_library/configs/nodes/TORQUE_VECTOR.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@
289289
"signals": [
290290
{
291291
"sig_name": "git_hash",
292-
"type": "uint64_t",
292+
"type": "uint32_t",
293293
"sig_desc": "int representation of git short hash"
294294
}
295295
],

0 commit comments

Comments
 (0)