Mantis: move upload.sh into boards/atl/mantis-edu

This commit is contained in:
Julian Oes
2021-12-08 12:55:27 +01:00
committed by Daniel Agar
parent 73044c51f9
commit 372a0da987
2 changed files with 1 additions and 1 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ set(UPLOAD_NAME autopilot.px4)
add_custom_target(upload_wifi
COMMAND ${CMAKE_COMMAND} -E copy ${PX4_FW_NAME} ${UPLOAD_NAME}
COMMAND ${PX4_SOURCE_DIR}/Tools/atl/upload.sh ${UPLOAD_NAME}
COMMAND ${PX4_SOURCE_DIR}/boards/atl/mantis-edu/upload.sh ${UPLOAD_NAME}
DEPENDS ${PX4_FW_NAME}
COMMENT "uploading autopilot.px4 file"
USES_TERMINAL
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -e
PX4_BINARY_FILE="$1"
echo "uploading: $PX4_BINARY_FILE"
PX4_BINARY_FILE_SIZE=$(stat -c%s "$PX4_BINARY_FILE")
curl -v -F "image=@$PX4_BINARY_FILE" -H "Expect:" -H "File-Size:$PX4_BINARY_FILE_SIZE" http://192.168.42.1/cgi-bin/upload