Skip to content

Tasmota changes #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/install-arduino-core-esp32.sh
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ if [ ! -d "$ARDUINO_ESP32_PATH" ]; then
ln -s $GITHUB_WORKSPACE esp32
else
echo "Cloning Core Repository..."
git clone https://github.com/espressif/arduino-esp32.git esp32 > /dev/null 2>&1
git clone https://github.com/tasmota/arduino-esp32.git esp32 > /dev/null 2>&1
fi

#echo "Updating Submodules ..."
10 changes: 0 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -90,11 +90,6 @@ set(LIBRARY_SRCS
libraries/I2S/src/I2S.cpp
libraries/NetBIOS/src/NetBIOS.cpp
libraries/Preferences/src/Preferences.cpp
libraries/RainMaker/src/RMaker.cpp
libraries/RainMaker/src/RMakerNode.cpp
libraries/RainMaker/src/RMakerParam.cpp
libraries/RainMaker/src/RMakerDevice.cpp
libraries/RainMaker/src/RMakerType.cpp
libraries/SD_MMC/src/SD_MMC.cpp
libraries/SD/src/SD.cpp
libraries/SD/src/sd_diskio.cpp
@@ -184,7 +179,6 @@ set(includedirs
libraries/I2S/src
libraries/NetBIOS/src
libraries/Preferences/src
libraries/RainMaker/src
libraries/SD_MMC/src
libraries/SD/src
libraries/SimpleBLE/src
@@ -239,10 +233,6 @@ endfunction()

maybe_add_component(esp-dsp)

if(CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK)
maybe_add_component(esp_rainmaker)
maybe_add_component(qrcode)
endif()
if(IDF_TARGET MATCHES "esp32s2|esp32s3" AND CONFIG_TINYUSB_ENABLED)
maybe_add_component(arduino_tinyusb)
endif()
14 changes: 9 additions & 5 deletions cores/esp32/Esp.cpp
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ extern "C" {
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/rom/spi_flash.h"
#define ESP_FLASH_IMAGE_BASE 0x0000 // Esp32c3 is located at 0x0000
#else
#else
#error Target CONFIG_IDF_TARGET is not supported
#endif
#else // ESP32 Before IDF 4.0
@@ -192,7 +192,7 @@ static uint32_t sketchSize(sketchSize_t response) {
return data.image_len;
}
}

uint32_t EspClass::getSketchSize () {
return sketchSize(SKETCH_SIZE_TOTAL);
}
@@ -231,6 +231,10 @@ String EspClass::getSketchMD5()
md5.add(buf.get(), readBytes);
lengthLeft -= readBytes;
offset += readBytes;

#if CONFIG_FREERTOS_UNICORE
delay(1); // Fix solo WDT
#endif
}
md5.calculate();
result = md5.toString();
@@ -391,17 +395,17 @@ bool EspClass::flashRead(uint32_t offset, uint32_t *data, size_t size)
return spi_flash_read(offset, (uint32_t*) data, size) == ESP_OK;
}

bool EspClass::partitionEraseRange(const esp_partition_t *partition, uint32_t offset, size_t size)
bool EspClass::partitionEraseRange(const esp_partition_t *partition, uint32_t offset, size_t size)
{
return esp_partition_erase_range(partition, offset, size) == ESP_OK;
}

bool EspClass::partitionWrite(const esp_partition_t *partition, uint32_t offset, uint32_t *data, size_t size)
bool EspClass::partitionWrite(const esp_partition_t *partition, uint32_t offset, uint32_t *data, size_t size)
{
return esp_partition_write(partition, offset, data, size) == ESP_OK;
}

bool EspClass::partitionRead(const esp_partition_t *partition, uint32_t offset, uint32_t *data, size_t size)
bool EspClass::partitionRead(const esp_partition_t *partition, uint32_t offset, uint32_t *data, size_t size)
{
return esp_partition_read(partition, offset, data, size) == ESP_OK;
}
2 changes: 1 addition & 1 deletion libraries/ESP32/examples/RMT/RMTCallback/RMTCallback.ino
Original file line number Diff line number Diff line change
@@ -64,4 +64,4 @@ void loop()
{
Serial.printf("GPIO 4: %08x 5: %08x 10: %08x\n", mp1.val(), mp2.val(), mp3.val());
delay(500);
}
}
26 changes: 1 addition & 25 deletions libraries/FS/src/vfs_api.cpp
Original file line number Diff line number Diff line change
@@ -13,12 +13,9 @@
// limitations under the License.

#include "vfs_api.h"
#include <stdio_ext.h>

using namespace fs;

#define READ_SIZE_SWITCH 128 //swithc to read func when read size > 128bytes

FileImplPtr VFSImpl::open(const char* fpath, const char* mode, const bool create)
{
if(!_mountpoint) {
@@ -377,28 +374,7 @@ size_t VFSFileImpl::read(uint8_t* buf, size_t size)
return 0;
}

//ERASE BYTEBUFFER and use read when size > READ_SIZE_SWITCH always
if(size > READ_SIZE_SWITCH)
{
//check some data in buffer exists –> clear buffer and move pointer to deleted data
size_t bytesinbuf = __fpending(_f);
if (bytesinbuf && (bytesinbuf != 128)) //buffer lenght is 128 bytes
{
fpurge(_f);
lseek(fileno(_f),(-128+bytesinbuf),SEEK_CUR);
}

int res = ::read(fileno(_f), buf, size);
if (res < 0) {
// an error occurred
return 0;
}
return res;
}
else
{
return fread(buf, 1, size, _f);
}
return fread(buf, 1, size, _f);
}

void VFSFileImpl::flush()
3 changes: 0 additions & 3 deletions libraries/README.md
Original file line number Diff line number Diff line change
@@ -69,9 +69,6 @@ arduino-esp32 includes libraries for Arduino compatibility along with some objec
### Preferences
Flash keystore using ESP32 NVS

### ESP RainMaker
End-to-end platform by Espressif that enables Makers to realize their IoT ideas faster

### SD
Secure Digital card filesystem using SPI access

483 changes: 0 additions & 483 deletions libraries/RainMaker/README.md

This file was deleted.

10 changes: 0 additions & 10 deletions libraries/RainMaker/examples/README.md

This file was deleted.

29 changes: 0 additions & 29 deletions libraries/RainMaker/examples/RMakerCustom/README.md

This file was deleted.

126 changes: 0 additions & 126 deletions libraries/RainMaker/examples/RMakerCustom/RMakerCustom.ino

This file was deleted.

193 changes: 0 additions & 193 deletions libraries/RainMaker/examples/RMakerSonoffDualR3/RMakerSonoffDualR3.ino

This file was deleted.

31 changes: 0 additions & 31 deletions libraries/RainMaker/examples/RMakerSwitch/README.md

This file was deleted.

111 changes: 0 additions & 111 deletions libraries/RainMaker/examples/RMakerSwitch/RMakerSwitch.ino

This file was deleted.

8 changes: 0 additions & 8 deletions libraries/RainMaker/library.properties

This file was deleted.

117 changes: 0 additions & 117 deletions libraries/RainMaker/src/RMaker.cpp

This file was deleted.

43 changes: 0 additions & 43 deletions libraries/RainMaker/src/RMaker.h

This file was deleted.

209 changes: 0 additions & 209 deletions libraries/RainMaker/src/RMakerDevice.cpp

This file was deleted.

167 changes: 0 additions & 167 deletions libraries/RainMaker/src/RMakerDevice.h

This file was deleted.

42 changes: 0 additions & 42 deletions libraries/RainMaker/src/RMakerNode.cpp

This file was deleted.

46 changes: 0 additions & 46 deletions libraries/RainMaker/src/RMakerNode.h

This file was deleted.

33 changes: 0 additions & 33 deletions libraries/RainMaker/src/RMakerParam.cpp

This file was deleted.

51 changes: 0 additions & 51 deletions libraries/RainMaker/src/RMakerParam.h

This file was deleted.

37 changes: 0 additions & 37 deletions libraries/RainMaker/src/RMakerQR.h

This file was deleted.

24 changes: 0 additions & 24 deletions libraries/RainMaker/src/RMakerType.cpp

This file was deleted.

36 changes: 0 additions & 36 deletions libraries/RainMaker/src/RMakerType.h

This file was deleted.

29 changes: 0 additions & 29 deletions libraries/RainMaker/src/RMakerUtils.h

This file was deleted.

4 changes: 3 additions & 1 deletion libraries/Update/src/Updater.cpp
Original file line number Diff line number Diff line change
@@ -352,7 +352,7 @@ size_t UpdateClass::writeStream(Stream &data) {
bytesToRead = remaining();
}

/*
/*
Init read&timeout counters and try to read, if read failed, increase counter,
wait 100ms and try to read again. If counter > 300 (30 sec), give up/abort
*/
@@ -377,6 +377,8 @@ size_t UpdateClass::writeStream(Stream &data) {
if((_bufferLen == remaining() || _bufferLen == SPI_FLASH_SEC_SIZE) && !_writeBuffer())
return written;
written += toRead;

delay(1); // Fix solo WDT
}
return written;
}
52 changes: 0 additions & 52 deletions tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_console.h

This file was deleted.

893 changes: 0 additions & 893 deletions tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_core.h

This file was deleted.

90 changes: 0 additions & 90 deletions tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_mqtt.h

This file was deleted.

150 changes: 0 additions & 150 deletions tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_ota.h

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.