Просмотр исходного кода

Remove confirmed unused helper methods

SybexXx 3 дней назад
Родитель
Сommit
215e1d504b

+ 0 - 9
code/components/jomjol_controlGPIO/Color.cpp

@@ -143,15 +143,6 @@ Rgb& Rgb::operator-=(const Rgb& in) {
     return *this;
 }
 
-Rgb& Rgb::blend(const Rgb& in) {
-    unsigned int inAlpha = in.a * (255 - a);
-    unsigned int alpha = a + inAlpha;
-    r = iRgbSqrt(((r * r * a) + (in.r * in.r * inAlpha)) / alpha);
-    g = iRgbSqrt(((g * g * a) + (in.g * in.g * inAlpha)) / alpha);
-    b = iRgbSqrt(((b * b * a) + (in.b * in.b * inAlpha)) / alpha);
-    a = alpha;
-    return *this;
-}
 
 Hsv::Hsv(const Rgb& r) {
     int min = std::min(r.r, std::min(r.g, r.b));

+ 1 - 1
code/components/jomjol_controlGPIO/Color.h

@@ -53,7 +53,7 @@ union Rgb {
     Rgb operator-(const Rgb& in) const;
     Rgb& operator-=(const Rgb& in);
     bool operator==(const Rgb& in) const { return in.value == value; }
-    Rgb& blend(const Rgb& in);
+
     void swap(const Rgb& o) { value = o.value; }
     void linearize() {
         r = channelGamma(r);

+ 146 - 179
code/components/jomjol_helper/esp_sys.cpp

@@ -1,179 +1,146 @@
-#include "../../include/defines.h"
-
-#ifdef DEBUG_ENABLE_SYSINFO
-
-#include "esp_sys.h"
-#include "esp_chip_info.h"
-
-#include <string>
-
-
-#include "esp_chip_info.h"
-
-
-void Restart() {
-    esp_restart();
-}
-
-//source : https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/misc_system_api.html#_CPPv416esp_chip_model_t
-
-//https://github.com/espressif/esp-idf/blob/8464186e67e34b417621df6b6f1f289a6c60b859/components/esp_hw_support/include/esp_chip_info.h
-/*
-typedef enum {
-    CHIP_ESP32  = 1, //!< ESP32
-    CHIP_ESP32S2 = 2, //!< ESP32-S2
-    CHIP_ESP32S3 = 9, //!< ESP32-S3
-    CHIP_ESP32C3 = 5, //!< ESP32-C3
-    CHIP_ESP32H4 = 6, //!< ESP32-H4
-    CHIP_ESP32C2 = 12, //!< ESP32-C2
-    CHIP_ESP32C6 = 13, //!< ESP32-C6
-    CHIP_ESP32H2 = 16, //!< ESP32-H2
-    CHIP_POSIX_LINUX = 999, //!< The code is running on POSIX/Linux simulator
-} esp_chip_model_t;
-*/
-
-char* GetChipModel(){
-    esp_chip_info_t chipInfo;
-    esp_chip_info(&chipInfo);
-    switch((int)chipInfo.model) {
-        case 0 : return (char*)"ESP8266";
-        case (int)esp_chip_model_t::CHIP_ESP32 : return (char*)"ESP32";
-#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 0, 0)        
-        case (int)esp_chip_model_t::CHIP_ESP32S2 : return (char*)"ESP32-S2";
-        case (int)esp_chip_model_t::CHIP_ESP32S3 : return (char*)"ESP32-S3";
-        case (int)esp_chip_model_t::CHIP_ESP32C3 : return (char*)"ESP32-C3";
-        case 6 : return (char*)"ESP32-H4";
-        case 12 : return (char*)"ESP32-C2";
-        case 13 : return (char*)"ESP32-C6";
-        //case (int)esp_chip_model_t::CHIP_ESP32H4 : return (char*)"ESP32-H4";
-        //case (int)esp_chip_model_t::CHIP_ESP32C2 : return (char*)"ESP32-C2";
-        //case (int)esp_chip_model_t::CHIP_ESP32C6 : return (char*)"ESP32-C6";
-        //case (int)esp_chip_model_t::CHIP_ESP32H2 : return (char*)"ESP32-H2";
-        case 16 : return (char*)"ESP32-H2";
-        //case (int)esp_chip_model_t::CHIP_POSIX_LINUX : return (char*)"CHIP_POSIX_LINUX";
-
-#endif
-    }
-    return (char*)"Chip Unknown";
-}
-
-uint8_t GetChipCoreCount() {
-    esp_chip_info_t chipInfo;
-    esp_chip_info(&chipInfo);
-    return chipInfo.cores;
-}
-
-uint16_t GetChipRevision() {
-    esp_chip_info_t chipInfo;
-    esp_chip_info(&chipInfo);
-    return chipInfo.revision;
-}
-
-uint32_t  GetChipfeatures() {
-    esp_chip_info_t chipInfo;
-    esp_chip_info(&chipInfo);
-    return chipInfo.features;
-}
-
-
-uint32_t GetFreeHeap() {
-    return esp_get_free_heap_size();
-}
-
-uint32_t GetLeastHeapFreeSinceBoot() {
-    return esp_get_minimum_free_heap_size();
-}
-
-
-std::string get_device_info()
-{
-    esp_chip_info_t chip_info;
-    esp_chip_info(&chip_info);
-    
-    std::string espInfoResultStr = "";
-    char aMsgBuf[40];
-
-    espInfoResultStr += "Device Info:";
-    espInfoResultStr += "---------------\n";
-    espInfoResultStr += "Chip Model: " + std::string(GetChipModel()) +"\n";
-    sprintf(aMsgBuf,"Chip Revision: %d\n", chip_info.revision);
-    espInfoResultStr += std::string(aMsgBuf);
-    sprintf(aMsgBuf,"CPU Cores: %d\n", chip_info.cores);
-    espInfoResultStr += std::string(aMsgBuf);
-    sprintf(aMsgBuf,"Flash Memory: %dMB\n", spi_flash_get_chip_size()/(1024*1024));
-    espInfoResultStr += std::string(aMsgBuf);
-    if(chip_info.features & CHIP_FEATURE_WIFI_BGN)
-        //espInfoResultStr += "Base MAC: " + std::string(getMac()) +"\n";
-        espInfoResultStr += "ESP-IDF version: " + std::string(esp_get_idf_version()) +"\n";
-    if((chip_info.features & CHIP_FEATURE_WIFI_BGN) || (chip_info.features & CHIP_FEATURE_BT) ||
-       (chip_info.features & CHIP_FEATURE_BLE) || (chip_info.features & CHIP_FEATURE_EMB_FLASH))
-    {
-        espInfoResultStr += "Characteristics:\n";
-        if(chip_info.features & CHIP_FEATURE_WIFI_BGN)
-            espInfoResultStr += "    WiFi 2.4GHz\n";
-        if(chip_info.features & CHIP_FEATURE_BT)
-            espInfoResultStr += "    Bluetooth Classic\n";
-        if(chip_info.features & CHIP_FEATURE_BLE)
-            espInfoResultStr += "    Bluetooth Low Energy\n";
-        if(chip_info.features & CHIP_FEATURE_EMB_FLASH)
-            espInfoResultStr += "    Embedded Flash memory\n";
-        else
-           espInfoResultStr += "    External Flash memory\n";
-    }
-
-    #ifdef USE_HIMEM_IF_AVAILABLE
-        sprintf(aMsgBuf,"spiram size %u\n", esp_psram_get_size());
-        espInfoResultStr += std::string(aMsgBuf);
-        sprintf(aMsgBuf,"himem free %u\n", esp_himem_get_free_size());
-        espInfoResultStr += std::string(aMsgBuf);
-        sprintf(aMsgBuf,"himem phys %u\n", esp_himem_get_phys_size());
-        espInfoResultStr += std::string(aMsgBuf);
-        sprintf(aMsgBuf,"himem reserved %u\n", esp_himem_reserved_area_size());
-        espInfoResultStr += std::string(aMsgBuf);
-    #endif
-    
-    return espInfoResultStr; 
-}
-
-
-size_t getFreeMemoryInternal(){ //Current Free Memory
-    return heap_caps_get_free_size(MALLOC_CAP_8BIT) - heap_caps_get_free_size(MALLOC_CAP_SPIRAM);
-}
-
-size_t getFreeMemorySPIRAM(){ //Current Free Memory
-    return heap_caps_get_free_size(MALLOC_CAP_SPIRAM);
-}
-
-
-size_t getLargestFreeBlockInternal(){ //Largest Free Block
-    return heap_caps_get_largest_free_block(MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL);
-}
-
-size_t getLargestFreeBlockSPIRAM(){ //Largest Free Block
-    return heap_caps_get_largest_free_block(MALLOC_CAP_SPIRAM);
-}
-
-
-size_t getMinEverFreeMemInternal(){ //Min. Ever Free Size
-    return heap_caps_get_minimum_free_size(MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL);
-}
-
-size_t getMinEverFreeMemSPIRAM(){ //Min. Ever Free Size
-    return heap_caps_get_minimum_free_size(MALLOC_CAP_SPIRAM);
-}
-
-#ifdef USE_HIMEM_IF_AVAILABLE
-    size_t getHimemTotSpace(){ 
-        return esp_himem_get_phys_size();
-    }
-
-    size_t getHimemFreeSpace(){ 
-        return esp_himem_get_free_size();
-    }
-
-    size_t getHimemReservedArea(){ 
-        return esp_himem_reserved_area_size();
-    }
-#endif
-
-#endif //DEBUG_ENABLE_SYSINFO
+#include "../../include/defines.h"
+
+#ifdef DEBUG_ENABLE_SYSINFO
+
+#include "esp_sys.h"
+#include "esp_chip_info.h"
+
+#include <string>
+
+
+#include "esp_chip_info.h"
+
+
+void Restart() {
+    esp_restart();
+}
+
+//source : https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/misc_system_api.html#_CPPv416esp_chip_model_t
+
+//https://github.com/espressif/esp-idf/blob/8464186e67e34b417621df6b6f1f289a6c60b859/components/esp_hw_support/include/esp_chip_info.h
+/*
+typedef enum {
+    CHIP_ESP32  = 1, //!< ESP32
+    CHIP_ESP32S2 = 2, //!< ESP32-S2
+    CHIP_ESP32S3 = 9, //!< ESP32-S3
+    CHIP_ESP32C3 = 5, //!< ESP32-C3
+    CHIP_ESP32H4 = 6, //!< ESP32-H4
+    CHIP_ESP32C2 = 12, //!< ESP32-C2
+    CHIP_ESP32C6 = 13, //!< ESP32-C6
+    CHIP_ESP32H2 = 16, //!< ESP32-H2
+    CHIP_POSIX_LINUX = 999, //!< The code is running on POSIX/Linux simulator
+} esp_chip_model_t;
+*/
+
+char* GetChipModel(){
+    esp_chip_info_t chipInfo;
+    esp_chip_info(&chipInfo);
+    switch((int)chipInfo.model) {
+        case 0 : return (char*)"ESP8266";
+        case (int)esp_chip_model_t::CHIP_ESP32 : return (char*)"ESP32";
+#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 0, 0)        
+        case (int)esp_chip_model_t::CHIP_ESP32S2 : return (char*)"ESP32-S2";
+        case (int)esp_chip_model_t::CHIP_ESP32S3 : return (char*)"ESP32-S3";
+        case (int)esp_chip_model_t::CHIP_ESP32C3 : return (char*)"ESP32-C3";
+        case 6 : return (char*)"ESP32-H4";
+        case 12 : return (char*)"ESP32-C2";
+        case 13 : return (char*)"ESP32-C6";
+        //case (int)esp_chip_model_t::CHIP_ESP32H4 : return (char*)"ESP32-H4";
+        //case (int)esp_chip_model_t::CHIP_ESP32C2 : return (char*)"ESP32-C2";
+        //case (int)esp_chip_model_t::CHIP_ESP32C6 : return (char*)"ESP32-C6";
+        //case (int)esp_chip_model_t::CHIP_ESP32H2 : return (char*)"ESP32-H2";
+        case 16 : return (char*)"ESP32-H2";
+        //case (int)esp_chip_model_t::CHIP_POSIX_LINUX : return (char*)"CHIP_POSIX_LINUX";
+
+#endif
+    }
+    return (char*)"Chip Unknown";
+}
+
+
+
+
+
+uint32_t GetFreeHeap() {
+    return esp_get_free_heap_size();
+}
+
+uint32_t GetLeastHeapFreeSinceBoot() {
+    return esp_get_minimum_free_heap_size();
+}
+
+
+std::string get_device_info()
+{
+    esp_chip_info_t chip_info;
+    esp_chip_info(&chip_info);
+    
+    std::string espInfoResultStr = "";
+    char aMsgBuf[40];
+
+    espInfoResultStr += "Device Info:";
+    espInfoResultStr += "---------------\n";
+    espInfoResultStr += "Chip Model: " + std::string(GetChipModel()) +"\n";
+    sprintf(aMsgBuf,"Chip Revision: %d\n", chip_info.revision);
+    espInfoResultStr += std::string(aMsgBuf);
+    sprintf(aMsgBuf,"CPU Cores: %d\n", chip_info.cores);
+    espInfoResultStr += std::string(aMsgBuf);
+    sprintf(aMsgBuf,"Flash Memory: %dMB\n", spi_flash_get_chip_size()/(1024*1024));
+    espInfoResultStr += std::string(aMsgBuf);
+    if(chip_info.features & CHIP_FEATURE_WIFI_BGN)
+        //espInfoResultStr += "Base MAC: " + std::string(getMac()) +"\n";
+        espInfoResultStr += "ESP-IDF version: " + std::string(esp_get_idf_version()) +"\n";
+    if((chip_info.features & CHIP_FEATURE_WIFI_BGN) || (chip_info.features & CHIP_FEATURE_BT) ||
+       (chip_info.features & CHIP_FEATURE_BLE) || (chip_info.features & CHIP_FEATURE_EMB_FLASH))
+    {
+        espInfoResultStr += "Characteristics:\n";
+        if(chip_info.features & CHIP_FEATURE_WIFI_BGN)
+            espInfoResultStr += "    WiFi 2.4GHz\n";
+        if(chip_info.features & CHIP_FEATURE_BT)
+            espInfoResultStr += "    Bluetooth Classic\n";
+        if(chip_info.features & CHIP_FEATURE_BLE)
+            espInfoResultStr += "    Bluetooth Low Energy\n";
+        if(chip_info.features & CHIP_FEATURE_EMB_FLASH)
+            espInfoResultStr += "    Embedded Flash memory\n";
+        else
+           espInfoResultStr += "    External Flash memory\n";
+    }
+
+    #ifdef USE_HIMEM_IF_AVAILABLE
+        sprintf(aMsgBuf,"spiram size %u\n", esp_psram_get_size());
+        espInfoResultStr += std::string(aMsgBuf);
+        sprintf(aMsgBuf,"himem free %u\n", esp_himem_get_free_size());
+        espInfoResultStr += std::string(aMsgBuf);
+        sprintf(aMsgBuf,"himem phys %u\n", esp_himem_get_phys_size());
+        espInfoResultStr += std::string(aMsgBuf);
+        sprintf(aMsgBuf,"himem reserved %u\n", esp_himem_reserved_area_size());
+        espInfoResultStr += std::string(aMsgBuf);
+    #endif
+    
+    return espInfoResultStr; 
+}
+
+
+
+
+
+
+
+
+
+
+#ifdef USE_HIMEM_IF_AVAILABLE
+    size_t getHimemTotSpace(){ 
+        return esp_himem_get_phys_size();
+    }
+
+    size_t getHimemFreeSpace(){ 
+        return esp_himem_get_free_size();
+    }
+
+    size_t getHimemReservedArea(){ 
+        return esp_himem_reserved_area_size();
+    }
+#endif
+
+#endif //DEBUG_ENABLE_SYSINFO

+ 46 - 54
code/components/jomjol_helper/esp_sys.h

@@ -1,54 +1,46 @@
-#pragma once
-
-#include "../../include/defines.h"
-
-#ifdef DEBUG_ENABLE_SYSINFO
-
-#ifndef ESP_SYS_H
-#define ESP_SYS_H
-
-
-#include <string>
-
-
-// Device libraries (ESP-IDF)
-#include <esp_system.h>
-#include <esp_spi_flash.h>
-#include <esp_heap_caps.h>
-
-// for esp_psram_get_size
-extern "C" {
-    #include "esp_psram.h"
-    #ifdef USE_HIMEM_IF_AVAILABLE
-        #include <esp32/himem.h>
-    #endif
-}
-
-
-
-    void Restart();
-    char *GetChipModel();
-    uint8_t GetChipCoreCount();
-    uint16_t GetChipRevision();
-    uint32_t  GetChipfeatures();
-    uint32_t GetFreeHeap();
-    uint32_t GetLeastHeapFreeSinceBoot();
-
-    std::string get_device_info();
-
-    size_t getFreeMemoryInternal();
-    size_t getFreeMemorySPIRAM();
-    size_t getLargestFreeBlockInternal();
-    size_t getLargestFreeBlockSPIRAM();
-    size_t getMinEverFreeMemInternal();
-    size_t getMinEverFreeMemSPIRAM();
-    #ifdef USE_HIMEM_IF_AVAILABLE
-        size_t getHimemTotSpace();
-        size_t getHimemFreeSpace();
-        size_t getHimemReservedArea();
-    #endif
-
-
-#endif //ESP_SYS_H
-
-#endif // DEBUG_ENABLE_SYSINFO
+#pragma once
+
+#include "../../include/defines.h"
+
+#ifdef DEBUG_ENABLE_SYSINFO
+
+#ifndef ESP_SYS_H
+#define ESP_SYS_H
+
+
+#include <string>
+
+
+// Device libraries (ESP-IDF)
+#include <esp_system.h>
+#include <esp_spi_flash.h>
+#include <esp_heap_caps.h>
+
+// for esp_psram_get_size
+extern "C" {
+    #include "esp_psram.h"
+    #ifdef USE_HIMEM_IF_AVAILABLE
+        #include <esp32/himem.h>
+    #endif
+}
+
+
+
+    void Restart();
+    char *GetChipModel();
+
+    uint32_t GetFreeHeap();
+    uint32_t GetLeastHeapFreeSinceBoot();
+
+    std::string get_device_info();
+
+    #ifdef USE_HIMEM_IF_AVAILABLE
+        size_t getHimemTotSpace();
+        size_t getHimemFreeSpace();
+        size_t getHimemReservedArea();
+    #endif
+
+
+#endif //ESP_SYS_H
+
+#endif // DEBUG_ENABLE_SYSINFO

+ 0 - 7
code/components/jomjol_image_proc/CAlignAndCutImage.cpp

@@ -75,13 +75,6 @@ CAlignAndCutImage::CAlignAndCutImage(std::string _name, CImageBasis *_org, CImag
     ImageTMP = _temp;
 }
 
-void CAlignAndCutImage::GetRefSize(int *ref_dx, int *ref_dy)
-{
-    ref_dx[0] = t0_dx;
-    ref_dy[0] = t0_dy;
-    ref_dx[1] = t1_dx;
-    ref_dy[1] = t1_dy;
-}
 
 bool CAlignAndCutImage::Align(RefInfo *_temp1, RefInfo *_temp2)
 {

+ 0 - 1
code/components/jomjol_image_proc/CAlignAndCutImage.h

@@ -21,7 +21,6 @@ class CAlignAndCutImage : public CImageBasis
         void CutAndSave(std::string _template1, int x1, int y1, int dx, int dy);
         CImageBasis* CutAndSave(int x1, int y1, int dx, int dy);
         bool CutAndSave(int x1, int y1, int dx, int dy, CImageBasis *_target);
-        void GetRefSize(int *ref_dx, int *ref_dy);
 };
 
 #endif //CALIGNANDCUTIMAGE_H

+ 0 - 20
code/components/jomjol_image_proc/CImageBasis.cpp

@@ -112,11 +112,6 @@ void CImageBasis::RGBImageRelease()
 }
 
 
-uint8_t * CImageBasis::RGBImageGet()
-{
-    // Compatibility accessor only. Callers must hold RGBImageLock() while using this pointer.
-    return rgb_image;
-}
 
 bool CImageBasis::SetIndepended()
 {
@@ -281,21 +276,6 @@ bool CImageBasis::CopyFromMemory(uint8_t* _source, int _size)
 }
 
 
-uint8_t CImageBasis::GetPixelColor(int x, int y, int ch)
-{
-    size_t imageSize = 0;
-    if (rgb_image == nullptr || !isInImage(x, y) || ch < 0 || ch >= channels ||
-        !getImageBufferSize(width, height, channels, &imageSize)) return 0;
-    uint8_t* image = RGBImageLock();
-    if (image == nullptr) return 0;
-    const size_t offset = static_cast<size_t>(channels) *
-        (static_cast<size_t>(y) * static_cast<size_t>(width) + static_cast<size_t>(x));
-    uint8_t value = 0;
-    if (offset <= imageSize && static_cast<size_t>(ch) < imageSize - offset)
-        value = image[offset + static_cast<size_t>(ch)];
-    RGBImageRelease();
-    return value;
-}
 
 
 void CImageBasis::memCopy(uint8_t* _source, uint8_t* _target, int _size)

+ 0 - 2
code/components/jomjol_image_proc/CImageBasis.h

@@ -60,7 +60,6 @@ class CImageBasis
 
         uint8_t * RGBImageLock(int _waitmaxsec = 60);
         void RGBImageRelease();
-        uint8_t * RGBImageGet();
 
         int getWidth(){return this->width;};   
         int getHeight(){return this->height;};   
@@ -99,7 +98,6 @@ class CImageBasis
 
         esp_err_t SendJPGtoHTTP(httpd_req_t *req, const int quality = 90);   
 
-        uint8_t GetPixelColor(int x, int y, int ch);
 
         ~CImageBasis();
 

+ 0 - 79
code/components/jomjol_image_proc/CRotateImage.cpp

@@ -369,83 +369,4 @@ void CRotateImage::RotateAntiAliasing(float _angle)
     RotateAntiAliasing(_angle, width / 2, height / 2);
 }
 
-void CRotateImage::Translate(int _dx, int _dy)
-{
-    ScopedImageAccess sourceAccess(ImageOrg != NULL ? ImageOrg : this);
-    if (!sourceAccess.isLocked()) {
-        LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Image transform: unable to lock source image");
-        return;
-    }
-    if ((_dx == 0) && (_dy == 0)) {  // identity transform, the copy would leave the image unchanged
-        return;
-    }
-
-    size_t bufferSize = 0;
-    if (!getRotateBufferSize(width, height, channels, &bufferSize)) {
-        LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Image transform: invalid dimensions or size overflow");
-        return;
-    }
-    const int memsize = static_cast<int>(bufferSize);
-    uint8_t* odata;
-    if (ImageTMP) {
-        odata = ImageTMP->RGBImageLock();
-    } else {
-        odata = static_cast<unsigned char*>(malloc_psram_heap(
-            std::string(TAG) + "->odata", bufferSize, MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT));
-    }
-    if (odata == NULL) {
-        LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Image transform: temporary PSRAM allocation failed");
-        return;
-    }
-
-
-
-    int x_source, y_source;
-    stbi_uc* p_target;
-    stbi_uc* p_source;
-
-    uint8_t* source = RGBImageLock();
-    if (source == NULL) {
-        if (ImageTMP) ImageTMP->RGBImageRelease();
-        else free_psram_heap(std::string(TAG) + "->odata", odata);
-        LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Image transform: source image is unavailable");
-        return;
-    }
-
-    // y outer / x inner: write the target (and mostly read the source) sequentially in PSRAM
-    for (int y = 0; y < height; ++y)
-        for (int x = 0; x < width; ++x)
-        {
-            p_target = odata + (channels * (y * width + x));
-
-            x_source = x - _dx;
-            y_source = y - _dy;
-
-            if ((x_source >= 0) && (x_source < width) && (y_source >= 0) && (y_source < height))
-            {
-                p_source = source + (channels * (y_source * width + x_source));
-                for (int _channels = 0; _channels < channels; ++_channels)
-                    p_target[_channels] = p_source[_channels];
-            }
-            else
-            {
-                for (int _channels = 0; _channels < channels; ++_channels)
-                    p_target[_channels] = FILL_VALUE;
-            }
-        }
-
-    //    memcpy(rgb_image, odata, memsize);
-    memCopy(odata, source, memsize);
-    if (!ImageTMP)
-    {
-        free_psram_heap(std::string(TAG) + "->odata", odata);
-    }
-
-    if (ImageTMP)
-    {
-        ImageTMP->RGBImageRelease();
-    }
-    RGBImageRelease();
-
-}
 

+ 25 - 27
code/components/jomjol_image_proc/CRotateImage.h

@@ -1,28 +1,26 @@
-#pragma once
-
-#ifndef CROTATEIMAGE_H
-#define CROTATEIMAGE_H
-
-#include "CImageBasis.h"
-
-
-class CRotateImage: public CImageBasis
-{
-
-    public:
-        CImageBasis *ImageTMP, *ImageOrg;
-        bool doflip;
-        CRotateImage(std::string name, std::string _image, bool _flip = false) : CImageBasis(name, _image) {ImageTMP = NULL; ImageOrg = NULL; doflip = _flip;};
-        CRotateImage(std::string name, uint8_t* _rgb_image, int _channels, int _width, int _height, int _bpp, bool _flip = false) : CImageBasis(name, _rgb_image, _channels, _width, _height, _bpp) {ImageTMP = NULL;  ImageOrg = NULL; doflip = _flip;};
-        CRotateImage(std::string name, CImageBasis *_org, CImageBasis *_temp, bool _flip = false);
-
-        void Rotate(float _angle);
-        void RotateAntiAliasing(float _angle);
-       
-        void Rotate(float _angle, int _centerx, int _centery);
-        void RotateAntiAliasing(float _angle, int _centerx, int _centery);
-
-        void Translate(int _dx, int _dy);
-};
-
+#pragma once
+
+#ifndef CROTATEIMAGE_H
+#define CROTATEIMAGE_H
+
+#include "CImageBasis.h"
+
+
+class CRotateImage: public CImageBasis
+{
+
+    public:
+        CImageBasis *ImageTMP, *ImageOrg;
+        bool doflip;
+        CRotateImage(std::string name, std::string _image, bool _flip = false) : CImageBasis(name, _image) {ImageTMP = NULL; ImageOrg = NULL; doflip = _flip;};
+        CRotateImage(std::string name, uint8_t* _rgb_image, int _channels, int _width, int _height, int _bpp, bool _flip = false) : CImageBasis(name, _rgb_image, _channels, _width, _height, _bpp) {ImageTMP = NULL;  ImageOrg = NULL; doflip = _flip;};
+        CRotateImage(std::string name, CImageBasis *_org, CImageBasis *_temp, bool _flip = false);
+
+        void Rotate(float _angle);
+        void RotateAntiAliasing(float _angle);
+       
+        void Rotate(float _angle, int _centerx, int _centery);
+        void RotateAntiAliasing(float _angle, int _centerx, int _centery);
+};
+
 #endif //CROTATEIMAGE_H

+ 0 - 8
code/components/jomjol_tfliteclass/CTfLiteClass.cpp

@@ -277,14 +277,6 @@ bool CTfLiteClass::MakeAllocate()
 }
 
 
-void CTfLiteClass::GetInputTensorSize()
-{
-#ifdef DEBUG_DETAIL_ON    
-    float *zw = this->input;
-    int test = sizeof(zw);
-    ESP_LOGD(TAG, "Input Tensor Dimension: %d", test);
-#endif
-}
 
 
 long CTfLiteClass::GetFileSize(std::string filename)

+ 0 - 1
code/components/jomjol_tfliteclass/CTfLiteClass.h

@@ -43,7 +43,6 @@ class CTfLiteClass
         ~CTfLiteClass();        
         bool LoadModel(std::string _fn);
         bool MakeAllocate();
-        void GetInputTensorSize();
         bool LoadInputImageBasis(CImageBasis *rs);
         void Invoke();
         bool LastInvokeSucceeded() const { return lastInvokeSucceeded; }

+ 0 - 10
code/components/jomjol_time_sntp/time_sntp.cpp

@@ -36,16 +36,6 @@ int LocalTimeToUTCOffsetSeconds;
 
 
 
-std::string ConvertTimeToString(time_t _time, const char * frm)
-{
-    struct tm timeinfo;
-    char strftime_buf[64];
-    localtime_r(&_time, &timeinfo);
-    strftime(strftime_buf, sizeof(strftime_buf), frm, &timeinfo);
-
-    std::string result(strftime_buf);
-    return result;
-}
 
 
 std::string getCurrentTimeString(const char * frm)

+ 0 - 2
code/components/jomjol_time_sntp/time_sntp.h

@@ -17,8 +17,6 @@
 #include "esp_sntp.h"
 
 std::string getCurrentTimeString(const char * frm);
-std::string ConvertTimeToString(time_t _time, const char * frm);
-
 
 bool getTimeIsSet(void);
 bool getTimeWasNotSetAtBoot(void);