Skip to content

Commit

Permalink
MAM19: Add CONTACTOR topic
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoantoniocardoso committed Feb 25, 2022
1 parent d944e36 commit 4df0d55
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
9 changes: 9 additions & 0 deletions can_ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,15 @@
#define CAN_MSG_MAM19_MOTOR_I_BYTE 2 //<!" Motor Soft Start
#define CAN_MSG_MAM19_MOTOR_I_TYPE "u8"
#define CAN_MSG_MAM19_MOTOR_I_UNITS "%"
// MAM19 - CONTACTOR - Contactor requests
#define CAN_MSG_MAM19_CONTACTOR_ID 18
#define CAN_MSG_MAM19_CONTACTOR_LENGTH 2
#define CAN_MSG_MAM19_CONTACTOR_SIGNATURE_BYTE 0 //<!" Senders signature
#define CAN_MSG_MAM19_CONTACTOR_SIGNATURE_TYPE "u8"
#define CAN_MSG_MAM19_CONTACTOR_SIGNATURE_UNITS ""
#define CAN_MSG_MAM19_CONTACTOR_REQUEST_BYTE 1 //<!" Control the Contactor State
#define CAN_MSG_MAM19_CONTACTOR_REQUEST_TYPE "u8"
#define CAN_MSG_MAM19_CONTACTOR_REQUEST_UNITS ""


// MAB19 - Modulo de Acionamento das Bombas de Porao
Expand Down
25 changes: 25 additions & 0 deletions can_ids.json
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,31 @@
null,
null
]
},
{
"name": "CONTACTOR",
"description": "Contactor requests",
"id": 18,
"bytes": [
{
"name": "SIGNATURE",
"description": "Senders signature",
"type": "u8",
"units": ""
},
{
"name": "REQUEST",
"description": "Control the Contactor State",
"type": "u8",
"units": ""
},
null,
null,
null,
null,
null,
null
]
}
]
},
Expand Down
14 changes: 14 additions & 0 deletions can_ids_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1023,9 +1023,23 @@
btype = "u8",
units = "%"
)
#### TOPIC: CONTACTOR
topic_contactor = can.topic(
msg = "contactor",
id = 0b10010,
description = "Contactor requests"
)
topic_contactor.describe_byte(
name = "request",
byte = 1,
description = "Control the Contactor State",
btype = "u8",
units = ""
)

module_mam19.add_topic(topic_state)
module_mam19.add_topic(topic_motor)
module_mam19.add_topic(topic_contactor)
can.add_module(module_mam19)


Expand Down

0 comments on commit 4df0d55

Please sign in to comment.