Add ``CpuFrequency`` and ``FlashFrequency`` to status 0

- Add ``CpuFrequency`` to ``status 2``
- Add ``FlashFrequency`` to ``status 4``
This commit is contained in:
Theo Arends 2020-05-30 14:59:52 +02:00
parent 86fc34e612
commit 29070f1136
3 changed files with 13 additions and 8 deletions

View File

@ -68,3 +68,6 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
- Add support for VEML6075 UVA/UVB/UVINDEX Sensor by device111 (#8432) - Add support for VEML6075 UVA/UVB/UVINDEX Sensor by device111 (#8432)
- Add support for VEML7700 Ambient light intensity Sensor by device111 (#8432) - Add support for VEML7700 Ambient light intensity Sensor by device111 (#8432)
- Add Three Phase Export Active Energy to SDM630 driver - Add Three Phase Export Active Energy to SDM630 driver
- Add Zigbee options to ``ZbSend`` to write and report attributes
- Add ``CpuFrequency`` to ``status 2``
- Add ``FlashFrequency`` to ``status 4``

View File

@ -12,6 +12,8 @@
- Add wildcard pattern ``?`` for JSON matching in rules - Add wildcard pattern ``?`` for JSON matching in rules
- Add support for unique MQTTClient (and inherited fallback topic) by full Mac address using ``mqttclient DVES_%12X`` (#8300) - Add support for unique MQTTClient (and inherited fallback topic) by full Mac address using ``mqttclient DVES_%12X`` (#8300)
- Add Zigbee options to ``ZbSend`` to write and report attributes - Add Zigbee options to ``ZbSend`` to write and report attributes
- Add ``CpuFrequency`` to ``status 2``
- Add ``FlashFrequency`` to ``status 4``
### 8.3.1.1 20200518 ### 8.3.1.1 20200518

View File

@ -41,7 +41,7 @@ const char kTasmotaCommands[] PROGMEM = "|" // No prefix
D_CMND_SENSOR "|" D_CMND_DRIVER D_CMND_SENSOR "|" D_CMND_DRIVER
#ifdef ESP32 #ifdef ESP32
"|" D_CMND_TOUCH_CAL "|" D_CMND_TOUCH_THRES "|" D_CMND_TOUCH_NUM "|" D_CMND_TOUCH_CAL "|" D_CMND_TOUCH_THRES "|" D_CMND_TOUCH_NUM
#endif //ESP32 #endif //ESP32
; ;
void (* const TasmotaCommand[])(void) PROGMEM = { void (* const TasmotaCommand[])(void) PROGMEM = {
@ -65,10 +65,10 @@ void (* const TasmotaCommand[])(void) PROGMEM = {
#endif // USE_DEVICE_GROUPS_SEND #endif // USE_DEVICE_GROUPS_SEND
&CmndDevGroupShare, &CmndDevGroupStatus, &CmndDevGroupShare, &CmndDevGroupStatus,
#endif // USE_DEVICE_GROUPS #endif // USE_DEVICE_GROUPS
&CmndSensor, &CmndDriver &CmndSensor, &CmndDriver
#ifdef ESP32 #ifdef ESP32
,&CmndTouchCal, &CmndTouchThres, &CmndTouchNum ,&CmndTouchCal, &CmndTouchThres, &CmndTouchNum
#endif //ESP32 #endif //ESP32
}; };
const char kWifiConfig[] PROGMEM = const char kWifiConfig[] PROGMEM =
@ -444,14 +444,14 @@ void CmndStatus(void)
",\"" D_JSON_BOOTVERSION "\":%d" ",\"" D_JSON_BOOTVERSION "\":%d"
#endif #endif
",\"" D_JSON_COREVERSION "\":\"" ARDUINO_CORE_RELEASE "\",\"" D_JSON_SDKVERSION "\":\"%s\"," ",\"" D_JSON_COREVERSION "\":\"" ARDUINO_CORE_RELEASE "\",\"" D_JSON_SDKVERSION "\":\"%s\","
"\"Hardware\":\"%s\"" "\"CpuFrequency\":%d,\"Hardware\":\"%s\""
"%s}}"), "%s}}"),
my_version, my_image, GetBuildDateAndTime().c_str() my_version, my_image, GetBuildDateAndTime().c_str()
#ifdef ESP8266 #ifdef ESP8266
, ESP.getBootVersion() , ESP.getBootVersion()
#endif #endif
, ESP.getSdkVersion(), , ESP.getSdkVersion(),
GetDeviceHardware().c_str(), ESP.getCpuFreqMHz(), GetDeviceHardware().c_str(),
GetStatistics().c_str()); GetStatistics().c_str());
MqttPublishPrefixTopic_P(option, PSTR(D_CMND_STATUS "2")); MqttPublishPrefixTopic_P(option, PSTR(D_CMND_STATUS "2"));
} }
@ -476,7 +476,7 @@ void CmndStatus(void)
#ifdef ESP8266 #ifdef ESP8266
",\"" D_JSON_FLASHCHIPID "\":\"%06X\"" ",\"" D_JSON_FLASHCHIPID "\":\"%06X\""
#endif #endif
",\"" D_JSON_FLASHMODE "\":%d,\"" ",\"FlashFrequency\":%d,\"" D_JSON_FLASHMODE "\":%d,\""
D_JSON_FEATURES "\":[\"%08X\",\"%08X\",\"%08X\",\"%08X\",\"%08X\",\"%08X\",\"%08X\"]"), D_JSON_FEATURES "\":[\"%08X\",\"%08X\",\"%08X\",\"%08X\",\"%08X\",\"%08X\",\"%08X\"]"),
ESP_getSketchSize()/1024, ESP.getFreeSketchSpace()/1024, ESP_getFreeHeap()/1024, ESP_getSketchSize()/1024, ESP.getFreeSketchSpace()/1024, ESP_getFreeHeap()/1024,
#ifdef ESP32 #ifdef ESP32
@ -486,7 +486,7 @@ void CmndStatus(void)
#ifdef ESP8266 #ifdef ESP8266
, ESP.getFlashChipId() , ESP.getFlashChipId()
#endif #endif
, ESP.getFlashChipMode(), , ESP.getFlashChipSpeed()/1000000, ESP.getFlashChipMode(),
LANGUAGE_LCID, feature_drv1, feature_drv2, feature_sns1, feature_sns2, feature5, feature6); LANGUAGE_LCID, feature_drv1, feature_drv2, feature_sns1, feature_sns2, feature5, feature6);
XsnsDriverState(); XsnsDriverState();
ResponseAppend_P(PSTR(",\"Sensors\":")); ResponseAppend_P(PSTR(",\"Sensors\":"));
@ -1980,7 +1980,7 @@ void CmndTouchThres(void)
} }
void CmndTouchNum(void) void CmndTouchNum(void)
{ {
if (XdrvMailbox.payload >= 0) { if (XdrvMailbox.payload >= 0) {
if (XdrvMailbox.payload<32){ if (XdrvMailbox.payload<32){
TOUCH_BUTTON.hit_threshold = XdrvMailbox.payload; TOUCH_BUTTON.hit_threshold = XdrvMailbox.payload;