Skip to content

Commit 9b6405d

Browse files
committed
250527.1
1 parent da345fb commit 9b6405d

File tree

6 files changed

+13
-14
lines changed

6 files changed

+13
-14
lines changed
Binary file not shown.

easycoder/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
from .ec_timestamp import *
1010
from .ec_value import *
1111

12-
__version__ = "250522.1"
12+
__version__ = "250527.1"

easycoder/ec_core.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,6 +1995,9 @@ def compileValue(self):
19951995
value['command'] = self.nextValue()
19961996
return value
19971997

1998+
if token == 'ticker':
1999+
return value
2000+
19982001
return None
19992002

20002003
#############################################################################
@@ -2387,6 +2390,12 @@ def v_tan(self, v):
23872390
value['content'] = round(math.tan(angle * 0.01745329) * radius)
23882391
return value
23892392

2393+
def v_ticker(self, v):
2394+
value = {}
2395+
value['type'] = 'int'
2396+
value['content'] = self.program.ticker
2397+
return value
2398+
23902399
def v_timestamp(self, v):
23912400
value = {}
23922401
value['type'] = 'int'

easycoder/ec_program.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def __init__(self, argv):
4949
self.graphics = None
5050
self.processClasses()
5151
self.externalControl = False
52+
self.ticker = 0
5253
self.running = True
5354

5455
def start(self, parent=None, module = None, exports=[]):
@@ -288,7 +289,9 @@ def releaseParent(self):
288289
self.parent.waiting = False
289290
self.parent.program.run(self.parent.pc)
290291

292+
# This is called at 10msec intervals by the GUI code
291293
def flushCB(self):
294+
self.ticker += 1
292295
flush()
293296

294297
# Flush the queue

easycoder/ec_pyside.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,16 +1049,3 @@ def compileCondition(self):
10491049
def force_exit(self):
10501050
QApplication.quit() # Gracefully close the application
10511051
sys.exit(0) # Force a complete system exit
1052-
1053-
1054-
def addIconToLayout(layout, icon_path):
1055-
"""
1056-
Adds an icon to the specified layout.
1057-
1058-
:param layout: The layout to which the icon will be added.
1059-
:param icon_path: The file path of the icon image.
1060-
"""
1061-
icon_label = QLabel()
1062-
pixmap = QPixmap(icon_path)
1063-
icon_label.setPixmap(pixmap)
1064-
layout.addWidget(icon_label)

0 commit comments

Comments
 (0)