Skip to content
Snippets Groups Projects
Commit 42057f1b authored by Egemnazarov, Ulukbek's avatar Egemnazarov, Ulukbek
Browse files

Fixed paths and commands

parent b2020079
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
source ~/.platformio/penv/bin/activate && pio run -e megaatmega2560 -t upload
\ No newline at end of file
#source ~/.platformio/penv/bin/activate && pio run -e megaatmega2560 -t upload
#!/bin/bash
# Define the project directory
PROJECT_DIR="/home/mola/Desktop/hps_mola_mola/New_Structure/Inside_Boat/Mola_Slave/"
# Navigate to the project directory
cd "$PROJECT_DIR" || { echo "Directory not found!"; exit 1; }
source ~/platformio-venv/bin/activate
# Initialize the project (optional, can be skipped if already initialized)
pio project init
# Compile the project
echo "Compiling the project..."
pio run
if [ $? -ne 0 ]; then
echo "Compilation failed!"
exit 1
fi
# Upload the compiled firmware to the device
echo "Uploading the firmware..."
pio run --target upload
if [ $? -ne 0 ]; then
echo "Upload failed!"
exit 1
fi
# Monitor the serial output (optional)
if [ "$1" == "--monitor" ]; then
echo "Opening serial monitor..."
pio device monitor
fi
echo "Done!"
......@@ -33,7 +33,7 @@ def button_restart_python():
def button_git_pull():
print('CMD: git pull')
try:
repo_path = '/home/MolaMola/Desktop/hps_mola_mola'
repo_path = '/home/mola/Desktop/hps_mola_mola/'
result = subprocess.run(['git', '-C', repo_path, 'pull'], capture_output=True, text=True)
if result.returncode == 0:
return jsonify({'message' : 'Success, pulled from repo', 'details':result.stdout})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment