mirror of
https://github.com/infinition/Bjorn.git
synced 2025-12-06 06:11:46 +00:00
Fixed up some of the weird cases for image loading and modified the install script to include the 2in7 display
This commit is contained in:
@@ -33,6 +33,7 @@ class Display:
|
||||
def __init__(self, shared_data):
|
||||
"""Initialize the display and start the main image and shared data update threads."""
|
||||
self.shared_data = shared_data
|
||||
self.config = self.shared_data.config
|
||||
self.shared_data.bjornstatustext2 = "Awakening..."
|
||||
self.commentaire_ia = Commentaireia()
|
||||
self.semaphore = threading.Semaphore(10)
|
||||
@@ -315,6 +316,10 @@ class Display:
|
||||
draw.text((int(35 * self.scale_factor_x), int(65 * self.scale_factor_y)), self.shared_data.bjornstatustext, font=self.shared_data.font_arial9, fill=0)
|
||||
draw.text((int(35 * self.scale_factor_x), int(75 * self.scale_factor_y)), self.shared_data.bjornstatustext2, font=self.shared_data.font_arial9, fill=0)
|
||||
|
||||
#Gonna just roll with the bmp at the moment for the 2in7 display please replace with a resizable format
|
||||
if (self.config["epd_type"]) == "epd2in7":
|
||||
image.paste(self.shared_data.frise, (int(20 * self.scale_factor_x), int(160 * self.scale_factor_y)))
|
||||
|
||||
image.paste(self.shared_data.frise, (int(0 * self.scale_factor_x), int(160 * self.scale_factor_y)))
|
||||
|
||||
draw.rectangle((1, 1, self.shared_data.width - 1, self.shared_data.height - 1), outline=0)
|
||||
|
||||
@@ -531,6 +531,7 @@ main() {
|
||||
echo "2. epd2in13_V2"
|
||||
echo "3. epd2in13_V3"
|
||||
echo "4. epd2in13_V4"
|
||||
echo "5. epd2in7"
|
||||
|
||||
while true; do
|
||||
read -p "Enter your choice (1-4): " epd_choice
|
||||
@@ -539,6 +540,7 @@ main() {
|
||||
2) EPD_VERSION="epd2in13_V2"; break;;
|
||||
3) EPD_VERSION="epd2in13_V3"; break;;
|
||||
4) EPD_VERSION="epd2in13_V4"; break;;
|
||||
5) EPD_VERSION="epd2in7"; break;;
|
||||
*) echo -e "${RED}Invalid choice. Please select 1-4.${NC}";;
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -179,8 +179,8 @@ class SharedData:
|
||||
self.epd_helper = EPDHelper(self.epd_type)
|
||||
if self.config["epd_type"] == "epd2in7":
|
||||
logger.info("EPD type: epd2in7 screen reversed")
|
||||
# self.screen_reversed = False
|
||||
# self.web_screen_reversed = False
|
||||
self.screen_reversed = False
|
||||
self.web_screen_reversed = False
|
||||
if self.config["epd_type"] == "epd2in13_V2":
|
||||
logger.info("EPD type: epd2in13_V2 screen reversed")
|
||||
self.screen_reversed = False
|
||||
@@ -199,6 +199,7 @@ class SharedData:
|
||||
def initialize_variables(self):
|
||||
"""Initialize the variables."""
|
||||
self.should_exit = False
|
||||
self.web_screen_reversed = False
|
||||
self.screen_reversed = False
|
||||
self.display_should_exit = False
|
||||
self.orchestrator_should_exit = False
|
||||
|
||||
Reference in New Issue
Block a user