Skip to content

Commit

Permalink
13/03/2021 18:50:12
Browse files Browse the repository at this point in the history
  • Loading branch information
epeios-q37 committed Mar 13, 2021
1 parent b35729f commit 26d2ac0
Show file tree
Hide file tree
Showing 20 changed files with 1,492 additions and 1,926 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -141,7 +141,7 @@ You can also directly launch, from within the `examples` directory, `python <Nam

The *Stars* application is an example where the *Atlas* *toolkit* is used to control a [*Pygame*](https://en.wikipedia.org/wiki/Pygame) based application. Of course, *Pygame* needs to be installed.

The `tutorials` directory is a work under progress and will contain some tutorials about the *Atlas* *toolkit*.
The `tutorials` directory contains some [*Jupyter* notebooks](https://en.wikipedia.org/wiki/Project_Jupyter#Jupyter_Notebook) about the *Atlas* *toolkit*.

## *Raspberry Pi*/*ODROID-C2*

Expand Down
27 changes: 16 additions & 11 deletions atlastk/Atlas.py
Expand Up @@ -159,27 +159,32 @@ def setJupyterHeight(height):

_jupyterHeight = height

def terminate():
global _thread

if _thread != None:
XDHq.setBye(True)
_thread.join()
XDHq.setBye(False)
_thread = None


def _launch(callbacks, userCallback, headContent):
try:
XDHq.launch(_callback,userCallback,callbacks,headContent)
except socket.timeout:
pass

def launch(callbacks, userCallback = None, headContent = ""):
def launch(callbacks, userCallback = None, headContent = None):
if _is_jupyter():
global _intraLock, _thread

if _thread != None:
XDHq.setBye(True)
_thread.join()
XDHq.setBye(False)

terminate()

_intraLock.acquire()
newThread = Thread(target=_launch, args=(callbacks, userCallback, headContent))
newThread.daemon = True
newThread.start()

_thread = newThread
_thread = Thread(target=_launch, args=(callbacks, userCallback, headContent))
_thread.daemon = True
_thread.start()

_intraLock.acquire()

Expand Down
2 changes: 1 addition & 1 deletion atlastk/README.md
Expand Up @@ -141,7 +141,7 @@ You can also directly launch, from within the `examples` directory, `python <Nam

The *Stars* application is an example where the *Atlas* *toolkit* is used to control a [*Pygame*](https://en.wikipedia.org/wiki/Pygame) based application. Of course, *Pygame* needs to be installed.

The `tutorials` directory is a work under progress and will contain some tutorials about the *Atlas* *toolkit*.
The `tutorials` directory contains some [*Jupyter* notebooks](https://en.wikipedia.org/wiki/Project_Jupyter#Jupyter_Notebook) about the *Atlas* *toolkit*.

## *Raspberry Pi*/*ODROID-C2*

Expand Down
8 changes: 6 additions & 2 deletions atlastk/XDHqFaaS.py
Expand Up @@ -276,8 +276,12 @@ def _serve(callback,userCallback,callbacks ):
def launch(callback, userCallback,callbacks,headContent):
global _headContent, _instances

_headContent = headContent

if headContent == None:
if not "_headContent" in globals():
_headContent = ""
else:
_headContent = headContent

_instances = {}

_init()
Expand Down
2 changes: 1 addition & 1 deletion main.py
Expand Up @@ -30,7 +30,7 @@
"ReversiXSL",
"Widgets",
"Chatrooms",
("Contacts", 8),
# ("Contacts", 8),
"MatPlotLib"
)

Expand Down

0 comments on commit 26d2ac0

Please sign in to comment.