Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
766 commits
Select commit Hold shift + click to select a range
0fdc6da
Change feather.js link to https://feathericons.com/
gb0101010101 Jan 16, 2020
4efad52
Change Faether.js link to https://feathericons.com/
gb0101010101 Jan 16, 2020
a95ebca
uptick version
madgrizzle Jan 16, 2020
52b90c8
Merge pull request #62 from gb0101010101/master
madgrizzle Jan 16, 2020
c872e17
Update README.md
madgrizzle Jan 16, 2020
5bde88c
Desktop UI fixes and improvements: Add feather icons, fix alignment o…
gb0101010101 Jan 16, 2020
407559f
Mobile UI improvements: Remove extra closing div from EOF, remove ext…
gb0101010101 Jan 16, 2020
7500e77
Hide 'Web Control' text from navbar so that all elements fit on one l…
gb0101010101 Jan 16, 2020
82d6d79
Merge branch 'master' into gb0101010101-ui-improvements
gb0101010101 Jan 16, 2020
82d624c
wiiPendantThread updated with button mode
Orob-Maslow Jan 16, 2020
306f9da
Update gpioActions.py
Orob-Maslow Jan 16, 2020
aa949e3
changed wiiPendantPresent check
Orob-Maslow Jan 17, 2020
3c96c77
Merge branch 'no-opencv' into wii2
Orob-Maslow Jan 17, 2020
97be016
Merge branch 'wiiPendant' into wii2
Orob-Maslow Jan 17, 2020
6b52c5e
putting thread in one file wiiPendant.py
Orob-Maslow Jan 17, 2020
ea8a6e7
Update wiiPendant.py
Orob-Maslow Jan 18, 2020
ccbf162
Update README.md
madgrizzle Jan 18, 2020
2523b0b
Update README.md
madgrizzle Jan 18, 2020
83154aa
Update README.md
madgrizzle Jan 18, 2020
7298b94
work on help
madgrizzle Jan 18, 2020
62ad7a9
Merge remote-tracking branch 'origin/master'
madgrizzle Jan 18, 2020
3ab675c
Merge pull request #66 from gb0101010101/gb0101010101-ui-improvements
madgrizzle Jan 18, 2020
6c3e378
Update README.md
madgrizzle Jan 18, 2020
e6e7a28
Update README.md
madgrizzle Jan 18, 2020
830f415
work on help
madgrizzle Jan 18, 2020
6a684a7
Merge remote-tracking branch 'origin/master'
madgrizzle Jan 18, 2020
694a634
Fix distToMove input validation to force positive number with maximum…
gb0101010101 Jan 19, 2020
5ae4f86
Add inputmode to force numeric popup keyboard which works on most mob…
gb0101010101 Jan 19, 2020
7d4b7c0
thread integrated in wiipendant.py
Orob-Maslow Jan 20, 2020
6525d58
Make Play, Pause/Resume, and Stop buttons sticky (always visisble) be…
gb0101010101 Jan 20, 2020
7f004a7
Add CSS to make it work across all possible browsers.
gb0101010101 Jan 20, 2020
e2f3408
removed GPIO LED because of errors... testing threaded function rathe…
Orob-Maslow Jan 20, 2020
a279cb3
Merge pull request #75 from gb0101010101/gb0101010101-sticky-buttons
madgrizzle Jan 20, 2020
a5c4211
Merge pull request #74 from gb0101010101/gb0101010101-distance-input-…
madgrizzle Jan 20, 2020
1f4fe26
Update README.md
madgrizzle Jan 20, 2020
da068dc
Update index.md
madgrizzle Jan 20, 2020
fcadf0a
fixed @amantalion's discovered glitch
madgrizzle Jan 21, 2020
bdcd549
Merge remote-tracking branch 'origin/master'
madgrizzle Jan 21, 2020
98361ad
uptick version
madgrizzle Jan 21, 2020
e571e8e
Merge branch 'master' of https://github.com/madgrizzle/WebControl
madgrizzle Jan 21, 2020
56c6e3b
updates
madgrizzle Jan 21, 2020
d7edfa6
updates
madgrizzle Jan 21, 2020
2cb870a
updates
madgrizzle Jan 21, 2020
333798a
updates
madgrizzle Jan 21, 2020
4053bc9
updates
madgrizzle Jan 21, 2020
3987b70
breakup G90/G91 onto separate queue entries
madgrizzle Jan 21, 2020
15daf8b
cleanup
madgrizzle Jan 21, 2020
a5bf30a
cleanup
madgrizzle Jan 21, 2020
eacf8a1
use rfind
madgrizzle Jan 21, 2020
63dc39d
use rfind
madgrizzle Jan 21, 2020
b4324c9
more work on pause/positioning
madgrizzle Jan 21, 2020
0bd9aaf
typo
madgrizzle Jan 21, 2020
3adf16e
another fix..
madgrizzle Jan 21, 2020
75143c4
disable actions while paused
madgrizzle Jan 21, 2020
70513cd
remove uploadFlagStatus check in health
madgrizzle Jan 21, 2020
767e276
remove uploadFlagStatus check in health
madgrizzle Jan 21, 2020
cc92dc1
remove uploadFlagStatus check in health
madgrizzle Jan 21, 2020
0ebf9fd
tweaks.. mobile
madgrizzle Jan 21, 2020
051bf61
mobile fixes
madgrizzle Jan 21, 2020
a3a2a5e
Positioning mode tracking: Add comments to describe states, Save paus…
gb0101010101 Jan 22, 2020
e0bfb95
fix
madgrizzle Jan 22, 2020
26c6e74
Positioning mode tracking: Save pausedPositioningMode when tool chang…
gb0101010101 Jan 23, 2020
71874fd
Positioning mode tracking: Restore Units, Z Height, and Positioning m…
gb0101010101 Jan 23, 2020
362d6b1
Merge branch 'test1' into gb0101010101-position-mode
madgrizzle Jan 23, 2020
2d4b75e
Merge pull request #84 from gb0101010101/gb0101010101-position-mode
madgrizzle Jan 23, 2020
f0f8e02
Rearrange resumeRun changes from gb01010101
madgrizzle Jan 23, 2020
2fe0726
fix tool change.. seems to work in both buffer and nonbuffer now
madgrizzle Jan 24, 2020
f155f3b
Make all mobile menu items collapse the menu when clicked.
gb0101010101 Jan 25, 2020
95423cc
fix import of gc.ini bools
madgrizzle Jan 27, 2020
cd4f477
fix incremental mode within gcode with home offsets
madgrizzle Jan 27, 2020
7245f06
start of fix of rest of numeric entries
madgrizzle Jan 27, 2020
2f3243d
fix input glitch
madgrizzle Jan 28, 2020
fe14cbe
Merge pull request #92 from madgrizzle/test1
madgrizzle Jan 28, 2020
7dce481
uptick version
madgrizzle Jan 28, 2020
2a19f6c
Update wiiPendant.py
Orob-Maslow Feb 6, 2020
88aaeb0
Release Manager: Put everything in TRY block to catch exception when …
Feb 8, 2020
76b0e0e
added button service
Orob-Maslow Feb 9, 2020
4eacd91
update wiiflag
Orob-Maslow Feb 9, 2020
f39c480
gb0101010101-macro-titles: Display custom macro titles truncated to 6…
Feb 10, 2020
02011e2
gb0101010101-gcode-editor: Strip trailing whitespace to stop new line…
Feb 10, 2020
ec7777b
buttons and LEDs functional
Orob-Maslow Feb 13, 2020
9ef304d
GPIO from remote process with input via web socket
Orob-Maslow Feb 14, 2020
c4505fc
updating
Orob-Maslow Feb 14, 2020
b0f5d8c
Create MaslowButtons.service
Orob-Maslow Feb 14, 2020
5738c66
Recipe for PIBakery Install
madgrizzle Feb 14, 2020
dc12a84
fix M0/1 pause, perhaps..
madgrizzle Feb 14, 2020
2f94f48
Merge pull request #97 from gb0101010101/gb0101010101-macro-titles
madgrizzle Feb 18, 2020
bac373a
Merge pull request #98 from gb0101010101/gb0101010101-gcode-editor
madgrizzle Feb 18, 2020
7f72a45
Merge pull request #95 from gb0101010101/gb0101010101-release-manager
madgrizzle Feb 18, 2020
2e9bf7b
Merge pull request #88 from gb0101010101/gb0101010101-mobile-navbar-c…
madgrizzle Feb 18, 2020
50a3137
update z-axis pause tracking, add reset home to center, make home ret…
madgrizzle Feb 18, 2020
d77727e
reset pause on stop
madgrizzle Feb 18, 2020
802e427
take out tracking of zunits
madgrizzle Feb 18, 2020
f232aa3
fix tracking of paused units during M commands
madgrizzle Feb 18, 2020
e2a6e18
fix M0x and Mx
madgrizzle Feb 18, 2020
ce4842a
fix m6
madgrizzle Feb 18, 2020
39462c8
maybe fix ; comments, maybe break it worse..
madgrizzle Feb 18, 2020
4bbbed0
changes from upstream fork
Orob-Maslow Feb 19, 2020
e32bcf4
documented the pwiid controller layout
Orob-Maslow Feb 19, 2020
d596970
Merge branch 'GPIO-Service' into wii2
Orob-Maslow Feb 19, 2020
9831b2e
commented out gpioactions assignment line
Orob-Maslow Feb 19, 2020
1a4b339
fix javascript crash
madgrizzle Feb 19, 2020
89518ba
uptick version
madgrizzle Feb 19, 2020
b52dd38
force recompile
madgrizzle Feb 19, 2020
0536b2f
update version to load javascript
madgrizzle Feb 19, 2020
e86d6e0
update version to load javascript
madgrizzle Feb 19, 2020
42fb01b
uptick version
madgrizzle Feb 19, 2020
ba834aa
reverting gpioActions.py
Orob-Maslow Feb 20, 2020
cd67ed7
updating gpio get request to push jsonify list of buttons and pins to…
Orob-Maslow Feb 20, 2020
16821bd
update pause
madgrizzle Feb 20, 2020
7c3454b
version uptick
madgrizzle Feb 20, 2020
614443e
pause button fix on refresh
madgrizzle Feb 20, 2020
5a58b3c
webcontrol GPIO data configs buttons process
Orob-Maslow Feb 21, 2020
35c4643
force rebuild
madgrizzle Feb 21, 2020
021e994
force rebuild and reload of browser
madgrizzle Feb 21, 2020
85397df
Button, LED, Pendant Integration
Orob-Maslow Feb 22, 2020
2930837
default positioning to G90
madgrizzle Feb 22, 2020
f40f912
uptick version
madgrizzle Feb 22, 2020
e81d2ef
fix units on board manager
madgrizzle Feb 22, 2020
3549513
testing iterations for pendant and buttons
Orob-Maslow Feb 22, 2020
532f301
Pendant update
Orob-Maslow Feb 22, 2020
8f7b84b
updated connection timing for wiimote pendant
Orob-Maslow Feb 23, 2020
7523491
add mobile template for release manager
madgrizzle Feb 23, 2020
33d7de8
Update MaslowButton.service
Orob-Maslow Feb 23, 2020
8e0b8c1
Z axis move LED indication
Orob-Maslow Feb 23, 2020
7936f34
uptic version
Orob-Maslow Feb 23, 2020
81c691c
Merge remote-tracking branch 'upstream/master' into wii2
Orob-Maslow Feb 23, 2020
9dba22a
minor tweaks for functionality
Orob-Maslow Feb 24, 2020
114e67f
GPIOButtonService flag
Orob-Maslow Feb 25, 2020
490dea3
requirements instructions for libraries
Orob-Maslow Feb 25, 2020
64a0a38
Update readme.rm
Orob-Maslow Feb 25, 2020
cb4d004
Update readme.rm
Orob-Maslow Feb 25, 2020
274f5e0
cli text interface
Orob-Maslow Feb 26, 2020
5066b9d
sled and home positions sent to button service
Orob-Maslow Feb 27, 2020
9d0804c
possible breaking changes related to javascript. I broke the frontpa…
madgrizzle Feb 27, 2020
8a14b6a
Small tweak to css to shorten up the height of the controller message…
madgrizzle Feb 27, 2020
aa5a4ea
uptick version
madgrizzle Feb 27, 2020
07065e8
gb0101010101-z-axis-disabled-fix: Do not restore paused settings when…
Feb 27, 2020
ac9a61c
gb0101010101-z-axis-disabled-fix: Remove imports of numpy which someh…
Feb 27, 2020
30fd12c
Merge pull request #107 from gb0101010101/gb0101010101-z-axis-disable…
madgrizzle Feb 27, 2020
1501a28
set z target to current zpos upon starting run (review comments in st…
madgrizzle Feb 27, 2020
cac4c91
Merge remote-tracking branch 'origin/master'
madgrizzle Feb 27, 2020
f6812e8
Update holey calibration and triangular calibration to put accept on
madgrizzle Feb 27, 2020
215e49f
Update gpioActions.py
Orob-Maslow Feb 28, 2020
abb1b44
cli display on local rpi display
Orob-Maslow Feb 29, 2020
2c4beb5
MaslowButton indent error fix
Orob-Maslow Feb 29, 2020
2a6a066
updated display
Orob-Maslow Mar 1, 2020
f0b4621
convert to inches for Bound-box from sled
Orob-Maslow Mar 1, 2020
5337717
decimal precision in cli display
Orob-Maslow Mar 1, 2020
b6eb0f6
Update gcodeFile.py
Orob-Maslow Mar 1, 2020
0422622
Update .gitignore
Orob-Maslow Mar 1, 2020
ae43036
Merge remote-tracking branch 'upstream/master'
Orob-Maslow Mar 1, 2020
32957d8
Merge branch 'wii3'
Orob-Maslow Mar 1, 2020
b153743
gb0101010101-z-axis-ui: Add 'goto zero' and 'goto safe' buttons with …
Mar 2, 2020
0ca00fa
Fixed moveline string format issue based on python interpreter version
Orob-Maslow Mar 4, 2020
017698d
Update gcodeFile.py
Orob-Maslow Mar 5, 2020
5256166
updated gcodeFile to avoid %-strings (allow compatibility with python…
madgrizzle Mar 5, 2020
817d343
corrected resizing of screen to avoid use of innerwidth/innerheight (…
madgrizzle Mar 5, 2020
25d618f
Merge branch 'master' of https://github.com/madgrizzle/WebControl
madgrizzle Mar 5, 2020
720c50b
rpi display for gcode position
Orob-Maslow Mar 6, 2020
4fc4b5f
updated max and min to include Z axis
Orob-Maslow Mar 6, 2020
66b3cab
first push for gcode optimization. Not sure its actually optimizing.
madgrizzle Mar 6, 2020
192d9c3
Merge branch 'master' of https://github.com/madgrizzle/WebControl
madgrizzle Mar 7, 2020
5129ca6
added comments
Orob-Maslow Mar 8, 2020
0a1ee59
gcodeOptimizer
madgrizzle Mar 11, 2020
856a839
tool change support
madgrizzle Mar 11, 2020
dfa64ec
Rewrite actions to remove huge if->elif block at top of class to grou…
gb0101010101 Mar 11, 2020
7d1efcd
update on 3d display.. shows tool change locations and spindle start/…
madgrizzle Mar 12, 2020
30c832f
update on 3d display.. shows tool change locations and spindle start/…
madgrizzle Mar 13, 2020
0c0f416
Remove unused functions move() and moveZ() which have been replaced w…
gb0101010101 Mar 14, 2020
f40828e
Backup Webcontrol: Change datestamp format to make more legible, remo…
gb0101010101 Mar 16, 2020
9e91be1
Restore WebControl Backup: Pass '.zip' mimetype to importFile.html te…
gb0101010101 Mar 16, 2020
62de3ca
Import GroundControl.ini: Restrict file selection to *.ini files.
gb0101010101 Mar 16, 2020
82e8d57
logger.py -> deleteLogFiles() iterateates from 0 -> 1000 for no reaso…
gb0101010101 Mar 16, 2020
fbcf5ef
Import WebControl.json: Use title case for 'WebControl'. Restrict fil…
gb0101010101 Mar 16, 2020
a443de6
unload optimization
madgrizzle Mar 16, 2020
ac32e86
ClearLogs: Remove unneccesary - for x in range (0, 1000).
gb0101010101 Mar 17, 2020
5c76a88
Improve Alert messages when methods fail.
gb0101010101 Mar 17, 2020
3d8930d
Fix macro execution.
gb0101010101 Mar 17, 2020
17c1aa5
Improve Alert message when creating directory fails.
gb0101010101 Mar 17, 2020
6b301dd
Remove duplicate variable declarartion, fix TODO comment so it works …
gb0101010101 Mar 17, 2020
5a539c7
Todo message.
gb0101010101 Mar 17, 2020
bfc8c09
Make all todo items use default uppercase TODO so they show up in IDE…
gb0101010101 Mar 17, 2020
eb8c665
Add pauseRun() back as it was accidentally deleted.
gb0101010101 Mar 17, 2020
02d595f
Code format.
gb0101010101 Mar 17, 2020
5817493
Fix check of safe commands during gcode upload.
gb0101010101 Mar 18, 2020
0b7f5d4
Fix merge conflict with upstream/master adding method 'optimizeGcode()'.
gb0101010101 Mar 18, 2020
2ff87e5
fix tool change/spindle messages
madgrizzle Mar 18, 2020
545deea
fix tool change/spindle messages
madgrizzle Mar 18, 2020
0abdec1
Add 'head' block, move CSS includes into head, move Javascript includ…
gb0101010101 Mar 19, 2020
8a98c72
Remove error characters from button tags.
gb0101010101 Mar 19, 2020
e1fe12c
Source format and remove extra div closing tag.
gb0101010101 Mar 19, 2020
5fce1c8
Source format and remove extra closing div tag.
gb0101010101 Mar 19, 2020
67c802f
Source format only.
gb0101010101 Mar 19, 2020
897394d
Fix Controller message scroll box height.
gb0101010101 Mar 19, 2020
1d2099c
Source format only.
gb0101010101 Mar 19, 2020
bfd5a57
Layout rework to make full use of Bootstrap flexible layout so that h…
gb0101010101 Mar 20, 2020
fd3ee5c
Remove 'Controls' heading that is just taking up valuable space. Make…
gb0101010101 Mar 20, 2020
7e82d75
fix context menu behavior for touch events
shepelt Mar 22, 2020
5a1b512
Merge changes from upstream/master.
gb0101010101 Mar 22, 2020
5650767
Merge remote-tracking branch 'upstream/master' into gb0101010101-acti…
gb0101010101 Mar 22, 2020
4f248b2
Merge branch 'gb0101010101-template-fixes' into gb0101010101-experime…
gb0101010101 Mar 23, 2020
1ad18cb
Merge branch 'gb0101010101-z-axis-ui' into gb0101010101-experimental-1
gb0101010101 Mar 23, 2020
9501491
fix M3 without spindle speed
madgrizzle Mar 24, 2020
868cf88
Merge pull request #118 from gb0101010101/gb0101010101-experimental-1
madgrizzle Mar 24, 2020
cc62bb4
update, fix define home display
madgrizzle Mar 24, 2020
9c1b7f1
testing upgrades
madgrizzle Mar 24, 2020
255983e
fix release update
madgrizzle Mar 24, 2020
c9113b0
fix mobile display
madgrizzle Mar 26, 2020
86b7d9f
Merge pull request #116 from shepelt/master
madgrizzle Mar 26, 2020
941b4d0
Merge remote-tracking branch 'upstream/master'
Orob-Maslow Mar 29, 2020
b478fd5
Pendant Update
Orob-Maslow Mar 29, 2020
f0bc39f
pendant upgrade
Orob-Maslow Mar 30, 2020
c67c98b
merged error from newer version
Orob-Maslow Apr 1, 2020
6c2ea2c
refactor put commands to flask
Orob-Maslow Apr 2, 2020
cc126ee
Update main.py
Orob-Maslow Apr 2, 2020
ce654a2
update release manager to filter 'experimental' releases
madgrizzle Apr 3, 2020
ed877e6
update release manager to filter 'experimental' releases
madgrizzle Apr 3, 2020
ee3b73a
update release manager to filter 'experimental' releases
madgrizzle Apr 3, 2020
fa34642
cli display updates
Orob-Maslow Apr 5, 2020
eb78156
cli display updates
Orob-Maslow Apr 5, 2020
93e3dc1
updated gcode min max values for current cut
Orob-Maslow Apr 5, 2020
6f4f792
remove R radius code from gcode as file is imported to webcontrol
Orob-Maslow Apr 13, 2020
24e8bad
Fix M3 with no spindle speed.
gb0101010101 Apr 13, 2020
9ff1c7f
Merge pull request #121 from gb0101010101/gb0101010101-spindlespeed
madgrizzle Apr 13, 2020
1306bfa
Updated cli coordinates
Orob-Maslow Apr 14, 2020
ba449a9
Merge branch 'experimental' into master
madgrizzle Apr 15, 2020
af6f994
Trying to fix something that went really, really wrong
madgrizzle Apr 15, 2020
f5f882b
fixed cli display
Orob-Maslow Apr 18, 2020
193be5f
change start and stop service namess
Orob-Maslow Apr 18, 2020
551b55e
minor tweak
Orob-Maslow Apr 18, 2020
d0d4b72
Merge remote-tracking branch 'upstream/master'
Orob-Maslow Apr 18, 2020
7ec4bb9
Scale factor changes for display
Orob-Maslow Apr 18, 2020
8e18596
added debug messages for offset calculations.
Orob-Maslow Apr 18, 2020
37c18a0
RPI Shutdown Button
Orob-Maslow Apr 21, 2020
ca27d56
added poweroff command to main.py
Orob-Maslow Apr 21, 2020
5716692
Update for fail message
Orob-Maslow Apr 21, 2020
88667fa
RPI shutdown Button
Orob-Maslow Apr 22, 2020
aedaa3d
pyinstaller variable sets enableRPIshutdown
Orob-Maslow Apr 22, 2020
4ff7fd1
test
madgrizzle Apr 23, 2020
102cd47
Merge branch 'master' of ssh://github.com/madgrizzle/webcontrol
madgrizzle Apr 23, 2020
71fde41
Merge branch 'master' into RPI_Off_Menu_Button
madgrizzle Apr 23, 2020
dd9b19d
Merge pull request #126 from Orob-Maslow/RPI_Off_Menu_Button
madgrizzle Apr 23, 2020
9d83e6e
uptick version to experimental
madgrizzle Apr 23, 2020
71f2ed6
fix touchz
madgrizzle Apr 30, 2020
726802c
update file names for file upload
madgrizzle Apr 30, 2020
a390e60
update file names for file upload
madgrizzle Apr 30, 2020
6e0647b
Merge branch 'master' of https://github.com/madgrizzle/WebControl
madgrizzle May 1, 2020
70578c2
Merge remote-tracking branch 'upstream/master'
Orob-Maslow May 3, 2020
e01742a
added workspace file
Orob-Maslow May 10, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ ENV/
env.bak/
venv.bak/

#pyyinstaller
build
dist

#logs
log.txt
alog.txt
Expand All @@ -18,3 +22,8 @@ alog.txt
__pycache__/
*.py[cod]
*$py.class
Services/tp.py
Services/tr.py
Services/pijson.txt
Services/pijsonRT.txt
File/wiicontrol.code-workspace
606 changes: 606 additions & 0 deletions Actions/HoleySimulationKinematics.py

Large diffs are not rendered by default.

2,110 changes: 1,835 additions & 275 deletions Actions/actions.py

Large diffs are not rendered by default.

96 changes: 96 additions & 0 deletions Actions/gpioActions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
from DataStructures.makesmithInitFuncs import MakesmithInitFuncs
from gpiozero.pins.mock import MockFactory
from gpiozero import Device, Button, LED
class GPIOActions(MakesmithInitFuncs):
def __init__(self):
pass

'''
get gpio settings
'''
Buttons = []
LEDs = []
actionList = ["", "WebMCP Running", "Shutdown", "Stop", "Pause", "Play", "Home", "Return to Center","Pendant", "PlayLED", "PauseLED", "StopLED"]

def getActionList(self):
return self.actionList

def setup(self):
#self.setGPIOAction(2,"Stop")
setValues = self.data.config.getJSONSettingSection("GPIO Settings")
self.data.GPIOButtonService = self.data.config.getValue("Maslow Settings","MaslowButtonService")
if (self.data.GPIOButtonService):
self.data.wiiPendantPresent = self.data.config.getValue("Maslow Settings","wiiPendantPresent")
self.clidisplay = self.data.config.getValue("Maslow Settings", "clidisplay")
#print(setValues)
for setting in setValues:
if setting["value"] != "":
pinNumber = int(setting["key"][4:])
if (self.data.GPIOButtonService == False):
self.setGPIOAction(pinNumber, setting["value"])

def setGPIOAction(self,pin, action):
# first remove pin assignments if already made
foundButton = None
for button in self.Buttons:
if button.pin.number == pin:
button.pin.close()
foundButton = button
break
if foundButton is not None:
self.Buttons.remove(foundButton)

foundLED = None
for led in self.LEDs:
if led[1].pin.number == pin:
led[1].pin.close()
foundLED = led
break
if foundLED is not None:
self.LEDs.remove(foundLED)

type, pinAction = self.getAction(action)
if type == "button":
button = Button(pin)
button.when_pressed = pinAction
self.Buttons.append(button)
print("set Button ", pin, " with action: ", action)
if type == "led":
_led = LED(pin)
led = (action,_led)
self.LEDs.append(led)
print("set LED with action: " + action)
#pause()
def getAction(self, action):
if action == "Stop":
return "button", self.data.actions.stopRun
elif action == "Pause":
return "button", self.data.actions.pauseRun
elif action == "Play":
return "button", self.data.actions.startRun
else:
return "led", None

def runrun(self):
print("gpio button press detected")
self.data.actions.startRun()

def causeAction(self, action, onoff):
for led in self.LEDs:
if led[0] == action:
print(led[1])
if onoff == "on":
led[1].on()
else:
led[1].off()
print(led[1])
if action == "PlayLED" and onoff == "on":
self.causeAction("PauseLED", "off")
self.causeAction("StopLED", "off")
if action == "PauseLED" and onoff == "on":
self.causeAction("PlayLED", "off")
self.causeAction("StopLED", "off")
if action == "StopLED" and onoff == "on":
self.causeAction("PauseLED", "off")
self.causeAction("PlayLED", "off")

Loading