speed, script update
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
config capture
|
config capture
|
||||||
option port /dev/ttyUSB0
|
option port /dev/ttyUSB0
|
||||||
option speed 115200
|
option speed 460800
|
||||||
option directory /tmp
|
option directory /tmp
|
||||||
option file camera.jpg
|
option file camera.jpg
|
||||||
option url https://meranie.bh.ttx.sk/upload/image
|
option url https://meranie.bh.ttx.sk/upload/image
|
||||||
|
|||||||
@@ -19,8 +19,10 @@ parse_capture() {
|
|||||||
config_get _file "$section" "file"
|
config_get _file "$section" "file"
|
||||||
config_get _url "$section" "url"
|
config_get _url "$section" "url"
|
||||||
|
|
||||||
|
echo $PROG --port $_port --speed $_speed --path $_dir --file $_file --capture
|
||||||
$PROG --port $_port --speed $_speed --path $_dir --file $_file --capture
|
$PROG --port $_port --speed $_speed --path $_dir --file $_file --capture
|
||||||
cd $_dir
|
cd $_dir
|
||||||
|
echo $CURL -X POST -F "submit=OK" -F "file=@camera.jpg" $_url
|
||||||
$CURL -X POST -F "submit=OK" -F "file=@camera.jpg" $_url
|
$CURL -X POST -F "submit=OK" -F "file=@camera.jpg" $_url
|
||||||
rm $_file
|
rm $_file
|
||||||
}
|
}
|
||||||
@@ -39,10 +41,12 @@ parse_post() {
|
|||||||
_hum=`$PROG --humidity`
|
_hum=`$PROG --humidity`
|
||||||
_pre=`$PROG --pressure`
|
_pre=`$PROG --pressure`
|
||||||
|
|
||||||
$_mqtt_prg -h $_host -t $_topic/temperature -m N:$_tmp
|
echo $_mqtt_prg -h $_host -t $_topic/temperature -m N:${_tmp}
|
||||||
$_mqtt_prg -h $_host -t $_topic/humidity -m N:$_hum
|
$_mqtt_prg -h $_host -t $_topic/temperature -m N:${_tmp}
|
||||||
$_mqtt_prg -h $_host -t $_topic/pressure -m N:$_pre
|
echo $_mqtt_prg -h $_host -t $_topic/humidity -m N:${_hum}
|
||||||
|
$_mqtt_prg -h $_host -t $_topic/humidity -m N:${_hum}
|
||||||
|
echo $_mqtt_prg -h $_host -t $_topic/pressure -m N:${_pre}
|
||||||
|
$_mqtt_prg -h $_host -t $_topic/pressure -m N:${_pre}}
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
|||||||
Reference in New Issue
Block a user