mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-10 13:36:54 +03:00
Error Correction
This commit is contained in:
@@ -1,12 +1,8 @@
|
|||||||
cmake_minimum_required(VERSION 3.16.0)
|
cmake_minimum_required(VERSION 3.16.0)
|
||||||
|
|
||||||
|
|
||||||
COMMAND (${CMAKE_SOURCE_DIR}/src/get_git_hash.cmd)
|
|
||||||
|
|
||||||
list(APPEND EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
list(APPEND EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||||
|
|
||||||
set(PROJECT_VER "0.0.9.3")
|
set(PROJECT_VER "0.0.9.3")
|
||||||
|
|
||||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||||
|
|
||||||
project(esp32cam-server-only)
|
project(esp32cam-server-only)
|
||||||
|
|||||||
@@ -74,8 +74,8 @@ CONFIG_PARTITION_TABLE_OFFSET=0x8000
|
|||||||
CONFIG_PARTITION_TABLE_MD5=y
|
CONFIG_PARTITION_TABLE_MD5=y
|
||||||
CONFIG_EXAMPLE_CONNECT_WIFI=y
|
CONFIG_EXAMPLE_CONNECT_WIFI=y
|
||||||
# CONFIG_EXAMPLE_CONNECT_ETHERNET is not set
|
# CONFIG_EXAMPLE_CONNECT_ETHERNET is not set
|
||||||
CONFIG_EXAMPLE_WIFI_SSID="SSID"
|
CONFIG_EXAMPLE_WIFI_SSID="myssid"
|
||||||
CONFIG_EXAMPLE_WIFI_PASSWORD="passwd"
|
CONFIG_EXAMPLE_WIFI_PASSWORD="mypassword"
|
||||||
CONFIG_EXAMPLE_CONNECT_IPV6=y
|
CONFIG_EXAMPLE_CONNECT_IPV6=y
|
||||||
CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y
|
CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y
|
||||||
# CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set
|
# CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set
|
||||||
|
|||||||
@@ -1,21 +1,17 @@
|
|||||||
# This file was automatically generated for projects
|
# This file was automatically generated for projects
|
||||||
# without default 'CMakeLists.txt' file.
|
# without default 'CMakeLists.txt' file.
|
||||||
|
|
||||||
<<<<<<< Updated upstream
|
if(NOT CMAKE_BUILD_EARLY_EXPANSION)
|
||||||
FILE(GLOB_RECURSE app_sources ${CMAKE_SOURCE_DIR}/src/*.*)
|
ADD_CUSTOM_COMMAND(
|
||||||
=======
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/_version.cpp
|
||||||
|
COMMAND ${CMAKE_COMMAND} -P
|
||||||
#if(NOT CMAKE_BUILD_EARLY_EXPANSION)
|
${CMAKE_CURRENT_SOURCE_DIR}/version.cmake)
|
||||||
#ADD_CUSTOM_COMMAND(
|
endif()
|
||||||
# OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/version.cpp
|
|
||||||
# ${CMAKE_CURRENT_SOURCE_DIR}/_version.cpp
|
|
||||||
# COMMAND ${CMAKE_COMMAND} -P
|
|
||||||
# ${CMAKE_CURRENT_SOURCE_DIR}/version.cmake)
|
|
||||||
##endif()
|
|
||||||
|
|
||||||
FILE(GLOB_RECURSE app_sources ${CMAKE_SOURCE_DIR}/src/*.*)
|
FILE(GLOB_RECURSE app_sources ${CMAKE_SOURCE_DIR}/src/*.*)
|
||||||
>>>>>>> Stashed changes
|
|
||||||
|
# idf_component_register(SRCS ${app_sources})
|
||||||
|
|
||||||
idf_component_register(SRCS ${app_sources}
|
idf_component_register(SRCS ${app_sources}
|
||||||
INCLUDE_DIRS ".")
|
INCLUDE_DIRS ".")
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
@echo off
|
|
||||||
FOR /F "tokens=* USEBACKQ" %%F IN (`git describe --dirty --always --tags`) DO (
|
|
||||||
SET var=%%F
|
|
||||||
)
|
|
||||||
ECHO #ifndef GITHASH_H > githash.h
|
|
||||||
ECHO #define GITHASH_H >> githash.h
|
|
||||||
ECHO const std::string kGitHash = "%var%"; >> githash.h
|
|
||||||
ECHO #endif // GITHASH_H >> githash.h
|
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "driver/gpio.h"
|
#include "driver/gpio.h"
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
#include "version.h"
|
//#include "version.h"
|
||||||
|
|
||||||
#include "ClassLogFile.h"
|
#include "ClassLogFile.h"
|
||||||
|
|
||||||
@@ -135,9 +135,6 @@ extern "C" void app_main()
|
|||||||
|
|
||||||
std::string zw = gettimestring("%Y%m%d-%H%M%S");
|
std::string zw = gettimestring("%Y%m%d-%H%M%S");
|
||||||
printf("time %s\n", zw.c_str());
|
printf("time %s\n", zw.c_str());
|
||||||
printf("libfive_git_version: %s\n", libfive_git_version());
|
|
||||||
printf("libfive_git_revision: %s\n", libfive_git_revision());
|
|
||||||
printf("libfive_git_branch: %s\n", libfive_git_branch());
|
|
||||||
|
|
||||||
Camera.InitCam();
|
Camera.InitCam();
|
||||||
Camera.LightOnOff(false);
|
Camera.LightOnOff(false);
|
||||||
|
|||||||
43
code/src/version.cmake
Normal file
43
code/src/version.cmake
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
execute_process(COMMAND git log --pretty=format:'%h' -n 1
|
||||||
|
OUTPUT_VARIABLE GIT_REV
|
||||||
|
ERROR_QUIET)
|
||||||
|
|
||||||
|
# Check whether we got any revision (which isn't
|
||||||
|
# always the case, e.g. when someone downloaded a zip
|
||||||
|
# file from Github instead of a checkout)
|
||||||
|
if ("${GIT_REV}" STREQUAL "")
|
||||||
|
set(GIT_REV "N/A")
|
||||||
|
set(GIT_DIFF "")
|
||||||
|
set(GIT_TAG "N/A")
|
||||||
|
set(GIT_BRANCH "N/A")
|
||||||
|
else()
|
||||||
|
execute_process(
|
||||||
|
COMMAND bash -c "git diff --quiet --exit-code || echo +"
|
||||||
|
OUTPUT_VARIABLE GIT_DIFF)
|
||||||
|
execute_process(
|
||||||
|
COMMAND git describe --exact-match --tags
|
||||||
|
OUTPUT_VARIABLE GIT_TAG ERROR_QUIET)
|
||||||
|
execute_process(
|
||||||
|
COMMAND git rev-parse --abbrev-ref HEAD
|
||||||
|
OUTPUT_VARIABLE GIT_BRANCH)
|
||||||
|
|
||||||
|
string(STRIP "${GIT_REV}" GIT_REV)
|
||||||
|
string(SUBSTRING "${GIT_REV}" 1 7 GIT_REV)
|
||||||
|
string(STRIP "${GIT_DIFF}" GIT_DIFF)
|
||||||
|
string(STRIP "${GIT_TAG}" GIT_TAG)
|
||||||
|
string(STRIP "${GIT_BRANCH}" GIT_BRANCH)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(VERSION "const char* GIT_REV=\"${GIT_REV}${GIT_DIFF}\";
|
||||||
|
const char* GIT_TAG=\"${GIT_TAG}\";
|
||||||
|
const char* GIT_BRANCH=\"${GIT_BRANCH}\";")
|
||||||
|
|
||||||
|
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/version.cpp)
|
||||||
|
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/version.cpp VERSION_)
|
||||||
|
else()
|
||||||
|
set(VERSION_ "")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT "${VERSION}" STREQUAL "${VERSION_}")
|
||||||
|
file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/version.cpp "${VERSION}")
|
||||||
|
endif()
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
// These variables are autogenerated and compiled
|
|
||||||
// into the library by the version.cmake script
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
extern const char* GIT_TAG;
|
|
||||||
extern const char* GIT_REV;
|
|
||||||
extern const char* GIT_BRANCH;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* libfive_git_version(void)
|
|
||||||
{
|
|
||||||
return GIT_TAG;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* libfive_git_revision(void)
|
|
||||||
{
|
|
||||||
return GIT_REV;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* libfive_git_branch(void)
|
|
||||||
{
|
|
||||||
return GIT_BRANCH;
|
|
||||||
}
|
|
||||||
0
code/src/zip._c
Normal file
0
code/src/zip._c
Normal file
Reference in New Issue
Block a user