mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-17 18:55:52 +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)) {
|
if (!Hal::analogWrite(pin, value)) {
|
||||||
output->printERROR ("Invalid value!");
|
output->printERROR ("Invalid value!");
|
||||||
response = false;
|
response = false;
|
||||||
}
|
} else output->printMSG ("ok");
|
||||||
} else {
|
} else {
|
||||||
output->printERROR ("Invalid parameter!");
|
output->printERROR ("Invalid parameter!");
|
||||||
response = false;
|
response = false;
|
||||||
|
@ -61,7 +61,7 @@ void Hal::pinMode(uint8_t pin, uint8_t mode)
|
|||||||
{
|
{
|
||||||
#if defined (ARDUINO_ARCH_ESP8266)
|
#if defined (ARDUINO_ARCH_ESP8266)
|
||||||
if ((pin == 16) && (mode == INPUT_PULLUP)) {
|
if ((pin == 16) && (mode == INPUT_PULLUP)) {
|
||||||
pinMode(pin, INPUT_PULLDOWN_16);
|
::pinMode(pin, INPUT_PULLDOWN_16);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -104,9 +104,9 @@ int Hal::analogRead(uint8_t pin)
|
|||||||
{
|
{
|
||||||
#ifdef ARDUINO_ARCH_ESP8266 //only one ADC on ESP8266 A0
|
#ifdef ARDUINO_ARCH_ESP8266 //only one ADC on ESP8266 A0
|
||||||
(void)pin;
|
(void)pin;
|
||||||
return analogRead (A0);
|
return ::analogRead (A0);
|
||||||
#else
|
#else
|
||||||
return analogRead (pin);
|
return ::analogRead (pin);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ bool Hal::analogWrite(uint8_t pin, uint value)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#ifdef ARDUINO_ARCH_ESP8266
|
#ifdef ARDUINO_ARCH_ESP8266
|
||||||
analogWrite(pin, value);
|
::analogWrite(pin, value);
|
||||||
#endif //ARDUINO_ARCH_ESP8266
|
#endif //ARDUINO_ARCH_ESP8266
|
||||||
#ifdef ARDUINO_ARCH_ESP32
|
#ifdef ARDUINO_ARCH_ESP32
|
||||||
int channel = getAnalogWriteChannel(pin);
|
int channel = getAnalogWriteChannel(pin);
|
||||||
@ -171,14 +171,14 @@ void Hal::analogWriteFreq(uint32_t freq)
|
|||||||
{
|
{
|
||||||
_analogWriteFreq = freq;
|
_analogWriteFreq = freq;
|
||||||
#ifdef ARDUINO_ARCH_ESP8266
|
#ifdef ARDUINO_ARCH_ESP8266
|
||||||
analogWriteFreq(_analogWriteFreq);
|
::analogWriteFreq(_analogWriteFreq);
|
||||||
#endif //ARDUINO_ARCH_ESP8266
|
#endif //ARDUINO_ARCH_ESP8266
|
||||||
}
|
}
|
||||||
void Hal::analogWriteRange(uint32_t range)
|
void Hal::analogWriteRange(uint32_t range)
|
||||||
{
|
{
|
||||||
_analogWriteRange = range;
|
_analogWriteRange = range;
|
||||||
#ifdef ARDUINO_ARCH_ESP8266
|
#ifdef ARDUINO_ARCH_ESP8266
|
||||||
analogWriteRange(_analogWriteRange);
|
::analogWriteRange(_analogWriteRange);
|
||||||
#endif //ARDUINO_ARCH_ESP8266
|
#endif //ARDUINO_ARCH_ESP8266
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#define _VERSION_ESP3D_H
|
#define _VERSION_ESP3D_H
|
||||||
|
|
||||||
//version and sources location
|
//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"
|
#define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"
|
||||||
|
|
||||||
#endif //_VERSION_ESP3D_H
|
#endif //_VERSION_ESP3D_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user