mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-16 10:15:55 +08:00
Fix dead loop of functions calling them self instead of arduino one in Hal
Add missing `ok` in ESP201
This commit is contained in:
parent
0567f717dc
commit
4a1f1c72e8
@ -107,7 +107,7 @@ bool Commands::ESP201(const char* cmd_params, level_authenticate_type auth_type,
|
||||
if (!Hal::analogWrite(pin, value)) {
|
||||
output->printERROR ("Invalid value!");
|
||||
response = false;
|
||||
}
|
||||
} else output->printMSG ("ok");
|
||||
} else {
|
||||
output->printERROR ("Invalid parameter!");
|
||||
response = false;
|
||||
|
@ -61,7 +61,7 @@ void Hal::pinMode(uint8_t pin, uint8_t mode)
|
||||
{
|
||||
#if defined (ARDUINO_ARCH_ESP8266)
|
||||
if ((pin == 16) && (mode == INPUT_PULLUP)) {
|
||||
pinMode(pin, INPUT_PULLDOWN_16);
|
||||
::pinMode(pin, INPUT_PULLDOWN_16);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@ -104,9 +104,9 @@ int Hal::analogRead(uint8_t pin)
|
||||
{
|
||||
#ifdef ARDUINO_ARCH_ESP8266 //only one ADC on ESP8266 A0
|
||||
(void)pin;
|
||||
return analogRead (A0);
|
||||
return ::analogRead (A0);
|
||||
#else
|
||||
return analogRead (pin);
|
||||
return ::analogRead (pin);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ bool Hal::analogWrite(uint8_t pin, uint value)
|
||||
return false;
|
||||
}
|
||||
#ifdef ARDUINO_ARCH_ESP8266
|
||||
analogWrite(pin, value);
|
||||
::analogWrite(pin, value);
|
||||
#endif //ARDUINO_ARCH_ESP8266
|
||||
#ifdef ARDUINO_ARCH_ESP32
|
||||
int channel = getAnalogWriteChannel(pin);
|
||||
@ -171,14 +171,14 @@ void Hal::analogWriteFreq(uint32_t freq)
|
||||
{
|
||||
_analogWriteFreq = freq;
|
||||
#ifdef ARDUINO_ARCH_ESP8266
|
||||
analogWriteFreq(_analogWriteFreq);
|
||||
::analogWriteFreq(_analogWriteFreq);
|
||||
#endif //ARDUINO_ARCH_ESP8266
|
||||
}
|
||||
void Hal::analogWriteRange(uint32_t range)
|
||||
{
|
||||
_analogWriteRange = range;
|
||||
#ifdef ARDUINO_ARCH_ESP8266
|
||||
analogWriteRange(_analogWriteRange);
|
||||
::analogWriteRange(_analogWriteRange);
|
||||
#endif //ARDUINO_ARCH_ESP8266
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#define _VERSION_ESP3D_H
|
||||
|
||||
//version and sources location
|
||||
#define FW_VERSION "3.0.0.a78"
|
||||
#define FW_VERSION "3.0.0.a79"
|
||||
#define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"
|
||||
|
||||
#endif //_VERSION_ESP3D_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user