Skip to content

Commit 42d77bb

Browse files
committed
Only reload telemetrix after params changed
1 parent fcbb7da commit 42d77bb

File tree

4 files changed

+7
-12
lines changed

4 files changed

+7
-12
lines changed

nodejs-backend/reload_params.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
#!/bin/bash
22

3-
source /opt/ros/humble/setup.bash
4-
source /home/mirte/mirte_ws/install/setup.bash
5-
# rosnode kill /mirte_telemetrix_mirte
6-
# rosparam delete /mirte
7-
# rosparam load /home/mirte/mirte_ws/src/mirte-ros-packages/mirte_telemetrix/config/mirte_user_config.yaml mirte
8-
# rosrun mirte_telemetrix ROS_telemetrix_api.py __name:=mirte_telemetrix_mirte
9-
sudo systemctl restart mirte-ros
10-
3+
# Killing telelmetrix node, which ROS will restart automtically (with the new params)
4+
pkill -f /opt/ros/humble/lib/mirte_telemetrix_cpp/mirte_telemetrix_cpp_node

vue-frontend/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"upload": "upload",
1717
"upload_confirm": "Are you sure you want to upload to the microcontroller?",
1818
"save": "save",
19-
"save_confirm": "Are you sure you want to update the hardware settings?",
19+
"save_confirm": "Are you sure you want to update the hardware settings? The changes will be visible after 10 seconds.",
2020
"name": "name",
2121
"pin": "pin",
2222
"add": "add",

vue-frontend/locales/nl.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"wiring": "Bekabeling",
1515
"microcontroller": "Microcontroller",
1616
"upload": "upload",
17-
"upload_confirm": "Weet je zeker dat je de microcontroller wilt uploaden?",
17+
"upload_confirm": "Weet je zeker dat je de microcontroller wilt uploaden? Na ongeveer 10 seconden zal de verandering zichtbaar zijn.",
1818
"save": "opslaan",
1919
"save_confirm": "Weet je zeker dat je de hardware instellingen wilt opslaan?",
2020
"name": "naam",

vue-frontend/src/views/Settings.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,9 @@ export default {
226226
})
227227
.then(res => res.text())
228228
.then(data => {
229-
console.log(data)
230-
this.busy = false
229+
// It takes about 5 seconds for telemetrix to reload
230+
// TODO: check this, rather than 10 secs
231+
setTimeout(() => window.location.href = window.location.origin, 10000);
231232
})
232233
}
233234
},

0 commit comments

Comments
 (0)