Set ESP8266 in the station mode
set-station-mode
@/set-station-mode
Set ESP8266 in the station mode
ERRpulse
Pulses if answer did not received
DONEpulse
Pulses when station mode setted successfully
struct State {
};
// clang-format off
{{ GENERATED_CODE }}
// clang-format on
void evaluate(Context ctx) {
if (!isInputDirty<input_SET>(ctx))
return;
auto dev = getValue<input_DEV>(ctx);
bool done = dev.wifi->setStationMode();
if (done) {
emitValue<output_DONE>(ctx, 1);
} else {
emitValue<output_ERR>(ctx, 1);
}
}