Skip to content

Commit a40c10f

Browse files
EsTaNG9claude
andcommitted
chore: regenerate T26 cantools sources after DBC update
Regenerate data/powertrain/autonomous_t26 C sources with cantools 42.0.3 following the 3bb5a09 DBC sync. Pack/unpack code is unchanged; only doc comments differ (unit strings and em-dashes were double-encoded mojibake). Force UTF-8 in generate_dbc_api.py and generate_can_bridge.py so running them on Windows no longer rewrites non-ASCII characters in generated files. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 3bb5a09 commit a40c10f

8 files changed

Lines changed: 62 additions & 62 deletions

File tree

LART_Car_Dashboard_v1/src/ui/generate_dbc_api.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def main():
5858
for sig_slug in sorted(list(sig_slugs)):
5959
lines.append(f"float32 {sig_slug}")
6060

61-
with open(msg_path, "w") as mf:
61+
with open(msg_path, "w", encoding="utf-8") as mf:
6262
mf.write("\n".join(lines) + "\n")
6363
generated_msg_files.append(msg_filename)
6464

@@ -89,7 +89,7 @@ def main():
8989
"",
9090
"ament_package()"
9191
])
92-
with open(cmake_path, "w") as cf:
92+
with open(cmake_path, "w", encoding="utf-8") as cf:
9393
cf.write("\n".join(cmake_lines) + "\n")
9494
print(f"Generated {len(generated_msg_files)} .msg files and updated CMakeLists.txt")
9595

@@ -152,7 +152,7 @@ def main():
152152
])
153153

154154
header_path = os.path.join(script_dir, "dbc_api.h")
155-
with open(header_path, "w") as f:
155+
with open(header_path, "w", encoding="utf-8") as f:
156156
f.write("\n".join(header_lines) + "\n")
157157
print(f"Generated: {header_path}")
158158

@@ -215,7 +215,7 @@ def main():
215215
])
216216

217217
sub_path = os.path.join(script_dir, f"dbc_api_sub_{idx}.cpp")
218-
with open(sub_path, "w") as sf:
218+
with open(sub_path, "w", encoding="utf-8") as sf:
219219
sf.write("\n".join(sub_lines) + "\n")
220220
print(f"Generated: {sub_path}")
221221

@@ -518,7 +518,7 @@ def main():
518518
source_lines.extend(error_checking_lines)
519519

520520
source_path = os.path.join(script_dir, "dbc_api.cpp")
521-
with open(source_path, "w") as f:
521+
with open(source_path, "w", encoding="utf-8") as f:
522522
f.write("\n".join(source_lines) + "\n")
523523
print(f"Generated: {source_path}")
524524

LART_Car_Dashboard_v1/src/ui/generated/autonomous_t26.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @file autonomous_t26.c
33
*
4-
* @brief This source file was generated by cantools version 41.4.1 Tue Jun 30 04:51:53 2026.
4+
* @brief This source file was generated by cantools version 42.0.3 Thu Sep 17 15:25:20 2026.
55
*
66
* @copyright Copyright (c) 2018-2019 Erik Moqvist
77
*

LART_Car_Dashboard_v1/src/ui/generated/autonomous_t26.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @file autonomous_t26.h
33
*
4-
* @brief This header file was generated by cantools version 41.4.1 Tue Jun 30 04:51:53 2026.
4+
* @brief This header file was generated by cantools version 42.0.3 Thu Sep 17 15:25:20 2026.
55
*
66
* @copyright Copyright (c) 2018-2019 Erik Moqvist
77
*
@@ -327,7 +327,7 @@ struct autonomous_t26_acu_t {
327327
uint8_t acu_state;
328328

329329
/**
330-
* Range: 0..255 (0..255 ºc)
330+
* Range: 0..255 (0..255 ºc)
331331
* Scale: 1
332332
* Offset: 0
333333
*/

LART_Car_Dashboard_v1/src/ui/generated/data_t26.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @file data_t26.c
33
*
4-
* @brief This source file was generated by cantools version 42.0.3 Wed Sep 16 22:42:56 2026.
4+
* @brief This source file was generated by cantools version 42.0.3 Thu Sep 17 15:25:19 2026.
55
*
66
* @copyright Copyright (c) 2018-2019 Erik Moqvist
77
*

LART_Car_Dashboard_v1/src/ui/generated/data_t26.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @file data_t26.h
33
*
4-
* @brief This header file was generated by cantools version 42.0.3 Wed Sep 16 22:42:56 2026.
4+
* @brief This header file was generated by cantools version 42.0.3 Thu Sep 17 15:25:19 2026.
55
*
66
* @copyright Copyright (c) 2018-2019 Erik Moqvist
77
*
@@ -264,7 +264,7 @@ struct data_t26_vcu_inv1_temperatures_t {
264264
/**
265265
* Inverter semiconductor temperature
266266
*
267-
* Range: -550..2000 (-55..200 �C)
267+
* Range: -550..2000 (-55..200 ºC)
268268
* Scale: 0.1
269269
* Offset: 0
270270
*/
@@ -273,7 +273,7 @@ struct data_t26_vcu_inv1_temperatures_t {
273273
/**
274274
* Motor temperature measured by the inverter
275275
*
276-
* Range: -550..2000 (-55..200 �C)
276+
* Range: -550..2000 (-55..200 ºC)
277277
* Scale: 0.1
278278
* Offset: 0
279279
*/
@@ -291,7 +291,7 @@ struct data_t26_vcu_inv2_temperatures_t {
291291
/**
292292
* Inverter semiconductor temperature
293293
*
294-
* Range: -550..2000 (-55..200 �C)
294+
* Range: -550..2000 (-55..200 ºC)
295295
* Scale: 0.1
296296
* Offset: 0
297297
*/
@@ -300,7 +300,7 @@ struct data_t26_vcu_inv2_temperatures_t {
300300
/**
301301
* Motor temperature measured by the inverter
302302
*
303-
* Range: -550..2000 (-55..200 �C)
303+
* Range: -550..2000 (-55..200 ºC)
304304
* Scale: 0.1
305305
* Offset: 0
306306
*/

LART_Car_Dashboard_v1/src/ui/generated/generate_can_bridge.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def _ros_header_name(slug: str) -> str:
136136
])
137137

138138
hpp_path = os.path.join(script_dir, "can_bridge_impl.hpp")
139-
with open(hpp_path, "w") as f:
139+
with open(hpp_path, "w", encoding="utf-8") as f:
140140
f.write("\n".join(hpp_lines) + "\n")
141141
print(f"Generated: {hpp_path}")
142142

@@ -169,7 +169,7 @@ def _ros_header_name(slug: str) -> str:
169169
])
170170

171171
cpp_path = os.path.join(script_dir, "can_bridge_impl.cpp")
172-
with open(cpp_path, "w") as f:
172+
with open(cpp_path, "w", encoding="utf-8") as f:
173173
f.write("\n".join(cpp_lines) + "\n")
174174
print(f"Generated: {cpp_path}")
175175

@@ -260,7 +260,7 @@ def _ros_header_name(slug: str) -> str:
260260
])
261261

262262
sub_path = os.path.join(script_dir, f"can_bridge_impl_sub_{idx}.cpp")
263-
with open(sub_path, "w") as sf:
263+
with open(sub_path, "w", encoding="utf-8") as sf:
264264
sf.write("\n".join(sub_lines) + "\n")
265265
print(f"Generated: {sub_path}")
266266

LART_Car_Dashboard_v1/src/ui/generated/powertrain_t26.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @file powertrain_t26.c
33
*
4-
* @brief This source file was generated by cantools version 42.0.3 Wed Sep 16 22:42:57 2026.
4+
* @brief This source file was generated by cantools version 42.0.3 Thu Sep 17 15:25:19 2026.
55
*
66
* @copyright Copyright (c) 2018-2019 Erik Moqvist
77
*

0 commit comments

Comments
 (0)