mirror of https://github.com/arendst/Tasmota.git
Document CmndSetoptionBase()
This commit is contained in:
parent
d7de841a1b
commit
8ba0c9d1b7
|
@ -47,7 +47,7 @@ const char kTasmotaCommands[] PROGMEM = "|" // No prefix
|
|||
void (* const TasmotaCommand[])(void) PROGMEM = {
|
||||
&CmndBacklog, &CmndDelay, &CmndPower, &CmndStatus, &CmndState, &CmndSleep, &CmndUpgrade, &CmndUpgrade, &CmndOtaUrl,
|
||||
&CmndSeriallog, &CmndRestart, &CmndPowerOnState, &CmndPulsetime, &CmndBlinktime, &CmndBlinkcount, &CmndSavedata,
|
||||
&CmndSetoptionSO, &CmndSetoption, &CmndTemperatureResolution, &CmndHumidityResolution, &CmndPressureResolution, &CmndPowerResolution,
|
||||
&CmndSetoption, &CmndSetoption, &CmndTemperatureResolution, &CmndHumidityResolution, &CmndPressureResolution, &CmndPowerResolution,
|
||||
&CmndVoltageResolution, &CmndFrequencyResolution, &CmndCurrentResolution, &CmndEnergyResolution, &CmndWeightResolution,
|
||||
&CmndModule, &CmndModules, &CmndGpio, &CmndGpios, &CmndTemplate, &CmndPwm, &CmndPwmfrequency, &CmndPwmrange,
|
||||
&CmndButtonDebounce, &CmndSwitchDebounce, &CmndSyslog, &CmndLoghost, &CmndLogport, &CmndSerialSend, &CmndBaudrate, &CmndSerialConfig,
|
||||
|
@ -844,19 +844,17 @@ void CmndSavedata(void)
|
|||
ResponseCmndChar((Settings.save_data > 1) ? stemp1 : GetStateText(Settings.save_data));
|
||||
}
|
||||
|
||||
void CmndSetoptionSO(void)
|
||||
{
|
||||
void CmndSetoption(void) {
|
||||
snprintf_P(XdrvMailbox.command, CMDSZ, PSTR(D_CMND_SETOPTION)); // Rename result shortcut command SO to SetOption
|
||||
CmndSetoptionBase(1);
|
||||
}
|
||||
|
||||
void CmndSetoption(void)
|
||||
{
|
||||
CmndSetoptionBase(1);
|
||||
}
|
||||
|
||||
void CmndSetoptionBase(bool indexed)
|
||||
{
|
||||
void CmndSetoptionBase(bool indexed) {
|
||||
// Allow a command to access a single SetOption by it's command name
|
||||
// indexed = 0 : No index will be returned attached to the command
|
||||
// {"ClockDirection":"OFF"}
|
||||
// indexed = 1 : The SetOption index will be returned with the command
|
||||
// {"SetOption16":"OFF"}
|
||||
if (XdrvMailbox.index < 146) {
|
||||
uint32_t ptype;
|
||||
uint32_t pindex;
|
||||
|
|
Loading…
Reference in New Issue