Skip to content

Commit 92fad16

Browse files
authored
Merge branch 'main' into ADC
2 parents d7ec7e4 + 9b50f51 commit 92fad16

File tree

8 files changed

+184
-859
lines changed

8 files changed

+184
-859
lines changed

Lib/FancyLayers-RENAME/GRCAN/TemporaryHoldover/Inc/GR_OLD_MSG_DAT.h

Lines changed: 5 additions & 732 deletions
Large diffs are not rendered by default.
Lines changed: 81 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,84 @@
1-
#ifndef GR_MSG_ID_H
2-
#define GR_MSG_ID_H
1+
#ifndef GR_OLD_MSG_ID_H
2+
#define GR_OLD_MSG_ID_H
33

4-
#define MSG_DEBUG_2_0 0x000
5-
#define MSG_DEBUG_FD 0x001
6-
#define MSG_PING 0x002
7-
#define MSG_ECU_STATUS_1 0x003
8-
#define MSG_ECU_STATUS_2 0x004
9-
#define MSG_ECU_STATUS_3 0x005
10-
#define MSG_ECU_CONFIG 0x006
11-
#define MSG_ACU_STATUS_1 0x007
12-
#define MSG_ACU_STATUS_2 0x008
13-
#define MSG_ACU_STATUS_3 0x009
14-
#define MSG_ACU_PRECHARGE 0x00A
15-
#define MSG_ACU_CONFIG_CHARGE_PARAMETERS 0x00B
16-
#define MSG_ACU_CONFIG_OPERATIONAL_PARAMETERS 0x00C
17-
#define MSG_ACU_CELL_DATA_1 0x00D
18-
#define MSG_ACU_CELL_DATA_2 0x00E
19-
#define MSG_ACU_CELL_DATA_3 0x00F
20-
#define MSG_ACU_CELL_DATA_4 0x010
21-
#define MSG_ACU_CELL_DATA_5 0x011
22-
#define MSG_DC_DC_STATUS 0x012
23-
#define MSG_INVERTER_STATUS_1 0x013
24-
#define MSG_INVERTER_STATUS_2 0x014
25-
#define MSG_INVERTER_STATUS_3 0x015
26-
#define MSG_INVERTER_CONFIG 0x016
27-
#define MSG_INVERTER_COMMAND 0x017
28-
#define MSG_FAN_STATUS 0x018
29-
#define MSG_FAN_COMMAND 0x019
30-
#define MSG_DASH_STATUS 0x01A
31-
#define MSG_DASH_CONFIG 0x01B
32-
#define MSG_STEERING_STATUS 0x01C
33-
#define MSG_STEERING_CONFIG 0x01D
34-
#define MSG_SAM_BRAKE_IR 0x01E
35-
#define MSG_SAM_TIRE_TEMP 0x01F
36-
#define MSG_SAM_IMU 0x020
37-
#define MSG_SAM_GPS_1 0x021
38-
#define MSG_SAM_GPS_2 0x022
39-
#define MSG_SAM_GPS_TIME 0x023
40-
#define MSG_SAM_GPS_HEADING 0x024
41-
#define MSG_SAM_SUS_POTS 0x025
42-
#define MSG_SAM_TOF 0x026
43-
#define MSG_SAM_REAR_WHEELSPEED 0x027
44-
#define MSG_SAM_PUSHROD_FORCE 0x028
45-
#define MSG_TCM_STATUS 0x029
46-
#define MSG_TCM_RESOURCE_UTILIZATION 0x02A
47-
#define MSG_DASH_WARNING_FLAGS 0x02B
48-
#define MSG_SPECIFIC_BRAKE_IR 0x02C
49-
#define MSG_ECU_PING_INFORMATION 0x02D
50-
#define MSG_ECU_PEDALS_DATA 0x02E
51-
52-
#define MSG_DTI_CONTROL_1 0x116
53-
#define MSG_DTI_CONTROL_2 0x216
54-
#define MSG_DTI_CONTROL_3 0x316
55-
#define MSG_DTI_CONTROL_4 0x416
56-
#define MSG_DTI_CONTROL_5 0x516
57-
#define MSG_DTI_CONTROL_6 0x616
58-
#define MSG_DTI_CONTROL_7 0x716
59-
#define MSG_DTI_CONTROL_8 0x816
60-
#define MSG_DTI_CONTROL_9 0x916
61-
#define MSG_DTI_CONTROL_10 0xA16
62-
#define MSG_DTI_CONTROL_11 0xB16
63-
#define MSG_DTI_CONTROL_12 0xC16
64-
#define MSG_DTI_DATA_1 0x2016
65-
#define MSG_DTI_DATA_2 0x2116
66-
#define MSG_DTI_DATA_3 0x2216
67-
#define MSG_DTI_DATA_4 0x2316
68-
#define MSG_DTI_DATA_5 0x2416
69-
#define MSG_IMD_GENERAL 0x18FF01F4
70-
#define MSG_IMD_ISOLATION_INFO 0x18EFF4FE
71-
#define MSG_IMD_VOLTAGE 0x18EFF4FE
72-
#define MSG_IMD_IT_SYSTEM 0x18EFF4FE
73-
#define MSG_IMD_REQUEST 0x18EFF4FE
74-
#define MSG_IMD_RESPONSE 0x23
75-
#define MSG_CHARGER_DATA 0x18FF50E5
76-
#define MSG_CHARGER_CONTROL 0x1806E5F4
77-
#define MSG_EM_MEASUREMENT 0x10d
78-
#define MSG_EM_STATUS 0x40d
79-
#define MSG_EM_TEMPERATURE 0x60d
80-
#define MSG_EM_TEAM_DATA_1 0x30d
81-
#define MSG_EM_TEAM_DATA_2 0x30e
4+
typedef enum {
5+
MSG_DEBUG_2_0 = 0x000,
6+
MSG_DEBUG_FD = 0x001,
7+
MSG_PING = 0x002,
8+
MSG_ECU_STATUS_1 = 0x003,
9+
MSG_ECU_STATUS_2 = 0x004,
10+
MSG_ECU_STATUS_3 = 0x005,
11+
MSG_ECU_CONFIG = 0x006,
12+
MSG_ACU_STATUS_1 = 0x007,
13+
MSG_ACU_STATUS_2 = 0x008,
14+
MSG_ACU_STATUS_3 = 0x009,
15+
MSG_ACU_PRECHARGE = 0x00A,
16+
MSG_ACU_CONFIG_CHARGE_PARAMETERS = 0x00B,
17+
MSG_ACU_CONFIG_OPERATIONAL_PARAMETERS = 0x00C,
18+
MSG_ACU_CELL_DATA_1 = 0x00D,
19+
MSG_ACU_CELL_DATA_2 = 0x00E,
20+
MSG_ACU_CELL_DATA_3 = 0x00F,
21+
MSG_ACU_CELL_DATA_4 = 0x010,
22+
MSG_ACU_CELL_DATA_5 = 0x011,
23+
MSG_DC_DC_STATUS = 0x012,
24+
MSG_INVERTER_STATUS_1 = 0x013,
25+
MSG_INVERTER_STATUS_2 = 0x014,
26+
MSG_INVERTER_STATUS_3 = 0x015,
27+
MSG_INVERTER_CONFIG = 0x016,
28+
MSG_INVERTER_COMMAND = 0x017,
29+
MSG_FAN_STATUS = 0x018,
30+
MSG_FAN_COMMAND = 0x019,
31+
MSG_DASH_STATUS = 0x01A,
32+
MSG_DASH_CONFIG = 0x01B,
33+
MSG_STEERING_STATUS = 0x01C,
34+
MSG_STEERING_CONFIG = 0x01D,
35+
MSG_SAM_BRAKE_IR = 0x01E,
36+
MSG_SAM_TIRE_TEMP = 0x01F,
37+
MSG_SAM_IMU = 0x020,
38+
MSG_SAM_GPS_1 = 0x021,
39+
MSG_SAM_GPS_2 = 0x022,
40+
MSG_SAM_GPS_TIME = 0x023,
41+
MSG_SAM_GPS_HEADING = 0x024,
42+
MSG_SAM_SUS_POTS = 0x025,
43+
MSG_SAM_TOF = 0x026,
44+
MSG_SAM_REAR_WHEELSPEED = 0x027,
45+
MSG_SAM_PUSHROD_FORCE = 0x028,
46+
MSG_TCM_STATUS = 0x029,
47+
MSG_TCM_RESOURCE_UTILIZATION = 0x02A,
48+
MSG_DASH_WARNING_FLAGS = 0x02B,
49+
MSG_SPECIFIC_BRAKE_IR = 0x02C,
50+
MSG_ECU_PING_INFORMATION = 0x02D,
51+
MSG_ECU_PEDALS_DATA = 0x02E,
52+
MSG_DTI_CONTROL_1 = 0x116,
53+
MSG_DTI_CONTROL_2 = 0x216,
54+
MSG_DTI_CONTROL_3 = 0x316,
55+
MSG_DTI_CONTROL_4 = 0x416,
56+
MSG_DTI_CONTROL_5 = 0x516,
57+
MSG_DTI_CONTROL_6 = 0x616,
58+
MSG_DTI_CONTROL_7 = 0x716,
59+
MSG_DTI_CONTROL_8 = 0x816,
60+
MSG_DTI_CONTROL_9 = 0x916,
61+
MSG_DTI_CONTROL_10 = 0xA16,
62+
MSG_DTI_CONTROL_11 = 0xB16,
63+
MSG_DTI_CONTROL_12 = 0xC16,
64+
MSG_DTI_DATA_1 = 0x2016,
65+
MSG_DTI_DATA_2 = 0x2116,
66+
MSG_DTI_DATA_3 = 0x2216,
67+
MSG_DTI_DATA_4 = 0x2316,
68+
MSG_DTI_DATA_5 = 0x2416,
69+
MSG_IMD_GENERAL = 0x18FF01F4,
70+
MSG_IMD_ISOLATION_INFO = 0x18EFF4FE,
71+
MSG_IMD_VOLTAGE = 0x18EFF4FE,
72+
MSG_IMD_IT_SYSTEM = 0x18EFF4FE,
73+
MSG_IMD_REQUEST = 0x18EFF4FE,
74+
MSG_IMD_RESPONSE = 0x23,
75+
MSG_CHARGER_DATA = 0x18FF50E5,
76+
MSG_CHARGER_CONTROL = 0x1806E5F4,
77+
MSG_EM_MEASUREMENT = 0x10d,
78+
MSG_EM_STATUS = 0x40d,
79+
MSG_EM_TEMPERATURE = 0x60d,
80+
MSG_EM_TEAM_DATA_1 = 0x30d,
81+
MSG_EM_TEAM_DATA_2 = 0x30e,
82+
} GR_OLD_MSG_ID;
8283

8384
#endif
Lines changed: 49 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,52 @@
1-
#ifndef GR_NODE_ID_H
2-
#define GR_NODE_ID_H
1+
#ifndef GR_OLD_NODE_ID_H
2+
#define GR_OLD_NODE_ID_H
33

4-
#define GR_DTI_INVERTER 0x00
5-
#define GR_ENERGY_METER 0x00
6-
#define GR_CHARGER 0x00
7-
#define GR_IMD 0x00
8-
#define GR_DEBUGGER 0x01
9-
#define GR_ECU 0x02
10-
#define GR_ACU 0x03
11-
#define GR_TCM 0x04
12-
#define GR_DASH_PANEL 0x05
13-
#define GR_STEERING_WHEEL 0x06
14-
#define GR_GR_INVERTER_1 0x08
15-
#define GR_GR_INVERTER_2 0x09
16-
#define GR_GR_INVERTER_3 0x0A
17-
#define GR_GR_INVERTER_4 0x0B
18-
#define GR_CHARGING_SDC 0x0C
19-
#define GR_FAN_CONTROLLER_1 0x0D
20-
#define GR_FAN_CONTROLLER_2 0x0E
21-
#define GR_FAN_CONTROLLER_3 0x0F
22-
#define GR_FAN_CONTROLLER_4 0x10
23-
#define GR_FAN_CONTROLLER_5 0x11
24-
#define GR_FAN_CONTROLLER_6 0x12
25-
#define GR_FAN_CONTROLLER_7 0x13
26-
#define GR_FAN_CONTROLLER_8 0x14
27-
#define GR_SAM1 0x15
28-
#define GR_SAM2 0x16
29-
#define GR_SAM3 0x17
30-
#define GR_SAM4 0x18
31-
#define GR_SAM5 0x19
32-
#define GR_SAM6 0x1A
33-
#define GR_SAM7 0x1B
34-
#define GR_SAM8 0x1C
35-
#define GR_SAM9 0x1D
36-
#define GR_SAM10 0x1E
37-
#define GR_SAM11 0x1F
38-
#define GR_SAM12 0x20
39-
#define GR_SAM13 0x21
40-
#define GR_SAM14 0x22
41-
#define GR_SAM15 0x23
42-
#define GR_SAM16 0x24
43-
#define GR_SAM17 0x25
44-
#define GR_SAM18 0x26
45-
#define GR_SAM19 0x27
46-
#define GR_SAM20 0x28
47-
#define GR_LV_DC_DC 0x29
48-
#define GR_ALL 0xFF
4+
typedef enum {
5+
GR_DTI_INVERTER = 0x00,
6+
GR_ENERGY_METER = 0x00,
7+
GR_CHARGER = 0x00,
8+
GR_IMD = 0x00,
9+
GR_DEBUGGER = 0x01,
10+
GR_ECU = 0x02,
11+
GR_ACU = 0x03,
12+
GR_TCM = 0x04,
13+
GR_DASH_PANEL = 0x05,
14+
GR_STEERING_WHEEL = 0x06,
15+
GR_GR_INVERTER_1 = 0x08,
16+
GR_GR_INVERTER_2 = 0x09,
17+
GR_GR_INVERTER_3 = 0x0A,
18+
GR_GR_INVERTER_4 = 0x0B,
19+
GR_CHARGING_SDC = 0x0C,
20+
GR_FAN_CONTROLLER_1 = 0x0D,
21+
GR_FAN_CONTROLLER_2 = 0x0E,
22+
GR_FAN_CONTROLLER_3 = 0x0F,
23+
GR_FAN_CONTROLLER_4 = 0x10,
24+
GR_FAN_CONTROLLER_5 = 0x11,
25+
GR_FAN_CONTROLLER_6 = 0x12,
26+
GR_FAN_CONTROLLER_7 = 0x13,
27+
GR_FAN_CONTROLLER_8 = 0x14,
28+
GR_SAM1 = 0x15,
29+
GR_SAM2 = 0x16,
30+
GR_SAM3 = 0x17,
31+
GR_SAM4 = 0x18,
32+
GR_SAM5 = 0x19,
33+
GR_SAM6 = 0x1A,
34+
GR_SAM7 = 0x1B,
35+
GR_SAM8 = 0x1C,
36+
GR_SAM9 = 0x1D,
37+
GR_SAM10 = 0x1E,
38+
GR_SAM11 = 0x1F,
39+
GR_SAM12 = 0x20,
40+
GR_SAM13 = 0x21,
41+
GR_SAM14 = 0x22,
42+
GR_SAM15 = 0x23,
43+
GR_SAM16 = 0x24,
44+
GR_SAM17 = 0x25,
45+
GR_SAM18 = 0x26,
46+
GR_SAM19 = 0x27,
47+
GR_SAM20 = 0x28,
48+
GR_LV_DC_DC = 0x29,
49+
GR_ALL = 0xFF,
50+
} GR_OLD_NODE_ID;
4951

5052
#endif
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#ifndef _STRINGIFICATION_H_
2+
#define _STRINGIFICATION_H_
3+
4+
/**
5+
* @brief Macro to convert a macro argument into a string literal.
6+
*
7+
* This macro uses the C preprocessor's stringification operator (#) to
8+
* convert the provided argument into a string literal.
9+
*
10+
* @param x The macro argument to be converted into a string literal.
11+
* @return A string literal representing the argument.
12+
*/
13+
#define STRINGIFY(x) (#x)
14+
15+
#endif

Lib/GlobalShare/Inc/Unused.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@
1111
* @param x The variable or parameter to be marked as unused.
1212
*/
1313
#define UNUSED(x) (void)(x)
14+
1415
#endif
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include <string.h>
2+
3+
#include "Stringification.h"
4+
#include "Unused.h"
5+
6+
int main(void)
7+
{
8+
const char phrase[11] = "fourty two";
9+
UNUSED(phrase);
10+
return strcmp(STRINGIFY(phrase), "phrase");
11+
}

Lib/GlobalShare/Test/unused.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include "Unused.h"
2+
3+
int main(void)
4+
{
5+
int unused_variable = 42;
6+
UNUSED(unused_variable);
7+
return 0;
8+
}

Lib/GlobalShare/common.cmake

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,18 @@ if(CMAKE_PRESET_NAME STREQUAL "HOOTLTest")
4646
)
4747
target_link_libraries(logomatic_float PRIVATE GLOBALSHARE_LIB)
4848
add_test(logomatic_float_test logomatic_float)
49+
50+
add_executable(stringification)
51+
target_sources(
52+
stringification
53+
PRIVATE
54+
${CMAKE_CURRENT_LIST_DIR}/Test/stringification.c
55+
)
56+
target_link_libraries(stringification PRIVATE GLOBALSHARE_LIB)
57+
add_test(stringification_test stringification)
58+
59+
add_executable(unused)
60+
target_sources(unused PRIVATE ${CMAKE_CURRENT_LIST_DIR}/Test/unused.c)
61+
target_link_libraries(unused PRIVATE GLOBALSHARE_LIB)
62+
add_test(unused_test unused)
4963
endif()

0 commit comments

Comments
 (0)