From c103d415516a4418f6ec644f9ab9187bdb7cecac Mon Sep 17 00:00:00 2001 From: "Nikolay V. Krasko" Date: Tue, 26 Nov 2024 13:16:39 +0200 Subject: [PATCH] fixing linter's requirements --- fuel_cells/intelligent_energy_fcm_804_can/firmware.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/fuel_cells/intelligent_energy_fcm_804_can/firmware.lua b/fuel_cells/intelligent_energy_fcm_804_can/firmware.lua index fada636a..22d4b01a 100644 --- a/fuel_cells/intelligent_energy_fcm_804_can/firmware.lua +++ b/fuel_cells/intelligent_energy_fcm_804_can/firmware.lua @@ -34,7 +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'}, + [RL6_CONFIG] = { type = 'string' }, }, { after_write = setup_options, }) @@ -62,7 +62,7 @@ function send_properties() is_serial_number_completed = false end - if rl6 ~= nil and rl6 ~= "" then + if rl6 ~= nil and rl6 ~= '' then info['rl6'] = rl6 end @@ -82,8 +82,7 @@ function send_telemetry() local str_0x400 for _, data in pairs(messages_0x400) do str_0x400 = str_0x400 or '' - local str_0x400_part = - string.format('%02x%02x%02x%02x%02x%02x%02x%02x', string.unpack('I1I1I1I1I1I1I1I1', data)) + local str_0x400_part = string.format('%02x%02x%02x%02x%02x%02x%02x%02x', string.unpack('I1I1I1I1I1I1I1I1', data)) str_0x400 = str_0x400 .. ' ' .. str_0x400_part end telemetry['messages_0x400'] = str_0x400 @@ -114,8 +113,7 @@ function can_handler(msg_id, data) if not is_serial_number_completed then if string.byte(data, 1) > 127 then if #temp_serial_number == 8 then - local serial_number_part = - string.char(string.byte(data, 1, 1) - 128, string.byte(data, 2, 8)) + local serial_number_part = string.char(string.byte(data, 1, 1) - 128, string.byte(data, 2, 8)) temp_serial_number = temp_serial_number .. serial_number_part serial_number = temp_serial_number is_serial_number_completed = true