feat: add Obico for Klipper to KIAUH #227
@@ -89,7 +89,7 @@ function moonraker_obico_setup_dialog() {
|
||||
|
|
||||
moonraker_obico_services=$(moonraker_obico_systemd)
|
||||
existing_moonraker_obico_count=$(echo "${moonraker_obico_services}" | wc -w )
|
||||
for service in ${moonraker_obico_services}; do
|
||||
moonraker_obico_names+=( "$(get_instance_name "${service}" moonraker_obico)" )
|
||||
This variable seems to be unused? ```ssh
local log="${KLIPPER_LOGS}"
```
This variable seems to be unused?
Another good catch. I guess I planed to use it but ended up using Another good catch. I guess I planed to use it but ended up using `"${KLIPPER_LOGS}"` directly. Feel free to remove it.
Can this variable be local? Or is it required to be global? I see it only being used inside the Can this variable be local? Or is it required to be global? I see it only being used inside the `moonraker_obico_needs_linking` function
This variable seems to be unused now? This variable seems to be unused now?
See comment above :) See comment above :)
See comment above :) See comment above :)
|
||||
moonraker_obico_names+=( "$(get_instance_name "${service}" moonraker-obico)" )
|
||||
This variable seems to be unused? ```ssh
local log="${KLIPPER_LOGS}"
```
This variable seems to be unused?
Another good catch. I guess I planed to use it but ended up using Another good catch. I guess I planed to use it but ended up using `"${KLIPPER_LOGS}"` directly. Feel free to remove it.
Can this variable be local? Or is it required to be global? I see it only being used inside the Can this variable be local? Or is it required to be global? I see it only being used inside the `moonraker_obico_needs_linking` function
This variable seems to be unused now? This variable seems to be unused now?
See comment above :) See comment above :)
See comment above :) See comment above :)
|
||||
done
|
||||
|
||||
local allowed_moonraker_obico_count=$(( moonraker_count - existing_moonraker_obico_count ))
|
||||
I'm unsure about the usage of this variable. It seems to be not used anywhere? Is it used somewhere else as it is not declared as a local variable? ```ssh
new_moonraker_obico_count=1
```
I'm unsure about the usage of this variable. It seems to be not used anywhere? Is it used somewhere else as it is not declared as a local variable?
Good catch. It's a bug! Do you want me to push this change? Good catch. It's a bug! Do you want me to push this change?
```
diff --git a/scripts/obico.sh b/scripts/obico.sh
index 791fcdb..de2bd3f 100644
--- a/scripts/obico.sh
+++ b/scripts/obico.sh
@@ -98,7 +98,6 @@ function moonraker_obico_setup_dialog() {
### Step 1: Ask for the number of moonraker-obico instances to install
if (( moonraker_count == 1 )); then
ok_msg "Moonraker installation found!\n"
- new_moonraker_obico_count=1
elif (( moonraker_count > 1 )); then
top_border
printf "|${green}%-55s${white}|\n" " ${moonraker_count} Moonraker instances found!"
@@ -134,7 +133,7 @@ function moonraker_obico_setup_dialog() {
(( new_moonraker_obico_count > allowed_moonraker_obico_count )) && error_msg "Number of Moonraker-obico instances larger than installed Moonraker instances"
done && select_msg "${new_moonraker_obico_count}"
else
- log_error "Internal error. new_moonraker_obico_count of '${new_moonraker_obico_count}' not equal or grather than one!"
+ log_error "Internal error. moonraker_count of '${moonraker_count}' not equal or grather than one!"
return 1
fi
```
|
||||
@@ -109,7 +109,7 @@ function moonraker_obico_setup_dialog() {
|
||||
This variable seems to be unused? ```ssh
local log="${KLIPPER_LOGS}"
```
This variable seems to be unused?
This variable seems to be unused? ```ssh
local log="${KLIPPER_LOGS}"
```
This variable seems to be unused?
Another good catch. I guess I planed to use it but ended up using Another good catch. I guess I planed to use it but ended up using `"${KLIPPER_LOGS}"` directly. Feel free to remove it.
Another good catch. I guess I planed to use it but ended up using Another good catch. I guess I planed to use it but ended up using `"${KLIPPER_LOGS}"` directly. Feel free to remove it.
Can this variable be local? Or is it required to be global? I see it only being used inside the Can this variable be local? Or is it required to be global? I see it only being used inside the `moonraker_obico_needs_linking` function
Can this variable be local? Or is it required to be global? I see it only being used inside the Can this variable be local? Or is it required to be global? I see it only being used inside the `moonraker_obico_needs_linking` function
This variable seems to be unused now? This variable seems to be unused now?
This variable seems to be unused now? This variable seems to be unused now?
See comment above :) See comment above :)
See comment above :) See comment above :)
See comment above :) See comment above :)
See comment above :) See comment above :)
|
||||
if (( existing_moonraker_obico_count > 0 )); then
|
||||
printf "|${green}%-55s${white}|\n" " ${existing_moonraker_obico_count} Moonraker-obico instances already installed!"
|
||||
for name in "${moonraker_obico_names[@]}"; do
|
||||
printf "|${cyan}%-57s${white}|\n" " ●moonrakerobico-${name}"
|
||||
This variable seems to be unused? ```ssh
local log="${KLIPPER_LOGS}"
```
This variable seems to be unused?
Another good catch. I guess I planed to use it but ended up using Another good catch. I guess I planed to use it but ended up using `"${KLIPPER_LOGS}"` directly. Feel free to remove it.
Can this variable be local? Or is it required to be global? I see it only being used inside the Can this variable be local? Or is it required to be global? I see it only being used inside the `moonraker_obico_needs_linking` function
This variable seems to be unused now? This variable seems to be unused now?
See comment above :) See comment above :)
See comment above :) See comment above :)
|
||||
printf "|${cyan}%-57s${white}|\n" " ●moonraker-obico-${name}"
|
||||
This variable seems to be unused? ```ssh
local log="${KLIPPER_LOGS}"
```
This variable seems to be unused?
Another good catch. I guess I planed to use it but ended up using Another good catch. I guess I planed to use it but ended up using `"${KLIPPER_LOGS}"` directly. Feel free to remove it.
Can this variable be local? Or is it required to be global? I see it only being used inside the Can this variable be local? Or is it required to be global? I see it only being used inside the `moonraker_obico_needs_linking` function
This variable seems to be unused now? This variable seems to be unused now?
See comment above :) See comment above :)
See comment above :) See comment above :)
|
||||
done
|
||||
fi
|
||||
blank_line
|
||||
@@ -206,7 +206,7 @@ function moonraker_obico_setup_dialog() {
|
||||
This variable seems to be unused? ```ssh
local log="${KLIPPER_LOGS}"
```
This variable seems to be unused?
This variable seems to be unused? ```ssh
local log="${KLIPPER_LOGS}"
```
This variable seems to be unused?
Another good catch. I guess I planed to use it but ended up using Another good catch. I guess I planed to use it but ended up using `"${KLIPPER_LOGS}"` directly. Feel free to remove it.
Another good catch. I guess I planed to use it but ended up using Another good catch. I guess I planed to use it but ended up using `"${KLIPPER_LOGS}"` directly. Feel free to remove it.
Can this variable be local? Or is it required to be global? I see it only being used inside the Can this variable be local? Or is it required to be global? I see it only being used inside the `moonraker_obico_needs_linking` function
Can this variable be local? Or is it required to be global? I see it only being used inside the Can this variable be local? Or is it required to be global? I see it only being used inside the `moonraker_obico_needs_linking` function
This variable seems to be unused now? This variable seems to be unused now?
This variable seems to be unused now? This variable seems to be unused now?
See comment above :) See comment above :)
See comment above :) See comment above :)
See comment above :) See comment above :)
See comment above :) See comment above :)
|
||||
local not_linked_instances=()
|
||||
# Refetch systemd service again since additional services may have been newly installed
|
||||
for service in $(moonraker_obico_systemd); do
|
||||
local instance_name="$(get_instance_name "${service}" moonraker_obico)"
|
||||
This variable seems to be unused? ```ssh
local log="${KLIPPER_LOGS}"
```
This variable seems to be unused?
Another good catch. I guess I planed to use it but ended up using Another good catch. I guess I planed to use it but ended up using `"${KLIPPER_LOGS}"` directly. Feel free to remove it.
Can this variable be local? Or is it required to be global? I see it only being used inside the Can this variable be local? Or is it required to be global? I see it only being used inside the `moonraker_obico_needs_linking` function
This variable seems to be unused now? This variable seems to be unused now?
See comment above :) See comment above :)
See comment above :) See comment above :)
|
||||
local instance_name="$(get_instance_name "${service}" moonraker-obico)"
|
||||
This variable seems to be unused? ```ssh
local log="${KLIPPER_LOGS}"
```
This variable seems to be unused?
Another good catch. I guess I planed to use it but ended up using Another good catch. I guess I planed to use it but ended up using `"${KLIPPER_LOGS}"` directly. Feel free to remove it.
Can this variable be local? Or is it required to be global? I see it only being used inside the Can this variable be local? Or is it required to be global? I see it only being used inside the `moonraker_obico_needs_linking` function
This variable seems to be unused now? This variable seems to be unused now?
See comment above :) See comment above :)
See comment above :) See comment above :)
|
||||
if ! is_moonraker_obico_linked "${instance_name}"; then
|
||||
not_linked_instances+=( "${instance_name}" )
|
||||
fi
|
||||
@@ -218,7 +218,7 @@ function moonraker_obico_setup_dialog() {
|
||||
This variable seems to be unused? ```ssh
local log="${KLIPPER_LOGS}"
```
This variable seems to be unused?
This variable seems to be unused? ```ssh
local log="${KLIPPER_LOGS}"
```
This variable seems to be unused?
Another good catch. I guess I planed to use it but ended up using Another good catch. I guess I planed to use it but ended up using `"${KLIPPER_LOGS}"` directly. Feel free to remove it.
Another good catch. I guess I planed to use it but ended up using Another good catch. I guess I planed to use it but ended up using `"${KLIPPER_LOGS}"` directly. Feel free to remove it.
Can this variable be local? Or is it required to be global? I see it only being used inside the Can this variable be local? Or is it required to be global? I see it only being used inside the `moonraker_obico_needs_linking` function
Can this variable be local? Or is it required to be global? I see it only being used inside the Can this variable be local? Or is it required to be global? I see it only being used inside the `moonraker_obico_needs_linking` function
This variable seems to be unused now? This variable seems to be unused now?
This variable seems to be unused now? This variable seems to be unused now?
See comment above :) See comment above :)
See comment above :) See comment above :)
See comment above :) See comment above :)
See comment above :) See comment above :)
|
||||
else
|
||||
printf "|${green}%-55s${white}|\n" " ${#not_linked_instances[@]} Moonraker-obico instances not linked to the server!"
|
||||
for name in "${not_linked_instances[@]}"; do
|
||||
printf "|${cyan}%-57s${white}|\n" " ●moonrakerobico-${name}"
|
||||
This variable seems to be unused? ```ssh
local log="${KLIPPER_LOGS}"
```
This variable seems to be unused?
Another good catch. I guess I planed to use it but ended up using Another good catch. I guess I planed to use it but ended up using `"${KLIPPER_LOGS}"` directly. Feel free to remove it.
Can this variable be local? Or is it required to be global? I see it only being used inside the Can this variable be local? Or is it required to be global? I see it only being used inside the `moonraker_obico_needs_linking` function
This variable seems to be unused now? This variable seems to be unused now?
See comment above :) See comment above :)
See comment above :) See comment above :)
|
||||
printf "|${cyan}%-57s${white}|\n" " ●moonraker-obico-${name}"
|
||||
This variable seems to be unused? ```ssh
local log="${KLIPPER_LOGS}"
```
This variable seems to be unused?
Another good catch. I guess I planed to use it but ended up using Another good catch. I guess I planed to use it but ended up using `"${KLIPPER_LOGS}"` directly. Feel free to remove it.
Can this variable be local? Or is it required to be global? I see it only being used inside the Can this variable be local? Or is it required to be global? I see it only being used inside the `moonraker_obico_needs_linking` function
This variable seems to be unused now? This variable seems to be unused now?
See comment above :) See comment above :)
See comment above :) See comment above :)
|
||||
done
|
||||
fi
|
||||
blank_line
|
||||
@@ -376,7 +376,7 @@ function get_moonraker_obico_status() {
|
||||
This variable seems to be unused? ```ssh
local log="${KLIPPER_LOGS}"
```
This variable seems to be unused?
This variable seems to be unused? ```ssh
local log="${KLIPPER_LOGS}"
```
This variable seems to be unused?
Another good catch. I guess I planed to use it but ended up using Another good catch. I guess I planed to use it but ended up using `"${KLIPPER_LOGS}"` directly. Feel free to remove it.
Another good catch. I guess I planed to use it but ended up using Another good catch. I guess I planed to use it but ended up using `"${KLIPPER_LOGS}"` directly. Feel free to remove it.
Can this variable be local? Or is it required to be global? I see it only being used inside the Can this variable be local? Or is it required to be global? I see it only being used inside the `moonraker_obico_needs_linking` function
Can this variable be local? Or is it required to be global? I see it only being used inside the Can this variable be local? Or is it required to be global? I see it only being used inside the `moonraker_obico_needs_linking` function
This variable seems to be unused now? This variable seems to be unused now?
This variable seems to be unused now? This variable seems to be unused now?
See comment above :) See comment above :)
See comment above :) See comment above :)
See comment above :) See comment above :)
See comment above :) See comment above :)
|
||||
else
|
||||
status="Installed!"
|
||||
for service in ${moonraker_obico_services}; do
|
||||
if ! is_moonraker_obico_linked "$(get_instance_name "${service}" moonraker_obico)"; then
|
||||
This variable seems to be unused? ```ssh
local log="${KLIPPER_LOGS}"
```
This variable seems to be unused?
Another good catch. I guess I planed to use it but ended up using Another good catch. I guess I planed to use it but ended up using `"${KLIPPER_LOGS}"` directly. Feel free to remove it.
Can this variable be local? Or is it required to be global? I see it only being used inside the Can this variable be local? Or is it required to be global? I see it only being used inside the `moonraker_obico_needs_linking` function
This variable seems to be unused now? This variable seems to be unused now?
See comment above :) See comment above :)
See comment above :) See comment above :)
|
||||
if ! is_moonraker_obico_linked "$(get_instance_name "${service}" moonraker-obico)"; then
|
||||
This variable seems to be unused? ```ssh
local log="${KLIPPER_LOGS}"
```
This variable seems to be unused?
Another good catch. I guess I planed to use it but ended up using Another good catch. I guess I planed to use it but ended up using `"${KLIPPER_LOGS}"` directly. Feel free to remove it.
Can this variable be local? Or is it required to be global? I see it only being used inside the Can this variable be local? Or is it required to be global? I see it only being used inside the `moonraker_obico_needs_linking` function
This variable seems to be unused now? This variable seems to be unused now?
See comment above :) See comment above :)
See comment above :) See comment above :)
|
||||
status="Not linked!"
|
||||
fi
|
||||
done
|
||||
|
||||
This variable seems to be unused? ```ssh
local log="${KLIPPER_LOGS}"
```
This variable seems to be unused?
This variable seems to be unused? ```ssh
local log="${KLIPPER_LOGS}"
```
This variable seems to be unused?
Another good catch. I guess I planed to use it but ended up using Another good catch. I guess I planed to use it but ended up using `"${KLIPPER_LOGS}"` directly. Feel free to remove it.
Another good catch. I guess I planed to use it but ended up using Another good catch. I guess I planed to use it but ended up using `"${KLIPPER_LOGS}"` directly. Feel free to remove it.
Can this variable be local? Or is it required to be global? I see it only being used inside the Can this variable be local? Or is it required to be global? I see it only being used inside the `moonraker_obico_needs_linking` function
Can this variable be local? Or is it required to be global? I see it only being used inside the Can this variable be local? Or is it required to be global? I see it only being used inside the `moonraker_obico_needs_linking` function
This variable seems to be unused now? This variable seems to be unused now?
This variable seems to be unused now? This variable seems to be unused now?
See comment above :) See comment above :)
See comment above :) See comment above :)
See comment above :) See comment above :)
See comment above :) See comment above :)
|
||||
This variable seems to be unused?
This variable seems to be unused?
Another good catch. I guess I planed to use it but ended up using
"${KLIPPER_LOGS}"directly. Feel free to remove it.Another good catch. I guess I planed to use it but ended up using
"${KLIPPER_LOGS}"directly. Feel free to remove it.Can this variable be local? Or is it required to be global? I see it only being used inside the
moonraker_obico_needs_linkingfunctionCan this variable be local? Or is it required to be global? I see it only being used inside the
moonraker_obico_needs_linkingfunctionThis variable seems to be unused now?
This variable seems to be unused now?
See comment above :)
See comment above :)
See comment above :)
See comment above :)