2019-09-24, 08:31 AM
(2019-09-23, 05:44 PM)Sailoog Wrote:(2019-09-23, 05:26 PM)glowntiger Wrote:(2019-09-23, 04:34 PM)Sailoog Wrote: - when you install any app from openplotter-settings, postinstall.py file is executed after the app package installation. If you are developing, you have to install your app for testing using "sudo python3 setup.py install" and then you have to run manually the postinstall script just typing "myappPostInstall"
- startup.py files have 2 functions: "start" and "check". On system start all startup.py files of all apps are called and "start" functions are executed, then "check" functions are executed. When you click on "check system" in openplotter-settings all startups.py files of all apps are called too but only "check" functions are executed.
Is there a possibility to start the script in development? There is no entry point for the Script in Setup.py. I think I cannot start this via "sudo python Startup.py"?
- I do not understand this question: "The inputs can define in your part?" The GPIO Inputs. If I understand it right with your app you can handle the state of any gpio Input?
O.K. I delete all I have done for mcp2515 in my scripts…
Yes, download openplotter-settings from github and add:
Code:startup = False
try:
from openplotterMyapp import startup
except:pass
if startup: self.processApp(startup)
in "starting" function in openplotterSettings/startup.py and install it with "sudo python3 setup.py install"
After installing you have to run "openplotter-startup start" or "openplotter-startup check" and your startup.py script in openplotter-myapp will be called and executed.
Handling GPIO states will be done by openplotter-actions app and you will be able to use states as trigger or actions. I guess you are thinking about your auto-shutdown feature, aren't you?
works fine....