Compare commits

...

199 Commits

Author SHA1 Message Date
c2ac1228e8 git
Some checks are pending
build rgb-board / build (push) Waiting to run
2026-02-07 18:11:14 +00:00
acf04a32fb just testing passing the cred
Some checks are pending
build rgb-board / build (push) Waiting to run
2026-02-07 17:56:16 +00:00
bab2f64cac bad ai
All checks were successful
build rgb-board / build (push) Successful in 4m43s
2025-10-31 19:54:58 +00:00
10cafdc209 fix teleporting
All checks were successful
build rgb-board / build (push) Successful in 4m47s
2025-10-31 19:48:17 +00:00
c272fa403f attempt to fix collision
All checks were successful
build rgb-board / build (push) Successful in 5m0s
2025-10-31 19:41:09 +00:00
120303c51b new config.yaml for assistants
All checks were successful
build rgb-board / build (push) Successful in 4m6s
2025-06-17 03:11:39 +00:00
70bc20e621 slowing down mario
All checks were successful
build rgb-board / build (push) Successful in 4m11s
2025-06-16 19:15:11 +00:00
5af72cd59b Update 'Dockerfile'
All checks were successful
build rgb-board / build (push) Successful in 4m11s
2025-06-15 02:18:16 +00:00
94e1650fd8 Update '.gitea/workflows/build-push.yaml' 2025-06-15 02:17:59 +00:00
8501fffd8a Update 'Dockerfile'
Some checks failed
build rgb-board / build (push) Failing after 5m9s
2025-06-15 02:12:21 +00:00
78640e8833 Update '.gitea/workflows/build-push.yaml' 2025-06-15 02:12:04 +00:00
3ae0f38f40 Delete 'values.yaml'
Some checks failed
build rgb-board / build (push) Has been cancelled
2025-06-15 01:50:49 +00:00
4547f86403 Add 'values.yaml'
Some checks are pending
build rgb-board / build (push) Has started running
2025-06-15 01:50:33 +00:00
9f363b7633 Update 'Dockerfile'
Some checks failed
build rgb-board / build (push) Failing after 4m3s
2025-06-14 02:28:32 +00:00
5bc68ca194 Update '.gitea/workflows/build-push.yaml' 2025-06-14 02:28:16 +00:00
5ed9cae197 Update 'Dockerfile'
Some checks failed
build rgb-board / build (push) Failing after 4m5s
2025-06-13 23:52:08 +00:00
721e8fdd66 Update 'Dockerfile'
Some checks failed
build rgb-board / build (push) Failing after 4m8s
2025-06-13 22:58:11 +00:00
44a40527b1 Update '.gitea/workflows/build-push.yaml' 2025-06-13 22:57:56 +00:00
9707f4df15 Update 'Dockerfile'
Some checks failed
build rgb-board / build (push) Failing after 4m5s
2025-06-13 22:49:28 +00:00
ef82ee7317 Update '.gitea/workflows/build-push.yaml' 2025-06-13 22:49:12 +00:00
f7f25c598d Update 'Dockerfile'
Some checks failed
build rgb-board / build (push) Failing after 4m21s
2025-06-13 22:34:03 +00:00
22a6efc95b Update '.gitea/workflows/build-push.yaml' 2025-06-13 22:33:49 +00:00
d3f10482bb Update 'Dockerfile'
Some checks failed
build rgb-board / build (push) Failing after 4m3s
2025-06-13 22:14:29 +00:00
8637558f45 Update '.gitea/workflows/build-push.yaml' 2025-06-13 22:14:16 +00:00
9f6ca33133 Update 'Dockerfile'
Some checks failed
build rgb-board / build (push) Failing after 4m4s
2025-06-13 22:02:12 +00:00
23b8247ca5 Update '.gitea/workflows/build-push.yaml' 2025-06-13 22:01:59 +00:00
9c95b907bf Update 'Dockerfile'
Some checks failed
build rgb-board / build (push) Failing after 4m6s
2025-06-13 21:56:53 +00:00
b62443f94f Update '.gitea/workflows/build-push.yaml' 2025-06-13 21:56:40 +00:00
ab98eeca27 Update 'Dockerfile'
Some checks failed
build rgb-board / build (push) Failing after 4m21s
2025-06-13 21:50:12 +00:00
99f068ab74 Update '.gitea/workflows/build-push.yaml' 2025-06-13 21:49:59 +00:00
0587741a35 Update 'Dockerfile'
Some checks failed
build rgb-board / build (push) Failing after 4m0s
2025-06-13 21:40:12 +00:00
a191109daf Update '.gitea/workflows/build-push.yaml' 2025-06-13 21:39:51 +00:00
fb3c12fe01 Update 'Dockerfile'
Some checks failed
build rgb-board / build (push) Failing after 4m1s
2025-06-13 21:35:05 +00:00
211d6e4dbd Update '.gitea/workflows/build-push.yaml' 2025-06-13 21:34:50 +00:00
c6e7246c95 Update 'Dockerfile'
Some checks failed
build rgb-board / build (push) Failing after 4m31s
2025-06-13 21:25:42 +00:00
d222538aa4 Update '.gitea/workflows/build-push.yaml' 2025-06-13 21:16:16 +00:00
6d88307ae1 Update 'Dockerfile'
Some checks failed
build rgb-board / build (push) Failing after 4s
2025-06-13 21:14:11 +00:00
6ef49e7a50 Update '.gitea/workflows/build-push.yaml' 2025-06-13 21:13:58 +00:00
8431cc4221 Update 'Dockerfile'
Some checks failed
build rgb-board / build (push) Failing after 9s
2025-06-13 21:11:00 +00:00
867f41a2f5 Update '.gitea/workflows/build-push.yaml' 2025-06-13 21:10:40 +00:00
ba273f8cd6 Update 'Dockerfile'
Some checks failed
build rgb-board / build (push) Failing after 3m58s
2025-06-13 20:53:12 +00:00
3c454c5d35 Update '.gitea/workflows/build-push.yaml' 2025-06-13 20:52:36 +00:00
3f5df73cfc Update 'Dockerfile' 2025-06-13 20:50:41 +00:00
8ed00c76d3 Update '.gitea/workflows/build-push.yaml' 2025-06-13 20:50:00 +00:00
007e37e3ed Update 'Dockerfile'
Some checks failed
build rgb-board / build (push) Failing after 11s
2025-06-13 20:48:23 +00:00
5f08c54034 Update '.gitea/workflows/build-push.yaml' 2025-06-13 20:48:04 +00:00
eae79a03e9 Update 'Dockerfile' 2025-06-13 20:47:01 +00:00
48fbf44507 Update '.gitea/workflows/build-push.yaml' 2025-06-13 20:46:48 +00:00
8062302325 Update 'Dockerfile'
All checks were successful
build rgb-board / build (push) Successful in 4m0s
2025-06-13 20:42:33 +00:00
417cbb64bc Update '.gitea/workflows/build-push.yaml' 2025-06-13 20:41:50 +00:00
4ab8667bd8 Update 'Dockerfile' 2025-06-13 20:41:22 +00:00
b72555ea74 Update '.gitea/workflows/build-push.yaml' 2025-06-13 20:37:47 +00:00
Nathan Wagner
1257457605 forcing a build 2025-06-12 20:14:27 +00:00
Nathan Wagner
7b6a6a0b98 sizing and job 2025-06-12 19:34:45 +00:00
Nathan Wagner
23736512a8 wider maybe
All checks were successful
build rgb-board / build (push) Successful in 4m3s
2025-06-12 19:04:37 +00:00
Nathan Wagner
e33a88106c deflect on edge hit
All checks were successful
build rgb-board / build (push) Successful in 3m59s
2025-06-12 18:40:45 +00:00
Nathan Wagner
e4a47f3b76 checking
All checks were successful
build rgb-board / build (push) Successful in 4m2s
2025-06-12 17:57:11 +00:00
Nathan Wagner
8b37ba450e trying
All checks were successful
build rgb-board / build (push) Successful in 3m59s
2025-06-12 17:22:27 +00:00
Nathan Wagner
00b7060912 back to smaller elpis
All checks were successful
build rgb-board / build (push) Successful in 4m3s
2025-06-12 14:57:30 +00:00
Nathan Wagner
f14a5b0db0 wider!
All checks were successful
build rgb-board / build (push) Successful in 4m0s
2025-06-12 14:50:32 +00:00
Nathan Wagner
9d0e2ab46e increasing horizontal elipse radius
All checks were successful
build rgb-board / build (push) Successful in 4m0s
2025-06-12 14:33:01 +00:00
Nathan Wagner
ded945e7b9 shallower ellipses
All checks were successful
build rgb-board / build (push) Successful in 3m58s
2025-06-12 14:11:44 +00:00
Nathan Wagner
6d1cd08949 pushing board change
All checks were successful
build rgb-board / build (push) Successful in 4m1s
2025-06-12 13:46:42 +00:00
Nathan Wagner
2f23271bf1 give this another shot
All checks were successful
build rgb-board / build (push) Successful in 4m5s
2025-06-12 13:34:31 +00:00
Nathan Wagner
794f8ce0d5 goofy
All checks were successful
build rgb-board / build (push) Successful in 4m1s
2025-06-10 20:26:59 +00:00
Nathan Wagner
31f3ecddd1 fixing types
Some checks failed
build rgb-board / build (push) Failing after 3m44s
2025-06-10 20:09:39 +00:00
3f2af28a9a we'll see how this goes with the larger model
Some checks failed
build rgb-board / build (push) Failing after 5m16s
2025-06-10 14:22:21 +00:00
9e9084c9e7 to be an agent 2025-06-10 14:22:21 +00:00
Nathan Wagner
6e70ca4e35 upgrading mqtt
All checks were successful
build rgb-board / build (push) Successful in 5m55s
2025-06-05 18:31:47 +00:00
e2d7ff1d50 nonsense test.db
Some checks failed
build rgb-board / build (push) Has been cancelled
2025-06-05 16:11:16 +00:00
f921fc585b git mcp, not certain how this works...
All checks were successful
build rgb-board / build (push) Successful in 6m6s
2025-05-21 01:52:04 +00:00
c9b25fc0b0 updating
All checks were successful
build rgb-board / build (push) Successful in 5m43s
2025-05-20 17:35:48 +00:00
Nathan Wagner
90a4cf9d38 documentation says this directory will work
All checks were successful
build rgb-board / build (push) Successful in 6m3s
2025-05-20 17:04:41 +00:00
Nathan Wagner
be98425910 argument needs to be separated, and path needs to be corrected
All checks were successful
build rgb-board / build (push) Successful in 6m17s
2025-05-20 16:31:47 +00:00
Nathan Wagner
bfb7634dbb nuance in volume mounts for continue maybe
All checks were successful
build rgb-board / build (push) Successful in 6m44s
2025-05-20 15:05:22 +00:00
3b31ad6499 Update '.devcontainer/devcontainer.json'
Some checks failed
build rgb-board / build (push) Failing after 8s
2025-05-20 12:44:18 +00:00
b972dc761a config
Some checks failed
build rgb-board / build (push) Failing after 22s
2025-05-20 04:26:03 +00:00
1cc6fc5841 Add '.continue/mcpServers/wikipedia.yaml'
All checks were successful
build rgb-board / build (push) Successful in 6m37s
2025-05-20 04:02:03 +00:00
6e5c6bc89e probably not useful, adding here for devcontainer attempt
Some checks failed
build rgb-board / build (push) Failing after 16s
2025-05-20 03:49:58 +00:00
856471ec7d revert
All checks were successful
build rgb-board / build (push) Successful in 13m54s
2025-05-18 03:21:16 +00:00
843a009343 :wq 2025-05-02 01:59:16 +00:00
8e92059e54 more vibing man
All checks were successful
build rgb-board / build (push) Successful in 6m9s
2025-05-01 04:32:41 +00:00
9aacbf7399 stay in boundary
All checks were successful
build rgb-board / build (push) Successful in 10m27s
2025-05-01 04:18:04 +00:00
3636854124 vibe coding new path for mario
All checks were successful
build rgb-board / build (push) Successful in 6m40s
2025-05-01 03:59:32 +00:00
fc0dfae1a5 continue
Some checks failed
build rgb-board / build (push) Has been cancelled
2025-04-22 03:52:28 +00:00
nathan wagner
c64a6bfe42 fully removing context stuff.
All checks were successful
build rgb-board / build (push) Successful in 2m11s
2024-02-16 15:47:08 +00:00
nathan wagner
34de0be0a1 checking if context change is necessary
All checks were successful
build rgb-board / build (push) Successful in 7m41s
2024-02-16 15:23:06 +00:00
d574df9938 split out msg receiver
All checks were successful
build rgb-board / build (push) Successful in 8m3s
2024-02-16 04:41:58 +00:00
eab6b0d26f cleanup
All checks were successful
build rgb-board / build (push) Successful in 1m51s
2024-02-16 04:32:50 +00:00
0f4addd5db can't find what's causing the fill
All checks were successful
build rgb-board / build (push) Successful in 2m5s
2024-02-16 04:27:14 +00:00
2ac3a92b7a unsure what this does
All checks were successful
build rgb-board / build (push) Successful in 2m12s
2024-02-16 04:21:41 +00:00
6ac630cd57 order matters
All checks were successful
build rgb-board / build (push) Successful in 2m17s
2024-02-16 02:58:17 +00:00
fd94207114 white maybe
All checks were successful
build rgb-board / build (push) Successful in 8m0s
2024-02-16 02:42:22 +00:00
7a02239545 set color black
All checks were successful
build rgb-board / build (push) Successful in 7m59s
2024-02-16 02:27:45 +00:00
18b2875ddf apparently need to clear, context not what expected
All checks were successful
build rgb-board / build (push) Successful in 2m1s
2024-02-16 01:52:47 +00:00
bf1c448a84 Update 'animateDoorbell.go'
All checks were successful
build rgb-board / build (push) Successful in 1m46s
2024-02-16 01:47:36 +00:00
2a5e5142ce Update 'animateDoorbell.go'
Some checks failed
build rgb-board / build (push) Failing after 2m4s
2024-02-16 01:44:18 +00:00
af060a1600 Update 'board.go'
All checks were successful
build rgb-board / build (push) Successful in 2m15s
2024-02-16 01:37:41 +00:00
aa3e51f56f Update 'animateDoorbell.go'
Some checks failed
build rgb-board / build (push) Failing after 7m34s
2024-02-16 01:36:55 +00:00
7c086ff848 spin up and cleanup belong to animation
All checks were successful
build rgb-board / build (push) Successful in 2m10s
2024-02-16 00:39:58 +00:00
688e1d98f0 pop when done
All checks were successful
build rgb-board / build (push) Successful in 7m51s
2024-02-16 00:38:05 +00:00
6eec19644e context attempt
All checks were successful
build rgb-board / build (push) Successful in 7m57s
2024-02-15 23:21:09 +00:00
81e7607d53 no more initializer
All checks were successful
build rgb-board / build (push) Successful in 1m53s
2024-02-15 22:45:10 +00:00
1093a2c1b2 cleanup
All checks were successful
build rgb-board / build (push) Successful in 8m47s
2024-02-15 22:44:33 +00:00
476ed823bc making moves
All checks were successful
build rgb-board / build (push) Successful in 2m24s
2024-02-15 22:42:18 +00:00
89ad771eab adjusting some function names
All checks were successful
build rgb-board / build (push) Successful in 1m34s
deleting doorbell image after countdown
2024-02-05 20:55:57 +00:00
970f840140 created some handler functions
All checks were successful
build rgb-board / build (push) Successful in 1m34s
checking what happens if i don't delete image from map
2024-02-05 20:44:54 +00:00
41e317452f only animate if no countdown active
All checks were successful
build rgb-board / build (push) Successful in 1m37s
2024-02-05 20:28:06 +00:00
c4ffac2251 stoppping mario once message comes in
All checks were successful
build rgb-board / build (push) Successful in 1m34s
2024-02-05 19:44:16 +00:00
3365c8f075 try arm64 runner
All checks were successful
build rgb-board / build (push) Successful in 1m36s
2024-02-05 19:15:21 +00:00
78a145dae8 debug function for message type
All checks were successful
build rgb-board / build (push) Successful in 8m34s
2024-02-05 19:00:44 +00:00
1a0ea1833b splitting up some code responsibilitiy
All checks were successful
build rgb-board / build (push) Successful in 8m23s
extending the mq Message to have a type field
2024-02-05 16:45:41 +00:00
94cfad1190 removing old image array
Some checks failed
build rgb-board / build (push) Has been cancelled
2024-01-12 01:50:05 +00:00
4621c93b86 fixing map for doorbell
All checks were successful
build rgb-board / build (push) Successful in 8m19s
2024-01-12 01:49:01 +00:00
7c3c385119 Merge pull request 'animate-separate' (#3) from animate-separate into main
All checks were successful
build rgb-board / build (push) Successful in 8m13s
Reviewed-on: https://gitea.wagshome.duckdns.org/publicWagsHome/rgb-go-test/pulls/3
2024-01-12 01:25:42 +00:00
806fbe8813 Delete '.gitea/workflows/Build.yaml' 2024-01-12 01:25:27 +00:00
a3e2a9b939 Update 'Dockerfile'
All checks were successful
build only rgb-board / build (push) Successful in 9m11s
2024-01-12 00:44:03 +00:00
3e43ccd4ee Add '.gitea/workflows/Build.yaml' 2024-01-12 00:43:45 +00:00
50e5422009 Update '.gitea/workflows/Build.yaml' 2024-01-12 00:42:53 +00:00
1d7e41c637 Update 'Dockerfile' 2024-01-12 00:42:19 +00:00
60287d91d6 Update '.gitea/workflows/Build.yaml' 2024-01-12 00:41:55 +00:00
7301b46de9 Update 'main.go' 2024-01-12 00:41:23 +00:00
87470bddcb Update '.gitea/workflows/Build.yaml' 2024-01-12 00:41:02 +00:00
9f78ab3b8d Update 'main.go' 2024-01-12 00:40:18 +00:00
db3445e124 Add '.gitea/workflows/Build.yaml' 2024-01-12 00:39:44 +00:00
b001c0f628 Update '.gitea/workflows/build-push.yaml' 2024-01-12 00:38:30 +00:00
6a9e7d009c moving animations around 2024-01-11 23:42:15 +00:00
155c71b49f Update 'main.go'
All checks were successful
build rgb-board / build (push) Successful in 7m51s
2023-10-20 02:37:26 +00:00
2613cf9834 Update 'main.go'
Some checks failed
build rgb-board / build (push) Failing after 1m27s
2023-10-20 02:29:28 +00:00
ac36030437 Merge branch 'main' of gitea.local:publicWagsHome/rgb-go-test
Some checks failed
build rgb-board / build (push) Failing after 1m29s
2023-10-20 02:21:08 +00:00
f5d2c0f612 just do it 2023-10-20 02:20:27 +00:00
d9bf74994e Update '.gitea/workflows/build.yaml' 2023-10-20 01:58:11 +00:00
8f3ec4c34f Update 'main.go'
All checks were successful
build lightwatch / build (push) Successful in 7m49s
2023-10-19 22:41:21 +00:00
d80d062f02 Update 'main.go'
All checks were successful
build lightwatch / build (push) Successful in 7m58s
2023-10-19 22:13:36 +00:00
3c212a5186 Update 'main.go'
All checks were successful
build lightwatch / build (push) Successful in 8m20s
2023-10-19 21:58:14 +00:00
b02f5a7293 Update 'Dockerfile'
All checks were successful
build lightwatch / build (push) Successful in 16m39s
2023-10-08 02:02:00 +00:00
383599cb7b Update 'Dockerfile'
All checks were successful
build lightwatch / build (push) Successful in 18m23s
2023-09-20 00:15:02 +00:00
75ec9a3901 Update '.gitea/workflows/build.yaml' 2023-09-20 00:14:46 +00:00
a85e50eed8 Update 'Dockerfile'
Some checks failed
build lightwatch / build (push) Failing after 1m19s
2023-09-19 23:44:50 +00:00
8b1111417d Update 'Dockerfile'
All checks were successful
build lightwatch / build (push) Successful in 8m31s
2023-09-08 14:24:40 +00:00
6a024bdd46 Update '.gitea/workflows/build.yaml' 2023-09-08 14:24:22 +00:00
a12106f844 Update '.gitea/workflows/build.yaml' 2023-09-08 14:19:04 +00:00
033cd994f2 Update 'Dockerfile'
All checks were successful
build lightwatch / build (push) Successful in 5m35s
2023-09-08 14:18:07 +00:00
001c84fd82 Update '.gitea/workflows/build.yaml' 2023-09-08 13:43:44 +00:00
f2a4abf1cc Update 'Dockerfile'
All checks were successful
build lightwatch / build (push) Successful in 5m19s
2023-09-08 12:59:56 +00:00
5662403eab Update '.gitea/workflows/build.yaml' 2023-09-08 12:59:41 +00:00
a7cca57639 Update 'Dockerfile'
All checks were successful
build lightwatch / build (push) Successful in 3m34s
2023-09-07 23:48:16 +00:00
911c66287f Update '.gitea/workflows/build.yaml' 2023-09-07 23:48:04 +00:00
cc6b4c4adc Update 'Dockerfile' 2023-09-07 23:45:23 +00:00
a5e054b761 Update '.gitea/workflows/build.yaml' 2023-09-07 23:45:10 +00:00
789729e1bc Update '.gitea/workflows/build.yaml' 2023-09-07 23:44:16 +00:00
fae1811c72 Update '.gitea/workflows/build.yaml' 2023-09-07 23:43:43 +00:00
0f632443e5 Update 'Dockerfile' 2023-09-07 23:42:17 +00:00
ba2284b848 Update '.gitea/workflows/build.yaml' 2023-09-07 23:42:01 +00:00
3c975a066a Update 'Dockerfile' 2023-09-07 23:41:07 +00:00
261e5fff5f Update '.gitea/workflows/build.yaml' 2023-09-07 23:40:53 +00:00
f1b6bc3191 Update 'Dockerfile' 2023-09-07 23:40:18 +00:00
a3fb0eef93 Update '.gitea/workflows/build.yaml' 2023-09-07 23:39:47 +00:00
6f9ef35736 Merge branch 'main' of gitea.local:publicWagsHome/rgb-go-test
All checks were successful
build lightwatch / build (push) Successful in 9m0s
2023-09-03 01:49:44 -04:00
eea8e59013 revert to compiling for test 2023-09-03 01:49:16 -04:00
ce3a6da6f8 Update 'Dockerfile'
Some checks failed
build lightwatch / build (push) Failing after 1m21s
2023-09-03 05:46:52 +00:00
696a41836e Update 'Dockerfile'
Some checks failed
build lightwatch / build (push) Failing after 48s
2023-09-03 04:24:16 +00:00
9f01ebd515 Update '.gitea/workflows/build.yaml' 2023-09-03 04:24:01 +00:00
789f9b8c98 Delete 'Jenkinsfile'
Some checks failed
build lightwatch / build (push) Failing after 1m44s
2023-09-03 04:18:15 +00:00
874aa569e4 actions!
Some checks are pending
rgb/pipeline/head Build queued...
2023-09-03 00:17:21 -04:00
75b6ccc10d Update 'main.go'
Some checks are pending
rgb/pipeline/head Build queued...
2023-07-06 03:02:19 +00:00
e86fbece73 Update 'main.go'
All checks were successful
rgb/pipeline/head This commit looks good
2023-07-06 02:58:03 +00:00
3c66fa1f18 Update 'main.go'
Some checks failed
rgb/pipeline/head There was a failure building this commit
2023-07-05 23:05:16 +00:00
b37ee35f53 Update 'main.go'
Some checks failed
rgb/pipeline/head There was a failure building this commit
2023-07-05 23:03:52 +00:00
9dbcc756d4 resizing image on thread instead of ui thread 2023-06-20 00:30:29 +00:00
631e5711d1 gah 2023-06-15 04:46:25 +00:00
2fcf2411b0 Merge branch 'master' of gitea.local:publicWagsHome/rgb-go-test 2023-06-15 04:31:27 +00:00
1fa86357ec arrays start at zero dumbass 2023-06-15 04:30:39 +00:00
b03538c09b Update 'Dockerfile' 2023-06-15 04:28:45 +00:00
34dfc8d210 slice-y 2023-06-15 04:14:53 +00:00
8094030b38 nil work 2023-06-15 03:54:38 +00:00
48bf7932a0 let the image sit for a bit 2023-06-15 03:26:37 +00:00
336a5c2bf6 trying to do image work 2023-06-14 23:47:18 +00:00
2e6d88de2a just moving functions around
Some checks failed
rgb/pipeline/head There was a failure building this commit
2023-05-23 03:46:05 +00:00
Nathan
05907d4745 logging on disconnect
All checks were successful
rgb/pipeline/head This commit looks good
2023-01-21 22:20:16 +00:00
Nathan
ba17eb4a4c just making some comments
All checks were successful
rgb/pipeline/head This commit looks good
2023-01-19 22:37:30 +00:00
eb472f0b31 Update 'Dockerfile'
All checks were successful
rgb/pipeline/head This commit looks good
2023-01-17 17:54:12 +00:00
7e06b58522 Update 'main.go'
All checks were successful
rgb/pipeline/head This commit looks good
2023-01-15 05:50:46 +00:00
Nathan
4be0d5e009 nice
All checks were successful
rgb/pipeline/head This commit looks good
2023-01-15 04:50:25 +00:00
Nathan
527f89d86c god bless
All checks were successful
rgb/pipeline/head This commit looks good
2023-01-15 04:34:38 +00:00
Nathan
058cc6c90b stretch it out
All checks were successful
rgb/pipeline/head This commit looks good
2023-01-15 04:24:47 +00:00
Nathan
c226fa4fa7 setting client ID
All checks were successful
rgb/pipeline/head This commit looks good
2023-01-15 04:12:33 +00:00
Nathan
7211d97fd5 signal wait to block for end
All checks were successful
rgb/pipeline/head This commit looks good
2023-01-15 04:03:22 +00:00
Nathan
5f320f8ca7 Merge branch 'master' of gitea.local:publicWagsHome/rgb-go-test
All checks were successful
rgb/pipeline/head This commit looks good
2023-01-15 03:53:11 +00:00
Nathan
acbd559436 big time risk 2023-01-15 03:52:59 +00:00
6f5791f654 Update 'Dockerfile'
All checks were successful
rgb/pipeline/head This commit looks good
2023-01-15 03:43:59 +00:00
Nathan
89a9e009be alpine instead of scratch
All checks were successful
rgb/pipeline/head This commit looks good
2023-01-15 03:36:33 +00:00
Nathan
7872195d61 adding resources
All checks were successful
rgb/pipeline/head This commit looks good
2023-01-15 03:22:53 +00:00
63dbb2fb4d Update 'Dockerfile'
All checks were successful
rgb/pipeline/head This commit looks good
2023-01-15 03:14:47 +00:00
4917825de7 Merge pull request 'addingMQ' (#2) from addingMQ into master
All checks were successful
rgb/pipeline/head This commit looks good
Reviewed-on: https://gitea.wagshome.duckdns.org/publicWagsHome/rgb-go-test/pulls/2
2023-01-15 01:29:10 +00:00
Nathan
71f1c6ba20 removing musl_cc wrapper
Some checks are pending
rgb/pipeline/pr-master Build queued...
2023-01-14 23:25:27 +00:00
Nathan
4b6762ab51 attempting static compilation
Some checks failed
rgb/pipeline/head There was a failure building this commit
2023-01-14 20:10:36 +00:00
Nathan
17340399e5 attempt at receiving message for board
All checks were successful
rgb/pipeline/head This commit looks good
2023-01-14 19:29:54 +00:00
Nathan
c7f4f17242 adding MQ
Some checks failed
rgb/pipeline/head There was a failure building this commit
wyze_sensor/pipeline/head Build queued...
2023-01-08 22:56:24 +00:00
19 changed files with 554 additions and 223 deletions

View File

@@ -0,0 +1,16 @@
name: Wagner Home Assistant
version: 1.0.0
schema: v1
models:
- name: Autodetect
provider: ollama
model: AUTODETECT
apiBase: http://192.168.0.53
context:
- provider: code
- provider: docs
- provider: diff
- provider: terminal
- provider: problems
- provider: folder
- provider: codebase

View File

@@ -0,0 +1,14 @@
name: memory
version: 1.0.0
schema: v1
mcpServers:
- name: git
version: 0.0.1
command: docker
args:
- run
- -i
- -v
- /workspaces/rgb-led-board:/workspace
- --rm
- mcp/git

View File

@@ -0,0 +1,12 @@
name: memory
version: 1.0.0
schema: v1
mcpServers:
- name: memory
version: 0.0.1
command: docker
args:
- run
- -i
- --rm
- mcp/memory

View File

@@ -0,0 +1,16 @@
name: sqlite
version: 1.0.0
schema: v1
mcpServers:
- name: sqlite
version: 0.0.1
command: docker
args:
- run
- -i
- -v
- /workspaces/rgb-led-board:/sqlite
- --rm
- mcp/sqlite
- --db-path
- /sqlite/test.db

View File

@@ -0,0 +1,12 @@
name: time
version: 1.0.0
schema: v1
mcpServers:
- name: time
version: 0.0.1
command: docker
args:
- run
- -i
- --rm
- mcp/time

View File

@@ -0,0 +1,12 @@
name: wikipedia
version: 1.0.0
schema: v1
mcpServers:
- name: wikipedia
version: 0.0.1
command: docker
args:
- run
- -i
- --rm
- mcp/wikipedia-mcp

View File

@@ -2,11 +2,12 @@
# [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1, 1.18, 1.17, 1-bullseye, 1.18-bullseye, 1.17-bullseye, 1-buster, 1.18-buster, 1.17-buster
ARG VARIANT="1.18-bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT}
FROM mcr.microsoft.com/vscode/devcontainers/go:${VARIANT}
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo gpg --dearmor -o /usr/share/keyrings/yarn-keyring.gpg
RUN echo "deb [signed-by=/usr/share/keyrings/yarn-keyring.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list > /dev/null
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
#RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \

View File

@@ -8,7 +8,7 @@
// Update the VARIANT arg to pick a version of Go: 1, 1.18, 1.17
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon.
"VARIANT": "1.18-bullseye",
"VARIANT": "1.21-bullseye",
// Options
"NODE_VERSION": "none"
}
@@ -37,13 +37,12 @@
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "go version",
//"postCreateCommand": "ln -s /workspaces/rgb-led-board/.continue/config/config.yaml /home/vscode/.continue/config.yaml",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
"docker-in-docker": "latest",
"kubectl-helm-minikube": "latest",
"git": "latest"
// "docker-in-docker": "latest",
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
}
}

View File

@@ -0,0 +1,63 @@
name: build rgb-board
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on:
push:
branches:
- main
paths-ignore:
- ".gitea/workflows/**"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
container:
image: registry.local/catthehacker-home:act-latest
volumes:
- /var/run/user/1000/docker.sock:/var/run/docker.sock
steps:
- uses: actions/checkout@v3
- name: short-sha
id: short-sha
run: echo "short-sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: |
image=registry.local/buildkit-wagnerca:stable-3-rootless
seccomp=unconfined
apparmor=unconfined
systempaths=unconfined
privileged=false
- run: docker buildx ls
- name: build push rgbboard
uses: docker/build-push-action@master
#id: build_push_rgbboard
with:
push: true
tags: registry.local/rgbboard:${{ steps.short-sha.outputs.short-sha }}
platforms: linux/arm64
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: wagshome/rgbboard
token: ${{ secrets.runner_deploy }}
path: rgbboard
- name: Set up Git
run: |
git config --global user.name "Gitea Actions"
git config --global user.email "actions@nope.com"
- name: Install yq
uses: https://github.com/chrisdickinson/setup-yq@v1.0.0
with:
yq-version: v4.45.4
- name: Update values.yaml
run: |
yq -i '.image.tag = env(SHORT_SHA)' rgbboard/rgbboard/values.yaml
env:
SHORT_SHA: ${{ steps.short-sha.outputs.short-sha }}
- name: Commit and Push changes
run: |
cd rgbboard
git add .
git commit -m "Update image to ${{ steps.short_sha.outputs.short_sha }}"
git push

View File

@@ -1,20 +1,13 @@
from registry.local/rgbarm64lib:latest as builder
workdir /usr/src/app/rgb
FROM registry.local/rgbarm64lib:latest as builder
WORKDIR /usr/src/app/rgb
COPY . .
ENV GOPRIVATE=gitea.wagshome.duckdns.org
ENV GONOSUMBDB=gitea.wagshome.duckdns.org
RUN go mod tidy
#RUN CGO_ENABLED=1 CC=musl-gcc go build --ldflags 'linkmode external -extldflags "-static"'
RUN go build .
RUN CGO_ENABLED=1 go build --ldflags '-linkmode external -extldflags=-static'
RUN mkdir -p /usr/src/app/work/
RUN cp /usr/src/app/rgb/rgb /usr/src/app/work/rgb
RUN cp /usr/src/app/rgb/mario* /usr/src/app/work/
#FROM alpine:latest
#COPY --from=builder /usr/src/app/rgb/rgb /usr/src/app/work/
FROM scratch
COPY --from=builder /usr/src/app/rgb/rgb /usr/src/app/work/
COPY --from=builder /usr/src/app/rgb/mari* /usr/src/app/work/
WORKDIR /usr/src/app/work

26
Jenkinsfile vendored
View File

@@ -1,26 +0,0 @@
pipeline {
agent any
stages {
/*stage('GitCheckOut') {
steps{
checkout([$class: 'GitSCM', branches: [[name: "${env.CHECKOUT}"]], extensions: [], userRemoteConfigs: [[credentialsId: 'gitea', url: "$GIT_URL"]]])
}
}*/
stage('buildPush') {
steps{
sh 'echo "ADASDASDSADSADASD"'
sh 'docker buildx rm jenkins-agent || echo "none there"'
sh '''#!/bin/bash
docker buildx create --bootstrap --name=jenkins-agent --driver=kubernetes --driver-opt=namespace=jenkinsagent --driver-opt=qemu.install=true --driver-opt=\\"nodeselector=kubernetes.io/arch=amd64\\" --driver-opt=\\"image=registry.local/buildkit-wagnerca:stable-3-rootless\\" --use
'''
sh 'docker buildx build . -t registry.local/rgbboard:v0.0.$BUILD_NUMBER --push --platform=linux/arm64,linux/amd64'
sh 'docker buildx rm jenkins-agent'
}
}
}
}

31
animateDoorbell.go Normal file
View File

@@ -0,0 +1,31 @@
package main
import (
"bytes"
b64 "encoding/base64"
"image"
"image/color"
"github.com/disintegration/imaging"
)
type Doorbell struct {
image image.Image
}
func (a *Animation) animateDoorbell() {
if a.countDown > 0 {
a.ctx.SetColor(color.Black)
a.ctx.Clear()
a.ctx.DrawImageAnchored(a.doorbell.image, 0, 0, 0, 0)
a.countDown -= 50
} else {
a.doorbell = Doorbell{}
a.countDown = 5000
}
}
func (a *Animation) loadImage(imgType string, img string) {
baseImage, _ := b64.StdEncoding.DecodeString(img)
bigImage, _, _ := image.Decode(bytes.NewReader(baseImage))
a.doorbell.image = imaging.Resize(bigImage, 64, 64, imaging.Lanczos)
}

151
animationMario.go Normal file
View File

@@ -0,0 +1,151 @@
package main
import (
"image"
"image/color"
"log"
"os"
"math"
"github.com/disintegration/imaging"
)
type Mario struct {
position image.Point
dir image.Point
images map[string]image.Image
updown string
a float64
b float64
angle float64
}
func loadMario(file string) image.Image {
reader, err := os.Open(file)
if err != nil {
log.Fatal(err)
}
rawMario, _, err := image.Decode(reader)
if err != nil {
log.Fatal(err)
}
mario := imaging.Resize(rawMario, 16, 16, imaging.Lanczos)
return mario
}
func initialMap() map[string]image.Image {
imageMap := make(map[string]image.Image)
imageMap["marioUp"] = loadMario("marioUp.png")
imageMap["marioDown"] = loadMario("marioDown.png")
return imageMap
}
// initializes the struct for the an play animation function, this could all be dumped into function that's wrapping go routine if I wanted
// this assumes mario context is up
func (a *Animation) animateMario() {
defer a.updateMarioPosition()
a.ctx.SetColor(color.Black)
a.ctx.Clear()
if a.mario.dir.X == 1 {
a.ctx.DrawImageAnchored(a.mario.images[a.mario.updown], a.mario.position.X, a.mario.position.Y, 0.5, 0.5)
} else {
a.ctx.DrawImageAnchored(imaging.FlipH(a.mario.images[a.mario.updown]), a.mario.position.X, a.mario.position.Y, 0.5, 0.5)
}
}
func (a *Animation) updateMarioPosition() {
centerX := a.ctx.Width() / 2
centerY := a.ctx.Height() / 2
// Determine sprite size (use current updown image if available)
var sprite image.Image
if img, ok := a.mario.images[a.mario.updown]; ok && img != nil {
sprite = img
} else {
for _, im := range a.mario.images {
sprite = im
break
}
}
// default half sizes if sprite missing
halfW, halfH := 8, 8
if sprite != nil {
halfW = sprite.Bounds().Dx() / 2
halfH = sprite.Bounds().Dy() / 2
}
// allowable center range so the sprite stays fully on the panel
minCenterX := halfW
maxCenterX := a.ctx.Width() - 1 - halfW
minCenterY := halfH
maxCenterY := a.ctx.Height() - 1 - halfH
// If the sprite is larger than the panel in a dimension, collapse
// the allowed center range to the panel center so we don't get
// immediate collisions every frame which makes Mario flash.
if maxCenterX < minCenterX {
minCenterX = centerX
maxCenterX = centerX
}
if maxCenterY < minCenterY {
minCenterY = centerY
maxCenterY = centerY
}
// advance angle for this frame
delta := 0.05
t := a.mario.angle
tNext := t + delta
if tNext >= 2*math.Pi {
tNext -= 2 * math.Pi
}
// compute next candidate center from the next parametric position
marioX := int(math.Round(a.mario.a*math.Cos(tNext))) + centerX
marioY := int(math.Round(a.mario.b*math.Sin(tNext))) + centerY
// clamp into allowed center ranges so sprite stays fully on panel
if marioX < minCenterX {
marioX = minCenterX
}
if marioX > maxCenterX {
marioX = maxCenterX
}
if marioY < minCenterY {
marioY = minCenterY
}
if marioY > maxCenterY {
marioY = maxCenterY
}
// commit position and advance angle
a.mario.position.X = marioX
a.mario.position.Y = marioY
a.mario.angle = tNext
// Direction logic (based on the motion between t and tNext)
// approximate direction by comparing positions (preferable to trig sign when clamped)
prevX := int(math.Round(a.mario.a*math.Cos(t))) + centerX
if prevX == marioX {
// if we didn't move horizontally, keep previous direction
// (this prevents flicker when clamped)
} else if marioX < prevX {
a.mario.dir.X = -1
} else {
a.mario.dir.X = 1
}
// up/down based on vertical movement
prevY := int(math.Round(a.mario.b*math.Sin(t))) + centerY
if prevY == marioY {
// keep previous up/down state
} else if marioY < prevY {
a.mario.updown = "marioUp"
} else {
a.mario.updown = "marioDown"
}
}

73
board.go Normal file
View File

@@ -0,0 +1,73 @@
package main
import (
"encoding/json"
"fmt"
"image"
"time"
rgbmatrix "gitea.wagshome.duckdns.org/publicWagsHome/go-rpi-rgb-led-matrix"
mqtt "github.com/eclipse/paho.mqtt.golang"
"github.com/fogleman/gg"
)
type Animation struct {
ctx *gg.Context
height int
width int
stroke int
mqmsg chan mqtt.Message
msg string
countDown int
mario Mario
doorbell Doorbell
}
func orchestrator(tk *rgbmatrix.ToolKit, mqMessages chan mqtt.Message) {
//Playanimation comes from the toolkit, all it takes is an animation struct
tk.PlayAnimation(animate(image.Point{127, 64}, mqMessages))
}
func animate(sz image.Point, mqMessages chan mqtt.Message) *Animation {
return &Animation{
ctx: gg.NewContext(sz.X, sz.Y),
height: 8,
width: 8,
stroke: 8,
mqmsg: mqMessages,
countDown: 5000,
mario: Mario{
images: initialMap(),
updown: "marioUp",
dir: image.Point{1, 1},
a: 62,
b: 31,
},
}
}
func (a *Animation) useMsg() {
var incoming incomingMessage
select {
case msg := <-a.mqmsg:
json.Unmarshal([]byte(string(msg.Payload())), &incoming)
fmt.Println(incoming.Type)
if incoming.Type == "doorbell" {
go a.loadImage(incoming.Type, incoming.Image)
} else {
a.ctx.DrawString(a.msg, 5, 9)
}
default:
}
}
func (a *Animation) Next() (image.Image, <-chan time.Time, error) {
switch {
case a.doorbell != (Doorbell{}):
a.animateDoorbell()
default:
a.animateMario()
}
a.useMsg()
return a.ctx.Image(), time.After(time.Millisecond * 50), nil
}

25
go.mod
View File

@@ -1,23 +1,28 @@
module rgb
go 1.18
go 1.21.2
toolchain go1.21.6
require (
gitea.wagshome.duckdns.org/publicWagsHome/go-rpi-rgb-led-matrix v0.0.0-20220709235716-bf87ebdb3e55
gitea.wagshome.duckdns.org/publicWagsHome/go-rpi-rgb-led-matrix v1.0.0
github.com/disintegration/imaging v1.6.2
github.com/eclipse/paho.mqtt.golang v1.5.0
github.com/fogleman/gg v1.3.0
)
require (
dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037 // indirect
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 // indirect
dmitri.shuralyov.com/gpu/mtl v0.0.0-20221208032759-85de2813cf6b // indirect
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20221017161538-93cebf72946b // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/jezek/xgb v1.0.0 // indirect
golang.org/x/exp/shiny v0.0.0-20220713135740-79cabaa25d75 // indirect
golang.org/x/image v0.0.0-20220617043117-41969df76e82 // indirect
golang.org/x/mobile v0.0.0-20220518205345-8578da9835fd // indirect
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/jezek/xgb v1.1.0 // indirect
golang.org/x/exp/shiny v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/image v0.13.0 // indirect
golang.org/x/mobile v0.0.0-20231006135142-2b44d11868fe // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.22.0 // indirect
)
//replace gitea.wagshome.duckdns.org/publicWagsHome/go-rpi-rgb-led-matrix v0.0.0-20220709235716-bf87ebdb3e55 => /usr/src/app

83
go.sum
View File

@@ -1,63 +1,40 @@
dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037 h1:+PdD6GLKejR9DizMAKT5DpSAkKswvZrurk1/eEt9+pw=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
gitea.wagshome.duckdns.org/publicWagsHome/go-rpi-rgb-led-matrix v0.0.0-20220709235716-bf87ebdb3e55 h1:+sXEegWFQ+bO3c4+BvNkr/V2g+evYY4uXBmx9ns4mmk=
gitea.wagshome.duckdns.org/publicWagsHome/go-rpi-rgb-led-matrix v0.0.0-20220709235716-bf87ebdb3e55/go.mod h1:DLjEFm7sw//9GNvWjdUU9Ey3anpN6XNSEm+Zgdfh70Q=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20221208032759-85de2813cf6b h1:a26Bdkl2B9PmYN6vGXnnfB2UGKjz0Moif1aEg+xTd7M=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20221208032759-85de2813cf6b/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
gitea.wagshome.duckdns.org/publicWagsHome/go-rpi-rgb-led-matrix v1.0.0 h1:My2/dfuRCTf4T9k3TyyYGJFQ+9M7aOZyaecbxUVWhBk=
gitea.wagshome.duckdns.org/publicWagsHome/go-rpi-rgb-led-matrix v1.0.0/go.mod h1:irNP534nYpVyP1wwMz2O903jJ2Ve6se7LAGi6A8JSnE=
github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c=
github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4=
github.com/eclipse/paho.mqtt.golang v1.5.0 h1:EH+bUVJNgttidWFkLLVKaQPGmkTUfQQqjOsyvMGvD6o=
github.com/eclipse/paho.mqtt.golang v1.5.0/go.mod h1:du/2qNQVqJf/Sqs4MEL77kR8QTqANF7XU7Fk0aOTAgk=
github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8=
github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20221017161538-93cebf72946b h1:GgabKamyOYguHqHjSkDACcgoPIz3w0Dis/zJ1wyHHHU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20221017161538-93cebf72946b/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
github.com/jezek/xgb v1.0.0 h1:s2rRzAV8KQRlpsYA7Uyxoidv1nodMF0m6dIG6FhhVLQ=
github.com/jezek/xgb v1.0.0/go.mod h1:nrhwO0FX/enq75I7Y7G8iN1ubpSGZEiA3v9e9GyRFlk=
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4=
golang.org/x/exp/shiny v0.0.0-20220713135740-79cabaa25d75 h1:+tvDaVUVC7xUhwmi3B/tvmqManNx24wRIWsXvvnkb8Q=
golang.org/x/exp/shiny v0.0.0-20220713135740-79cabaa25d75/go.mod h1:VjAR7z0ngyATZTELrBSkxOOHhhlnVUxDye4mcjx5h/8=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/jezek/xgb v1.1.0 h1:wnpxJzP1+rkbGclEkmwpVFQWpuE2PUGNUzP8SbfFobk=
github.com/jezek/xgb v1.1.0/go.mod h1:nrhwO0FX/enq75I7Y7G8iN1ubpSGZEiA3v9e9GyRFlk=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
golang.org/x/exp/shiny v0.0.0-20231006140011-7918f672742d h1:grE48C8cjIY0aiHVmFyYgYxxSARQWBABLXKZfQPrBhY=
golang.org/x/exp/shiny v0.0.0-20231006140011-7918f672742d/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0=
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20220617043117-41969df76e82 h1:KpZB5pUSBvrHltNEdK/tw0xlPeD13M6M6aGP32gKqiw=
golang.org/x/image v0.0.0-20220617043117-41969df76e82/go.mod h1:doUCurBvlfPMKfmIpRIywoHmhN3VyhnoFDbvIEWF4hY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20220518205345-8578da9835fd h1:x1GptNaTtxPAlTVIAJk61fuXg0y17h09DTxyb+VNC/k=
golang.org/x/mobile v0.0.0-20220518205345-8578da9835fd/go.mod h1:pe2sM7Uk+2Su1y7u/6Z8KJ24D7lepUjFZbhFOrmDfuQ=
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/image v0.13.0 h1:3cge/F/QTkNLauhf2QoE9zp+7sr+ZcL4HnoZmdwg9sg=
golang.org/x/image v0.13.0/go.mod h1:6mmbMOeV28HuMTgA6OSRkdXKYw/t5W9Uwn2Yv1r3Yxk=
golang.org/x/mobile v0.0.0-20231006135142-2b44d11868fe h1:lrXv4yHeD9FA8PSJATWowP1QvexpyAPWmPia+Kbzql8=
golang.org/x/mobile v0.0.0-20231006135142-2b44d11868fe/go.mod h1:BrnXpEObnFxpaT75Jo9hsCazwOWcp7nVIa8NNuH5cuA=
golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.8-0.20211022200916-316ba0b74098/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=

152
main.go
View File

@@ -2,21 +2,21 @@ package main
import (
"flag"
"image"
"image/color"
"fmt"
_ "image/jpeg"
"log"
"os"
"time"
"os/signal"
"syscall"
rgbmatrix "gitea.wagshome.duckdns.org/publicWagsHome/go-rpi-rgb-led-matrix"
"github.com/disintegration/imaging"
"github.com/fogleman/gg"
mqtt "github.com/eclipse/paho.mqtt.golang"
)
// flags from cmd line
var (
rows = flag.Int("led-rows", 32, "number of rows supported")
cols = flag.Int("led-cols", 32, "number of columns supported")
rows = flag.Int("led-rows", 64, "number of rows supported")
cols = flag.Int("led-cols", 64, "number of columns supported")
parallel = flag.Int("led-parallel", 1, "number of daisy-chained panels")
chain = flag.Int("led-chain", 2, "number of displays daisy-chained")
brightness = flag.Int("brightness", 100, "brightness (0-100)")
@@ -24,8 +24,21 @@ var (
show_refresh = flag.Bool("led-show-refresh", false, "Show refresh rate.")
inverse_colors = flag.Bool("led-inverse", false, "Switch if your matrix has inverse colors on.")
disable_hardware_pulsing = flag.Bool("led-no-hardware-pulse", false, "Don't use hardware pin-pulse generation.")
led_slowdown_gpio = flag.Int("led-slowdown-gpio", 1, "GPIO pin slowdown")
)
// runs before main, parses flags
func init() {
flag.Parse()
}
// small function for handling fatal errors
func fatal(err error) {
if err != nil {
panic(err)
}
}
func main() {
config := &rgbmatrix.DefaultConfig
config.Rows = *rows
@@ -37,111 +50,30 @@ func main() {
config.ShowRefreshRate = *show_refresh
config.InverseColors = *inverse_colors
config.DisableHardwarePulsing = *disable_hardware_pulsing
var rt rgbmatrix.RunTimeConfig
rt.Gpio_slowdown = *led_slowdown_gpio
setupMQTT()
/*bounds := mario.Bounds()
var histogram [16][4]int
for y := bounds.Min.Y; y < bounds.Max.Y; y++ {
for x := bounds.Min.X; x < bounds.Max.X; x++ {
r, g, b, a := mario.At(x, y).RGBA()
// A color's RGBA method returns values in the range [0, 65535].
// Shifting by 12 reduces this to the range [0, 15].
histogram[r>>12][0]++
histogram[g>>12][1]++
histogram[b>>12][2]++
histogram[a>>12][3]++
}
}*/
m, err := rgbmatrix.NewRGBLedMatrix(config)
m, err := rgbmatrix.NewRGBLedMatrix(config, &rt)
fatal(err)
mqMessages := make(chan mqtt.Message)
log.Println("making listener")
go listener(mqMessages)
tk := rgbmatrix.NewToolKit(m)
defer tk.Close()
tk.PlayAnimation(NewAnimation(image.Point{64, 32}))
}
func init() {
flag.Parse()
}
func fatal(err error) {
if err != nil {
panic(err)
}
}
type Animation struct {
ctx *gg.Context
position image.Point
dir image.Point
height int
width int
stroke int
image []image.Image
updown int
}
func NewAnimation(sz image.Point) *Animation {
reader, err := os.Open("marioUp.png")
if err != nil {
log.Fatal(err)
}
rawMario, _, err := image.Decode(reader)
//marioUp := imaging.FlipH(imaging.Resize(rawMario, 16, 16, imaging.Lanczos))
marioUp := imaging.Resize(rawMario, 16, 16, imaging.Lanczos)
reader, err = os.Open("marioDown.png")
if err != nil {
log.Fatal(err)
}
rawMario, _, err = image.Decode(reader)
//marioDown := imaging.FlipH(imaging.Resize(rawMario, 16, 16, imaging.Lanczos))
marioDown := imaging.Resize(rawMario, 16, 16, imaging.Lanczos)
images := []image.Image{marioUp, marioDown}
return &Animation{
ctx: gg.NewContext(sz.X, sz.Y),
dir: image.Point{1, 1},
height: 8,
width: 8,
stroke: 8,
image: images,
updown: 0,
}
}
func (a *Animation) Next() (image.Image, <-chan time.Time, error) {
defer a.updatePosition()
a.ctx.SetColor(color.Black)
a.ctx.Clear()
//a.ctx.SetColor(color.RGBA{0, 255, 0, 255})
//a.ctx.DrawCircle(float64(8), float64(8), float64(a.stroke))
//a.ctx.Fill()
if a.dir.X == 1 {
a.ctx.DrawImageAnchored(a.image[a.updown], a.position.X, a.position.Y, 0.5, 0.5)
} else {
a.ctx.DrawImageAnchored(imaging.FlipH(a.image[a.updown]), a.position.X, a.position.Y, 0.5, 0.5)
}
a.ctx.SetColor(color.White)
a.ctx.DrawString("mario", 5, 9)
return a.ctx.Image(), time.After(time.Millisecond * 50), nil
}
func (a *Animation) updatePosition() {
a.position.X += 1 * a.dir.X
a.position.Y += 1 * a.dir.Y
if a.position.Y+a.height > a.ctx.Height() {
a.dir.Y = -1
a.updown = 0
} else if a.position.Y-a.height < 0 {
a.updown = 1
a.dir.Y = 1
}
if a.position.X+a.width > a.ctx.Width() {
a.dir.X = -1
} else if a.position.X-a.width < 0 {
a.dir.X = 1
}
log.Println("making animator")
go orchestrator(tk, mqMessages)
log.Println("I guess I'm at the end")
sigs := make(chan os.Signal, 1)
signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM)
done := make(chan bool, 1)
go func() {
sig := <-sigs
fmt.Println()
fmt.Println(sig)
done <- true
}()
fmt.Println("awaiting signal")
<-done
fmt.Println("exiting")
}

50
mqttcoms.go Normal file
View File

@@ -0,0 +1,50 @@
package main
import (
"fmt"
"log"
"os"
MQTT "github.com/eclipse/paho.mqtt.golang"
mqtt "github.com/eclipse/paho.mqtt.golang"
)
// contents of struct mostly don't matter for toolkit.
type incomingMessage struct {
Type string `json:"type"`
Image string `json:"image"`
}
// listens on topic for messages
func listener(mqMessages chan mqtt.Message) {
opts := setupMQTT()
client := MQTT.NewClient(opts)
topic := "home/rgbboard"
if token := client.Connect(); token.Wait() && token.Error() != nil {
log.Println(fmt.Sprintf("failed to connect to mq: %s", token.Error().Error()))
panic(token.Error())
}
log.Println("connected")
client.Subscribe(topic, 0, func(client mqtt.Client, msg mqtt.Message) {
log.Println("Receiving ", string(msg.Payload()), " on topic: ", msg.Topic())
mqMessages <- msg
})
}
// connection lost management
func onConnectionLostHandler(c MQTT.Client, reason error) {
log.Fatalf(reason.Error())
}
// setup connection to mqtt, topic to listen to, qos
func setupMQTT() *mqtt.ClientOptions {
opts := MQTT.NewClientOptions()
opts.AddBroker(fmt.Sprintf("tcp://%s:%s", os.Getenv("MQTTBROKER"), os.Getenv("MQTTPORT")))
opts.SetUsername(os.Getenv("MQTTUSER"))
opts.SetPassword(os.Getenv("MQTTPASSWORD"))
opts.SetClientID("rgbboard")
opts.SetAutoReconnect(true)
opts.SetConnectionLostHandler(onConnectionLostHandler)
return opts
}

BIN
test.db Normal file

Binary file not shown.