From f3bf511e85ad483030851d402c7d8a6b703ac5ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20=C3=96ster?= Date: Sat, 5 Apr 2025 19:03:21 +0300 Subject: [PATCH 1/2] Fix compilation warning from build system --- Software/src/inverter/FERROAMP-CAN.cpp | 4 ++-- Software/src/inverter/PYLON-CAN.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Software/src/inverter/FERROAMP-CAN.cpp b/Software/src/inverter/FERROAMP-CAN.cpp index edcc4815..192e8568 100644 --- a/Software/src/inverter/FERROAMP-CAN.cpp +++ b/Software/src/inverter/FERROAMP-CAN.cpp @@ -34,14 +34,14 @@ CAN_frame PYLON_7320 = { .ext_ID = true, .DLC = 8, .ID = 0x7320, - .data = {TOTAL_CELL_AMOUNT, (uint8_t)(TOTAL_CELL_AMOUNT >> 8), MODULES_IN_SERIES, CELLS_PER_MODULE, VOLTAGE_LEVEL, + .data = {TOTAL_CELL_AMOUNT, (uint8_t)(TOTAL_CELL_AMOUNT >> 8), MODULES_IN_SERIES, CELLS_PER_MODULE, (uint8_t)(VOLTAGE_LEVEL & 0x00FF), (uint8_t)(VOLTAGE_LEVEL >> 8), AH_CAPACITY, (uint8_t)(AH_CAPACITY >> 8)}}; CAN_frame PYLON_7321 = { .FD = false, .ext_ID = true, .DLC = 8, .ID = 0x7321, - .data = {TOTAL_CELL_AMOUNT, (uint8_t)(TOTAL_CELL_AMOUNT >> 8), MODULES_IN_SERIES, CELLS_PER_MODULE, VOLTAGE_LEVEL, + .data = {TOTAL_CELL_AMOUNT, (uint8_t)(TOTAL_CELL_AMOUNT >> 8), MODULES_IN_SERIES, CELLS_PER_MODULE, (uint8_t)(VOLTAGE_LEVEL & 0x00FF), (uint8_t)(VOLTAGE_LEVEL >> 8), AH_CAPACITY, (uint8_t)(AH_CAPACITY >> 8)}}; CAN_frame PYLON_4210 = {.FD = false, .ext_ID = true, diff --git a/Software/src/inverter/PYLON-CAN.cpp b/Software/src/inverter/PYLON-CAN.cpp index c55c737f..35e96a6b 100644 --- a/Software/src/inverter/PYLON-CAN.cpp +++ b/Software/src/inverter/PYLON-CAN.cpp @@ -34,14 +34,14 @@ CAN_frame PYLON_7320 = { .ext_ID = true, .DLC = 8, .ID = 0x7320, - .data = {TOTAL_CELL_AMOUNT, (uint8_t)(TOTAL_CELL_AMOUNT >> 8), MODULES_IN_SERIES, CELLS_PER_MODULE, VOLTAGE_LEVEL, + .data = {TOTAL_CELL_AMOUNT, (uint8_t)(TOTAL_CELL_AMOUNT >> 8), MODULES_IN_SERIES, CELLS_PER_MODULE, (uint8_t)(VOLTAGE_LEVEL & 0x00FF), (uint8_t)(VOLTAGE_LEVEL >> 8), AH_CAPACITY, (uint8_t)(AH_CAPACITY >> 8)}}; CAN_frame PYLON_7321 = { .FD = false, .ext_ID = true, .DLC = 8, .ID = 0x7321, - .data = {TOTAL_CELL_AMOUNT, (uint8_t)(TOTAL_CELL_AMOUNT >> 8), MODULES_IN_SERIES, CELLS_PER_MODULE, VOLTAGE_LEVEL, + .data = {TOTAL_CELL_AMOUNT, (uint8_t)(TOTAL_CELL_AMOUNT >> 8), MODULES_IN_SERIES, CELLS_PER_MODULE, (uint8_t)(VOLTAGE_LEVEL & 0x00FF), (uint8_t)(VOLTAGE_LEVEL >> 8), AH_CAPACITY, (uint8_t)(AH_CAPACITY >> 8)}}; CAN_frame PYLON_4210 = {.FD = false, .ext_ID = true, From fddc3a695256cf1594d3ea04c0ac08dd39c5e53c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 5 Apr 2025 16:05:13 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- Software/src/inverter/FERROAMP-CAN.cpp | 28 +++++++++++++------------- Software/src/inverter/PYLON-CAN.cpp | 28 +++++++++++++------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Software/src/inverter/FERROAMP-CAN.cpp b/Software/src/inverter/FERROAMP-CAN.cpp index 192e8568..eb41f1ac 100644 --- a/Software/src/inverter/FERROAMP-CAN.cpp +++ b/Software/src/inverter/FERROAMP-CAN.cpp @@ -29,20 +29,20 @@ CAN_frame PYLON_7311 = {.FD = false, .DLC = 8, .ID = 0x7311, .data = {0x01, 0x00, 0x02, 0x01, 0x01, 0x02, 0x00, 0x00}}; -CAN_frame PYLON_7320 = { - .FD = false, - .ext_ID = true, - .DLC = 8, - .ID = 0x7320, - .data = {TOTAL_CELL_AMOUNT, (uint8_t)(TOTAL_CELL_AMOUNT >> 8), MODULES_IN_SERIES, CELLS_PER_MODULE, (uint8_t)(VOLTAGE_LEVEL & 0x00FF), - (uint8_t)(VOLTAGE_LEVEL >> 8), AH_CAPACITY, (uint8_t)(AH_CAPACITY >> 8)}}; -CAN_frame PYLON_7321 = { - .FD = false, - .ext_ID = true, - .DLC = 8, - .ID = 0x7321, - .data = {TOTAL_CELL_AMOUNT, (uint8_t)(TOTAL_CELL_AMOUNT >> 8), MODULES_IN_SERIES, CELLS_PER_MODULE, (uint8_t)(VOLTAGE_LEVEL & 0x00FF), - (uint8_t)(VOLTAGE_LEVEL >> 8), AH_CAPACITY, (uint8_t)(AH_CAPACITY >> 8)}}; +CAN_frame PYLON_7320 = {.FD = false, + .ext_ID = true, + .DLC = 8, + .ID = 0x7320, + .data = {TOTAL_CELL_AMOUNT, (uint8_t)(TOTAL_CELL_AMOUNT >> 8), MODULES_IN_SERIES, + CELLS_PER_MODULE, (uint8_t)(VOLTAGE_LEVEL & 0x00FF), (uint8_t)(VOLTAGE_LEVEL >> 8), + AH_CAPACITY, (uint8_t)(AH_CAPACITY >> 8)}}; +CAN_frame PYLON_7321 = {.FD = false, + .ext_ID = true, + .DLC = 8, + .ID = 0x7321, + .data = {TOTAL_CELL_AMOUNT, (uint8_t)(TOTAL_CELL_AMOUNT >> 8), MODULES_IN_SERIES, + CELLS_PER_MODULE, (uint8_t)(VOLTAGE_LEVEL & 0x00FF), (uint8_t)(VOLTAGE_LEVEL >> 8), + AH_CAPACITY, (uint8_t)(AH_CAPACITY >> 8)}}; CAN_frame PYLON_4210 = {.FD = false, .ext_ID = true, .DLC = 8, diff --git a/Software/src/inverter/PYLON-CAN.cpp b/Software/src/inverter/PYLON-CAN.cpp index 35e96a6b..463ee8a9 100644 --- a/Software/src/inverter/PYLON-CAN.cpp +++ b/Software/src/inverter/PYLON-CAN.cpp @@ -29,20 +29,20 @@ CAN_frame PYLON_7311 = {.FD = false, .DLC = 8, .ID = 0x7311, .data = {0x01, 0x00, 0x02, 0x01, 0x01, 0x02, 0x00, 0x00}}; -CAN_frame PYLON_7320 = { - .FD = false, - .ext_ID = true, - .DLC = 8, - .ID = 0x7320, - .data = {TOTAL_CELL_AMOUNT, (uint8_t)(TOTAL_CELL_AMOUNT >> 8), MODULES_IN_SERIES, CELLS_PER_MODULE, (uint8_t)(VOLTAGE_LEVEL & 0x00FF), - (uint8_t)(VOLTAGE_LEVEL >> 8), AH_CAPACITY, (uint8_t)(AH_CAPACITY >> 8)}}; -CAN_frame PYLON_7321 = { - .FD = false, - .ext_ID = true, - .DLC = 8, - .ID = 0x7321, - .data = {TOTAL_CELL_AMOUNT, (uint8_t)(TOTAL_CELL_AMOUNT >> 8), MODULES_IN_SERIES, CELLS_PER_MODULE, (uint8_t)(VOLTAGE_LEVEL & 0x00FF), - (uint8_t)(VOLTAGE_LEVEL >> 8), AH_CAPACITY, (uint8_t)(AH_CAPACITY >> 8)}}; +CAN_frame PYLON_7320 = {.FD = false, + .ext_ID = true, + .DLC = 8, + .ID = 0x7320, + .data = {TOTAL_CELL_AMOUNT, (uint8_t)(TOTAL_CELL_AMOUNT >> 8), MODULES_IN_SERIES, + CELLS_PER_MODULE, (uint8_t)(VOLTAGE_LEVEL & 0x00FF), (uint8_t)(VOLTAGE_LEVEL >> 8), + AH_CAPACITY, (uint8_t)(AH_CAPACITY >> 8)}}; +CAN_frame PYLON_7321 = {.FD = false, + .ext_ID = true, + .DLC = 8, + .ID = 0x7321, + .data = {TOTAL_CELL_AMOUNT, (uint8_t)(TOTAL_CELL_AMOUNT >> 8), MODULES_IN_SERIES, + CELLS_PER_MODULE, (uint8_t)(VOLTAGE_LEVEL & 0x00FF), (uint8_t)(VOLTAGE_LEVEL >> 8), + AH_CAPACITY, (uint8_t)(AH_CAPACITY >> 8)}}; CAN_frame PYLON_4210 = {.FD = false, .ext_ID = true, .DLC = 8,