File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,20 @@ class DemoBoard:
4949
5050
5151 '''
52+
53+ _DemoBoardSingleton_Instance = None
54+
55+ @classmethod
56+ def get (cls ):
57+ if cls ._DemoBoardSingleton_Instance is None :
58+ cls ._DemoBoardSingleton_Instance = cls ()
59+
60+ return cls ._DemoBoardSingleton_Instance
61+
62+
63+
64+
65+
5266 def __init__ (self ,
5367 mode :int = None ,
5468 iniFile :str = 'config.ini' ,
@@ -102,6 +116,10 @@ def __init__(self,
102116 self .shuttle .get (self .user_config .default_project ).enable ()
103117 else :
104118 log .warn (f'Default project is unknown "{ self .user_config .default_project } "' )
119+
120+ if DemoBoard ._DemoBoardSingleton_Instance is None :
121+ DemoBoard ._DemoBoardSingleton_Instance = self
122+
105123
106124 @property
107125 def mode (self ):
You can’t perform that action at this time.
0 commit comments