Skip to content

Commit

Permalink
adding rl6 ucm information
Browse files Browse the repository at this point in the history
  • Loading branch information
nkrasko committed Nov 26, 2024
1 parent a97c634 commit 3ec4cb7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions fuel_cells/intelligent_energy_fcm_804_can/firmware.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ local config = require('enapter.ucm.config')

INDEX_CONFIG = 'index'
SAVE_0x400_CONFIG = 'save_0x400'
RL6_CONFIG = 'rl6'

VENDOR = 'Intelligent Energy'
MODEL = 'FCM 804'
Expand All @@ -18,6 +19,7 @@ cd_alerts = nil

can_index = 1
save_0x400 = false
rl6 = nil
messages_0x400 = {}

function main()
Expand All @@ -32,6 +34,7 @@ function main()
config.init({
[INDEX_CONFIG] = { type = 'number', default = 1, required = true },
[SAVE_0x400_CONFIG] = { type = 'boolean', default = false },
[RL6_CONFIG] = {type = 'string'},
}, {
after_write = setup_options,
})
Expand All @@ -47,6 +50,7 @@ end
function setup_options(args)
can_index = args[INDEX_CONFIG]
save_0x400 = args[SAVE_0x400_CONFIG]
rl6 = args[RL6_CONFIG]
configured = true
end

Expand All @@ -57,6 +61,11 @@ function send_properties()
info['serial_number'] = serial_number
is_serial_number_completed = false
end

if rl6 ~= nil and rl6 ~= "" then
info['rl6'] = rl6
end

info['fw_ver'] = fw_ver

enapter.send_properties(info)
Expand Down
7 changes: 7 additions & 0 deletions fuel_cells/intelligent_energy_fcm_804_can/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ properties:
fw_ver:
type: string
display_name: Firmware Version
rl6:
type: string
display_name: Control RL6 UCM ID

telemetry:
status:
Expand Down Expand Up @@ -131,6 +134,10 @@ commands:
display_name: Troubleshooting Mode
description: Save troubleshooting CAN messages (0x400) for further analysis by Intelligent Energy service team.
type: boolean
rl6:
display_name: Enapter RL6 UCM ID Used for Control
description: If you use RL6 UCM for control signals, put it ID in this field for better integration
type: string
read_configuration:
display_name: Read Configuration
group: config
Expand Down

0 comments on commit 3ec4cb7

Please sign in to comment.