@@ -1191,6 +1191,7 @@ def _mcu_identify(self):
11911191 raise error (str (e ))
11921192 if get_danger_options ().log_startup_info :
11931193 logging .info (self ._log_info ())
1194+ pconfig = self ._printer .lookup_object ("configfile" )
11941195 ppins = self ._printer .lookup_object ("pins" )
11951196 pin_resolver = ppins .get_pin_resolver (self ._name )
11961197 for cname , value in self .get_constants ().items ():
@@ -1214,25 +1215,25 @@ def _mcu_identify(self):
12141215 )
12151216 app = msgparser .get_app_info ()
12161217 version , build_versions = msgparser .get_version_info ()
1217- sources = msgparser .get_sources_hash ()
1218+ sources_hash = msgparser .get_sources_hash ()
12181219 self ._get_status_info ["app" ] = app
12191220 self ._get_status_info ["mcu_version" ] = version
12201221 self ._get_status_info ["mcu_build_versions" ] = build_versions
1221- self ._get_status_info ["mcu_sources " ] = sources
1222+ self ._get_status_info ["mcu_sources_hash " ] = sources_hash
12221223 self ._get_status_info ["mcu_constants" ] = msgparser .get_constants ()
12231224 if app in ("Klipper" , "Danger-Klipper" ):
1224- pconfig = self ._printer .lookup_object ("configfile" )
12251225 pconfig .runtime_warning (
12261226 f"MCU { self ._name !r} currently has firmware compiled for { app } (version { version } )."
12271227 f" It is recommended to re-flash for best compatiblity with Kalico"
12281228 )
12291229 elif (
12301230 get_danger_options ().warn_on_mismatched_firmware_sources
1231- and sources != self ._printer .get_start_args ().get ("sources_hash" )
1231+ and sources_hash
1232+ != self ._printer .get_start_args ().get ("sources_hash" )
12321233 ):
1233- pconfig = self ._printer .lookup_object ("configfile" )
12341234 pconfig .runtime_warning (
1235- f"MCU { self ._name !r} firmware is out of date, it will still work but an update is recommended"
1235+ f"MCU { self ._name !r} firmware is out of date and may not function as intended."
1236+ f" Please re-flash as soon as possible"
12361237 )
12371238 self .register_response (self ._handle_shutdown , "shutdown" )
12381239 self .register_response (self ._handle_shutdown , "is_shutdown" )
0 commit comments