mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-13 05:08:59 +08:00
Add esp arduino core version to ESP420 repport
Bump version
This commit is contained in:
parent
d26f7af54e
commit
0bf8188570
@ -155,12 +155,27 @@ void ESP3DCommands::ESP420(int cmd_params_pos, ESP3DMessage* msg) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FW architecture
|
||||||
|
tmpstr = ESP3DSettings::TargetBoard();
|
||||||
|
if (!dispatchIdValue(json, "FW arch", tmpstr.c_str(), target, requestId,
|
||||||
|
false)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// SDK Version
|
// SDK Version
|
||||||
tmpstr = ESP.getSdkVersion();
|
tmpstr = ESP.getSdkVersion();
|
||||||
|
|
||||||
if (!dispatchIdValue(json, "SDK", tmpstr.c_str(), target, requestId, false)) {
|
if (!dispatchIdValue(json, "SDK", tmpstr.c_str(), target, requestId, false)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Arduino Version
|
||||||
|
tmpstr = ESP3DHal::arduinoVersion();
|
||||||
|
if (!dispatchIdValue(json, "Arduino", tmpstr.c_str(), target, requestId,
|
||||||
|
false)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Flash size
|
// Flash size
|
||||||
tmpstr = esp3d_string::formatBytes(ESP.getFlashChipSize());
|
tmpstr = esp3d_string::formatBytes(ESP.getFlashChipSize());
|
||||||
if (!dispatchIdValue(json, "flash size", tmpstr.c_str(), target, requestId,
|
if (!dispatchIdValue(json, "flash size", tmpstr.c_str(), target, requestId,
|
||||||
@ -728,13 +743,6 @@ void ESP3DCommands::ESP420(int cmd_params_pos, ESP3DMessage* msg) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FW architecture
|
|
||||||
tmpstr = ESP3DSettings::TargetBoard();
|
|
||||||
if (!dispatchIdValue(json, "FW arch", tmpstr.c_str(), target, requestId,
|
|
||||||
false)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// end of list
|
// end of list
|
||||||
if (json) {
|
if (json) {
|
||||||
if (!dispatch("]}", target, requestId, ESP3DMessageType::tail)) {
|
if (!dispatch("]}", target, requestId, ESP3DMessageType::tail)) {
|
||||||
|
@ -65,6 +65,26 @@ int ESP3DHal::analogRead(uint8_t pin) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* ESP3DHal::arduinoVersion() {
|
||||||
|
static String version = "";
|
||||||
|
#ifdef ARDUINO_ARCH_ESP32
|
||||||
|
version = ESP_ARDUINO_VERSION_MAJOR;
|
||||||
|
version += ".";
|
||||||
|
version += ESP_ARDUINO_VERSION_MINOR;
|
||||||
|
version += ".";
|
||||||
|
version += ESP_ARDUINO_VERSION_PATCH;
|
||||||
|
#endif // ARDUINO_ARCH_ESP32
|
||||||
|
|
||||||
|
#ifdef ARDUINO_ARCH_ESP8266
|
||||||
|
#ifdef ARDUINO_ESP8266_RELEASE
|
||||||
|
version = ARDUINO_ESP8266_RELEASE;
|
||||||
|
#else
|
||||||
|
version = ESP.getCoreVersion();
|
||||||
|
#endif // ARDUINO_ESP8266_RELEASE
|
||||||
|
#endif // ARDUINO_ARCH_ESP8266
|
||||||
|
return version.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
bool ESP3DHal::analogWrite(uint8_t pin, uint value) {
|
bool ESP3DHal::analogWrite(uint8_t pin, uint value) {
|
||||||
if (value > (_analogRange - 1)) {
|
if (value > (_analogRange - 1)) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -48,6 +48,7 @@ class ESP3DHal {
|
|||||||
static bool analogWrite(uint8_t pin, uint value);
|
static bool analogWrite(uint8_t pin, uint value);
|
||||||
static void analogWriteFreq(uint32_t freq);
|
static void analogWriteFreq(uint32_t freq);
|
||||||
static void analogRange(uint32_t range);
|
static void analogRange(uint32_t range);
|
||||||
|
static const char * arduinoVersion();
|
||||||
#if defined(ARDUINO_ARCH_ESP32)
|
#if defined(ARDUINO_ARCH_ESP32)
|
||||||
static TaskHandle_t xHandle;
|
static TaskHandle_t xHandle;
|
||||||
#endif // ARDUINO_ARCH_ESP32
|
#endif // ARDUINO_ARCH_ESP32
|
||||||
|
@ -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.a233"
|
#define FW_VERSION "3.0.0.a234"
|
||||||
#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