From 88e9b71b45956969f7032fa201bf662f550b40d3 Mon Sep 17 00:00:00 2001 From: TDHster Date: Sat, 27 Jun 2026 14:00:46 +0800 Subject: [PATCH] fix: use integer division for height_init self.height_init/256 returns float in Python 3, causes TypeError in send_data. Fix: use //256. --- .../python/lib/waveshare_epd/epd3in97g.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/E-paper_Separate_Program/3in97_e-Paper_G/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd3in97g.py b/E-paper_Separate_Program/3in97_e-Paper_G/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd3in97g.py index 7d5f628a..bfad3c38 100644 --- a/E-paper_Separate_Program/3in97_e-Paper_G/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd3in97g.py +++ b/E-paper_Separate_Program/3in97_e-Paper_G/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd3in97g.py @@ -123,7 +123,7 @@ def init(self): self.send_command(0x61) self.send_data(self.width//256) self.send_data(self.width%256) - self.send_data(self.height_init/256) + self.send_data(self.height_init//256) self.send_data(self.height_init%256) self.send_command(0x62) @@ -182,7 +182,7 @@ def init_Fast(self): self.send_command(0x61) self.send_data(self.width//256) self.send_data(self.width%256) - self.send_data(self.height_init/256) + self.send_data(self.height_init//256) self.send_data(self.height_init%256) self.send_command(0x62)