Skip to content

Instantly share code, notes, and snippets.

@andrewharvey
Created June 27, 2020 14:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewharvey/680e370e8ad66b745c1e9dd02c0b4d0f to your computer and use it in GitHub Desktop.
Save andrewharvey/680e370e8ad66b745c1e9dd02c0b4d0f to your computer and use it in GitHub Desktop.
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