add automatic flash script
This commit is contained in:
parent
d2085041c6
commit
fb80090d1b
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
do_this_on_ctrl_c(){
|
||||||
|
echo "Stopped searching!"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
trap 'do_this_on_ctrl_c' SIGINT
|
||||||
|
|
||||||
|
printf "ip: %s" "$1"
|
||||||
|
printf "\n%s" "waiting for Device ..."
|
||||||
|
while ! ping -c 1 -n -w 1 $1 &> /dev/null
|
||||||
|
do
|
||||||
|
printf "%c" "."
|
||||||
|
done
|
||||||
|
printf "\n%s\n" "Device is online"
|
||||||
|
pio run -t upload --upload-port $1
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
#define OTA_WIFI_SSID "Chaos-West temp alternative"
|
#define OTA_WIFI_SSID "Chaos-West temp alternative"
|
||||||
#define OTA_WIFI_PASSWORD ""
|
#define OTA_WIFI_PASSWORD ""
|
||||||
#define OTA_WAIT_TIMEOUT 1000 // in 0.1s increments -> 10s
|
#define OTA_WAIT_TIMEOUT 20 // in 0.1s increments -> 10s
|
||||||
#define OTA_PASSWORD "MCH2022OTA" //password needed for ota flashing
|
#define OTA_PASSWORD "MCH2022OTA" //password needed for ota flashing
|
||||||
|
|
||||||
void checkOTA();
|
void checkOTA();
|
||||||
|
|
Loading…
Reference in New Issue