Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lely_core_libraries/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ExternalProject_Add(upstr_lely_core_libraries # Name for custom target
UPDATE_COMMAND
COMMAND git reset --hard
COMMAND git apply --whitespace=fix --reject ${CMAKE_CURRENT_SOURCE_DIR}/patches/0001-Fix-dcf-tools.patch
COMMAND git apply --whitespace=fix --reject ${CMAKE_CURRENT_SOURCE_DIR}/patches/0002-Allow-base16-values-for-SupportedObjects.patch
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a comment above with the lely MR link. That way it's more clear when this patch can be cleaned up again.

#CONFIGURE step execute autoreconf and configure
CONFIGURE_COMMAND autoreconf -i <SOURCE_DIR>
COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --disable-cython --disable-doc --disable-tests --disable-static --disable-diag
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
From 6e3fd39874a2e486b6725d824bf54210ec69864d Mon Sep 17 00:00:00 2001
From: Alex Roy <[email protected]>
Date: Wed, 18 Jun 2025 23:05:20 +0100
Subject: [PATCH] Allow base16 values for SupportedObjects

---
python/dcf-tools/dcf/device.py | 2 +-
python/dcf-tools/dcf/lint.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/python/dcf-tools/dcf/device.py b/python/dcf-tools/dcf/device.py
index 4648b2b9..7620e0f5 100644
--- a/python/dcf-tools/dcf/device.py
+++ b/python/dcf-tools/dcf/device.py
@@ -25,7 +25,7 @@ class Device(dict):
)

for section in {"MandatoryObjects", "OptionalObjects", "ManufacturerObjects"}:
- for i in range(int(self.cfg[section]["SupportedObjects"], 10)):
+ for i in range(int(self.cfg[section]["SupportedObjects"], 0)):
index = int(self.cfg[section][str(i + 1)], 0)
self[index] = Object(self.cfg, index, self.env)

diff --git a/python/dcf-tools/dcf/lint.py b/python/dcf-tools/dcf/lint.py
index 48916603..b33e38d7 100644
--- a/python/dcf-tools/dcf/lint.py
+++ b/python/dcf-tools/dcf/lint.py
@@ -137,7 +137,7 @@ def __parse_objects(cfg: dict, section: str) -> bool:
for entry in cfg[section]:
if entry.lower() == "SupportedObjects".lower():
try:
- supported_objects = int(cfg[section][entry], 10)
+ supported_objects = int(cfg[section][entry], 0)
except ValueError:
warnings.warn(
"invalid value for SupportedObjects in [{}]: {}".format(
--
2.34.1