summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-04 03:52:52 -0500
committerJeff Carr <[email protected]>2025-10-04 03:52:52 -0500
commit455637d05718f7501b580db7852e1acc521b7c83 (patch)
treeefdd89f083902e81c81ca5d8607e120b212c212f /main.go
parent138b467849829da2348b3a13a797b6873b211cfb (diff)
add an auto-run optionv0.23.132
Diffstat (limited to 'main.go')
-rw-r--r--main.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/main.go b/main.go
index 49b02cb..a6c1506 100644
--- a/main.go
+++ b/main.go
@@ -6,6 +6,7 @@ import (
"fmt"
"os"
"path/filepath"
+ "time"
"go.wit.com/lib/fhelp"
"go.wit.com/lib/gadgets"
@@ -125,6 +126,17 @@ func main() {
me.Enable()
me.release.box.Enable()
+ if argv.AutoRun {
+ go startHTTP()
+ log.Info("Attempt to auto-run here. sleep 5")
+ time.Sleep(5 * time.Second)
+
+ buttonDisable()
+ doReleaseAll()
+ buttonEnable()
+ for {
+ }
+ }
// start the http server for polling status
startHTTP()
}