Skip to content

Commit

Permalink
display move 함수 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
boobooboo2 committed Dec 24, 2024
1 parent 1b06ba0 commit ad29db0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 37 deletions.
26 changes: 4 additions & 22 deletions modi_plus/module/output_module/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ def write_variable_xy(self, x: int, y: int, variable: float) -> None:
self._id,
Display.PROPERTY_DISPLAY_WRITE_VARIABLE,
property_values=(("u8", x),
("u8", y),
("float", variable), )
("u8", y),
("float", variable), )
)
self._text += str(variable)
time.sleep(0.01)
Expand All @@ -250,8 +250,8 @@ def write_variable_line(self, line: int, variable: float) -> None:
self._id,
Display.PROPERTY_DISPLAY_WRITE_VARIABLE,
property_values=(("u8", 0),
("u8", line * 20),
("float", variable), )
("u8", line * 20),
("float", variable), )
)
self._text += str(variable)
time.sleep(0.01)
Expand Down Expand Up @@ -326,24 +326,6 @@ def set_offset(self, x: int, y: int) -> None:
)
time.sleep(0.01)

def move_screen(self, x: int, y: int) -> None:
"""Move the screen by x and y
:param x: X-axis movement value
:type x: int
:param y: Y-axis movement value
:type y: int
:return: None
"""

self._set_property(
self.id,
Display.PROPERTY_DISPLAY_MOVE_SCREEN,
property_values=(("s8", x), ("s8", y), ),
force=True
)
time.sleep(0.01)

def reset(self, mode=0) -> None:
"""Clear the screen.
Expand Down
15 changes: 0 additions & 15 deletions tests/module/output_module/test_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,21 +132,6 @@ def test_set_offset(self):
sent_messages.append(self.connection.send_list.pop())
self.assertTrue(set_message in sent_messages)

def test_move_screen(self):
"""Test move_screen method."""

mock_x = 10
mock_y = 20
self.display.move_screen(mock_x, mock_y)
set_message = parse_set_property_message(
-1, Display.PROPERTY_DISPLAY_MOVE_SCREEN,
(("s8", mock_x), ("s8", mock_y), )
)
sent_messages = []
while self.connection.send_list:
sent_messages.append(self.connection.send_list.pop())
self.assertTrue(set_message in sent_messages)

def test_reset(self):
"""Test reset method."""

Expand Down

0 comments on commit ad29db0

Please sign in to comment.