Skip to content

Commit

Permalink
Fix BMSB UDS message clash
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshLafleur committed Nov 24, 2024
1 parent a6937e1 commit bc3c315
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 18 deletions.
4 changes: 3 additions & 1 deletion components/bms_boss/HW/HW_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
#include "Sys.h"

#include "MessageUnpack_generated.h"
#include "uds.h"
#include "uds_componentSpecific.h"
#include "LIB_app.h"

/******************************************************************************
* D E F I N E S
Expand Down Expand Up @@ -206,7 +208,7 @@ static HAL_StatusTypeDef CAN_sendMsg(CAN_HandleTypeDef* canHandle, CAN_TxMessage
*/
bool CAN_sendMsgBus0(CAN_TX_Priorities_E priority, CAN_data_T data, uint16_t id, uint8_t len)
{
CAN_TxMessage_T msg;
CAN_TxMessage_T msg = {0};

msg.id = id;
msg.data = data;
Expand Down
2 changes: 1 addition & 1 deletion components/bms_boss/include/UDS.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
******************************************************************************/

#include "FeatureDefines_generated.h"
#if FEATURE_UDS
#if APP_UDS
// component-specific UDS configuration
#include "uds_componentSpecific.h"

Expand Down
2 changes: 1 addition & 1 deletion components/bms_boss/src/UDS.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
#include "ModuleDesc.h"
#include "task.h"
#include "uds.h"
#include "LIB_app.h"
#include "Utility.h"

// system includes
#include <string.h>


/******************************************************************************
* E X T E R N S
******************************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion components/bms_boss/variants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ configs:
- "#/components/shared/FeatureSels/APP_V1_FeatureSels.yaml"
- "FeatureSels.yaml"
overrides:
app_uds: false #False because of CAN ID clash with charger
app_uds: true
app_component_id: bmsb
app_pcba_id: 0
8 changes: 4 additions & 4 deletions components/bootloaders/STM/stm32f103/variants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ configs:
10:
description: BMS Boss Bootloader
options:
udsRequestId: 0x610
udsResponseId: 0x650
udsRequestId: 0x609
udsResponseId: 0x649
features:
selections:
- "#/components/shared/FeatureSels/STM32F103xB_FeatureSels.yaml"
Expand All @@ -221,8 +221,8 @@ configs:
1010:
description: BMS Boss Bootloader Updater
options:
udsRequestId: 0x610
udsResponseId: 0x650
udsRequestId: 0x609
udsResponseId: 0x649
features:
selections:
- "#/components/shared/FeatureSels/STM32F103xB_FeatureSels.yaml"
Expand Down
2 changes: 1 addition & 1 deletion network/definition/data/components/bmsb/bmsb-message.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ messages:
udsResponse:
description: UDS response message from the BMSB
unscheduled: true
id: 0x650
id: 0x649
lengthBytes: 8
signals:
udsPayload:
4 changes: 2 additions & 2 deletions network/definition/data/components/bmsb/bmsb-rx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ messages:
BMSW5_criticalData:
BRUSA513_criticalData:
PM100DX_criticalData:
# UDSCLIENT_bmsbUdsRequest:
# unrecorded: true
UDSCLIENT_bmsbUdsRequest:
unrecorded: true
signals:
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ messages:
signals:
udsPayload:

# bmsbUdsRequest:
# description: UDS request message for the BMS Boss
# id: 0x610
# lengthBytes: 8
# signals:
# udsPayload:
bmsbUdsRequest:
description: UDS request message for the BMS Boss
id: 0x609
lengthBytes: 8
signals:
udsPayload:

stwUdsRequest:
description: UDS request message for the Steering Wheel
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
messages:
# BMSB_udsResponse:
BMSB_udsResponse:
BMSW0_udsResponse:
BMSW1_udsResponse:
BMSW2_udsResponse:
Expand Down

0 comments on commit bc3c315

Please sign in to comment.