older framework support - chip_info.full_revision
this field was added to chip_info in esp-idf 4.4.4 => use "revision" for older frameworks versions
This commit is contained in:
@@ -939,7 +939,7 @@ void serializeInfo(JsonObject root)
|
||||
root[F("release")] = FPSTR(releaseString);
|
||||
root[F("rel")] = FPSTR(releaseString); //WLEDMM to add bin name
|
||||
|
||||
root[F("deviceId")] = getDeviceId();
|
||||
root[F("deviceId")] = getDeviceId();
|
||||
|
||||
JsonObject leds = root.createNestedObject("leds");
|
||||
leds[F("count")] = strip.getLengthTotal();
|
||||
|
||||
@@ -710,7 +710,11 @@ String generateDeviceFingerprint() {
|
||||
esp_chip_info(&chip_info);
|
||||
esp_efuse_mac_get_default((uint8_t*)fp);
|
||||
fp[1] ^= ESP.getFlashChipSize();
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 4, 3)
|
||||
fp[0] ^= chip_info.full_revision | (chip_info.model << 16);
|
||||
#else
|
||||
fp[0] ^= chip_info.revision | (chip_info.model << 16);
|
||||
#endif
|
||||
// mix in ADC calibration data:
|
||||
esp_adc_cal_characteristics_t ch;
|
||||
#if SOC_ADC_MAX_BITWIDTH == 13 // S2 has 13 bit ADC
|
||||
|
||||
Reference in New Issue
Block a user