Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Termux Shortcuts to start/stop LG360 Mapillary Interval Capture. Place contents in termux home .shortcuts directory. You can then add a shortcut to these scripts to the homescreen as a widget.
!/bin/sh
setoptions=`curl \ -X POST \ --header 'Content-Type: application/json' \ --data '{ "name": "camera.setOptions", "parameters": { "options": { "captureMode": "interval", "captureInterval": 2 } }}' \ http://192.168.43.1:6624/osc/commands/execute | jq '.state'`
startcapture=`curl \ -X POST \ --header 'Content-Type: application/json' \ --data '{"name": "camera.startCapture"}' \ http://192.168.43.1:6624/osc/commands/execute | jq '.state'`
termux-toast -g bottom "$setoptions - $startcapture"
#/bin/sh
stopcapture=`curl \ -X POST \ --header 'Content-Type: application/json' \ --data '{"name": "camera.stopCapture"}' \ http://192.168.43.1:6624/osc/commands/execute | jq '.state'`
termux-toast -g bottom "$stopcapture"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.