setDouble _usage fix

This commit is contained in:
Patrick Haßel 2024-04-12 10:16:15 +02:00
parent fa4cc287a3
commit 8b80a0e8e1
3 changed files with 3 additions and 6 deletions

View File

@ -14,8 +14,6 @@ void _debug();
void _reboot();
void _usage();
void _info();
void _wifi();

View File

@ -9,4 +9,6 @@ void consoleHandle(char *cmd);
bool patrix_command(char *cmd);
void _usage();
#endif

View File

@ -5,6 +5,7 @@
#include "sensors/DallasSensor.h"
#include "ArduPID.h"
#include "config.h"
#include "console.h"
#include <Arduino.h>
#define SENSOR_GPIO D4
@ -84,10 +85,6 @@ bool setDouble(const char *name, double *destinationPtr, double min, double max)
const char *valueStr = strtok(nullptr, "");
if (valueStr == nullptr) {
_usage();
return;
}
if (valueStr == nullptr) {
error("Missing value for \"%s\"", name);
return false;
}
double value = strtod(valueStr, nullptr);