👍️[Update] Mainl: endpointの命名規則を修正

This commit is contained in:
misyaguziya
2024-09-24 11:51:57 +09:00
parent 80b57612bc
commit e129fd308b
24 changed files with 462 additions and 460 deletions

View File

@@ -7,24 +7,24 @@ export const useMicThreshold = () => {
const { updateEnableAutomaticMicThreshold, currentEnableAutomaticMicThreshold, pendingEnableAutomaticMicThreshold } = useStore_EnableAutomaticMicThreshold();
const getMicThreshold = () => {
asyncStdoutToPython("/get/mic_energy_threshold");
asyncStdoutToPython("/get/data/mic_threshold");
};
const setMicThreshold = (mic_threshold) => {
asyncStdoutToPython("/set/mic_energy_threshold", mic_threshold);
asyncStdoutToPython("/set/data/mic_threshold", mic_threshold);
};
const getEnableAutomaticMicThreshold = () => {
pendingEnableAutomaticMicThreshold();
asyncStdoutToPython("/get/mic_dynamic_energy_threshold");
asyncStdoutToPython("/get/data/mic_automatic_threshold");
};
const toggleEnableAutomaticMicThreshold = () => {
pendingEnableAutomaticMicThreshold();
if (currentEnableAutomaticMicThreshold.data) {
asyncStdoutToPython("/set/disable_mic_dynamic_energy_threshold");
asyncStdoutToPython("/set/disable/mic_automatic_threshold");
} else {
asyncStdoutToPython("/set/enable_mic_dynamic_energy_threshold");
asyncStdoutToPython("/set/enable/mic_automatic_threshold");
}
};