Revert "feat(valve): Implement obstacle detection with configurable thresholds"

This reverts commit 3c2235733b.
This commit is contained in:
2025-07-11 00:35:19 +02:00
parent 3c2235733b
commit b937c52bcc
6 changed files with 8 additions and 152 deletions

View File

@@ -55,32 +55,6 @@ static int cmd_valve_set_end_curr_close(const struct shell *sh, size_t argc, cha
return 0;
}
static int cmd_valve_set_obs_curr_open(const struct shell *sh, size_t argc, char **argv)
{
if (argc != 2) {
shell_print(sh, "Usage: valve set_obs_curr_open <milliamps>");
return -EINVAL;
}
uint16_t current_ma = (uint16_t)atoi(argv[1]);
valve_set_obstacle_current_threshold_open(current_ma);
shell_print(sh, "Obstacle current threshold (open) set to %u mA.", current_ma);
return 0;
}
static int cmd_valve_set_obs_curr_close(const struct shell *sh, size_t argc, char **argv)
{
if (argc != 2) {
shell_print(sh, "Usage: valve set_obs_curr_close <milliamps>");
return -EINVAL;
}
uint16_t current_ma = (uint16_t)atoi(argv[1]);
valve_set_obstacle_current_threshold_close(current_ma);
shell_print(sh, "Obstacle current threshold (close) set to %u mA.", current_ma);
return 0;
}
static int cmd_valve_show(const struct shell *sh, size_t argc, char **argv)
{
const int label_width = 30;
@@ -98,16 +72,6 @@ static int cmd_valve_show(const struct shell *sh, size_t argc, char **argv)
label_width,
"End Current Threshold (Close):",
valve_get_end_current_threshold_close());
shell_print(sh,
"%*s %u mA",
label_width,
"Obstacle Current Threshold (Open):",
valve_get_obstacle_current_threshold_open());
shell_print(sh,
"%*s %u mA",
label_width,
"Obstacle Current Threshold (Close):",
valve_get_obstacle_current_threshold_close());
return 0;
}
@@ -122,14 +86,6 @@ SHELL_STATIC_SUBCMD_SET_CREATE(sub_valve_settings,
NULL,
"Set end current threshold for closing (mA)",
cmd_valve_set_end_curr_close),
SHELL_CMD(set_obs_curr_open,
NULL,
"Set obstacle current threshold for opening (mA)",
cmd_valve_set_obs_curr_open),
SHELL_CMD(set_obs_curr_close,
NULL,
"Set obstacle current threshold for closing (mA)",
cmd_valve_set_obs_curr_close),
SHELL_CMD(show, NULL, "Show valve configuration", cmd_valve_show),
SHELL_SUBCMD_SET_END);