@@ -83,14 +83,14 @@ def get_time_phase(self):
8383 """Calcola la fase attuale basata sull'orologio di sistema e imposta la probabilità di sosta."""
8484 hour = datetime .now ().hour
8585 if 8 <= hour < 14 :
86- return "PICCO MATTUTINO" , 85 # Molte auto in entrata
87- elif 14 <= hour < 16 :
88- return "TRAFFICO POMERIDIANO" , 55 # Situazione stabile
89- elif 16 <= hour < 19 :
90- return "DEFLUSSO POMERIDIANO" , 25 # Le auto iniziano a uscire
91- elif 19 <= hour < 22 :
92- return "SVUOTAMENTO SERALE" , 10 # Parcheggi quasi deserti
93- return "FASCIA NOTTURNA" , 2 # Nessuna attività
86+ return "PICCO MATTUTINO" , 85
87+ if 14 <= hour < 16 :
88+ return "TRAFFICO POMERIDIANO" , 55
89+ if 16 <= hour < 19 :
90+ return "DEFLUSSO POMERIDIANO" , 25
91+ if 19 <= hour < 22 :
92+ return "SVUOTAMENTO SERALE" , 10
93+ return "FASCIA NOTTURNA" , 2
9494
9595 def set_theme_colors (self ):
9696 """Palette colori centrale dell'applicazione per facilitare future modifiche al tema."""
@@ -224,16 +224,8 @@ def setup_main_layout(self):
224224 self .canvas .create_image (
225225 0 , 0 , anchor = "nw" , image = self .bg_img , tags = "static_map"
226226 )
227- except Exception as e :
228- # pylint: disable=broad-exception-caught
229- self .canvas .create_text (
230- 400 ,
231- 300 ,
232- text = "Mappa non trovata ('mappa.png')" ,
233- font = ("Consolas" , 14 , "bold" ),
234- fill = self .colors ["accent_red" ],
235- tags = "static_map" ,
236- )
227+ except Exception : # pylint: disable=broad-exception-caught
228+ self .canvas .create_text (400 , 300 , text = "Mappa non trovata ('mappa.png')" , font = ("Consolas" , 14 , "bold" ), fill = self .colors ["accent_red" ], tags = "static_map" )
237229
238230 # --- PANNELLO DASHBOARD (Destra) ---
239231 dashboard_panel = tk .Frame (main_container , bg = self .colors ["bg_app" ], width = 460 )
0 commit comments