Added new targets to UI

This commit is contained in:
Magnus Persson 2022-10-16 10:16:16 +02:00
parent 9ce6d54b80
commit 7d4c42a47c
4 changed files with 13 additions and 5 deletions

View File

@ -869,7 +869,7 @@
$.getJSON(url, function (cfg) {
console.log( cfg );
if(cfg["platform"]=="esp32") {
if(cfg["platform"]=="esp32" || cfg["platform"]=="esp32c3") {
$('#ble').prop('disabled', false);
$("#ble").val(cfg["ble"]);
}

File diff suppressed because one or more lines are too long

View File

@ -87,7 +87,11 @@ void WebServerHandler::webHandleConfig() {
#if defined(ESP8266)
doc[PARAM_PLATFORM] = "esp8266";
#else
#elif defined(ESP32C3)
doc[PARAM_PLATFORM] = "esp32c3";
#elif defined(ESP32S2)
doc[PARAM_PLATFORM] = "esp32s3";
#else // esp32 mini
doc[PARAM_PLATFORM] = "esp32";
#endif
@ -267,7 +271,11 @@ void WebServerHandler::webHandleStatus() {
#if defined(ESP8266)
doc[PARAM_PLATFORM] = "esp8266";
#else
#elif defined(ESP32C3)
doc[PARAM_PLATFORM] = "esp32c3";
#elif defined(ESP32S2)
doc[PARAM_PLATFORM] = "esp32s3";
#else // esp32 mini
doc[PARAM_PLATFORM] = "esp32";
#endif

View File

@ -84,7 +84,7 @@ GET: /api/status
Retrive the current device status via an HTTP GET command. Payload is in JSON format.
* ``temp-format`` can be either ``C`` or ``F``
* ``platform`` can be either ``esp8266`` or ``esp32``
* ``platform`` can be either ``esp8266``, ``esp32c3``, ``esp32s2`` or ``esp32``
* ``temp-c`` will be set to -273 C if there is no temp sensor
* ``angle`` will be set to 0 if no valid angle is found and -1 if there is no gyro