Skip to content

Commit

Permalink
[Rotation Filter][Added] More debug for level 2+
Browse files Browse the repository at this point in the history
The list of offsets and rotations after processing all
  • Loading branch information
set-soft committed Jan 22, 2024
1 parent bac3c8c commit 122cc94
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions kibot/fil_rot_footprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ def __init__(self, regex=None, angle=None, offset_x=None, offset_y=None):
if offset_y is not None:
self.offset_y = offset_y

def __str__(self):
res = f'{self.field} matches {self.regex} =>'
if self.apply_angle:
res += f' rotate {self.angle}'
if self.apply_offset:
res += f' move {self.offset_x},{self.offset_y}'
return res

def config(self, parent):
super().config(parent)
if not self.field:
Expand Down Expand Up @@ -177,6 +185,13 @@ def config(self, parent):
self._offset.append(Regex(regex=compile(regex_str), offset_x=offset[0], offset_y=offset[1]))
if not self._rot and not self._offset:
raise KiPlotConfigurationError("No rotations and/or offsets provided")
if GS.debug_level > 2:
logger.debug('Final rotations list:')
for r in self._rot:
logger.debug(r)
logger.debug('Final offsets list:')
for r in self._offset:
logger.debug(r)
self.rot_fields = self.force_list(self.rot_fields, default=DEFAULT_ROT_FIELDS)
self.offset_fields = self.force_list(self.offset_fields, default=DEFAULT_OFFSET_FIELDS)

Expand Down

0 comments on commit 122cc94

Please sign in to comment.