daemin.g not being updated
-
Hello. due3 board, SBC mode with 3.5.4
I have this on my daemon.g
while global.daemonactive if state.status != "processing" if (heat.heaters[0].current > 60) M42 P3 S1 else M42 P3 S0 G4 S2
I have this because in some situations I prefers to set the variable to false and so stop daemon from working instead of renaming the file. Not really much use. But today I edited daemon.g nd I just added an echo command. I saved the file. So I was expecting to see the echo command being executed and the result on the console. It never happened. I went crazu ike for 10 minutes trying to find a typo mistake, or something. The echo command was never being executed. I checked the global variable value and it was ok with a true value.
The echo command was in the else section. The M42P3 S0 was being executed, I know that because that switch turns off and ON a led. If I manually executed the M42 P3 S1 command (with all heater off and coldf) I could see the led being turned on and after 2 secs daemon.g tuned it off. So daemon was working, the if sentence was ok. The echo command was just not being executed.
Then without any modification I restarted the printer. And this time everything worked as expected. I sidenly started to get the echo command results on the console.
So, It looks like the daemon.g is not being updated if you edit the file. Tjhe file is updated, but the daemon alredy on memory still is the old one?
Im doing something wrong to update daemon.g? starting it and stopping it using the variable works ok
-
@Tinchus That's expected. When you upload a new daemon.g, the current daemon.g is moved to daemon.g.bak. My daemon.g looks like this so the new file is automatically restarted when needed:
if fileexists("/sys/daemon.g.bak") M472 P"/sys/daemon.g.bak" while !fileexists("/sys/daemon.g.bak") ...