From 1df265cb467f6b392d113db117785c52cacea10f Mon Sep 17 00:00:00 2001 From: zwsd Date: Mon, 26 Sep 2022 16:48:29 +0800 Subject: [PATCH] update --- main/CMakeLists.txt | 1 + main/app_main.cpp | 2 ++ main/temp.c | 14 ++++++++++++++ main/temp.h | 5 +++++ 4 files changed, 22 insertions(+) create mode 100644 main/temp.c create mode 100644 main/temp.h diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index af478c3..0499e22 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -6,6 +6,7 @@ set(srcs "app_main.cpp" # "key.c" "wifi.c" "heating_plate.c" + "temp.c" ) idf_component_register(SRCS "${srcs}"# diff --git a/main/app_main.cpp b/main/app_main.cpp index 4d7ba21..3942e02 100644 --- a/main/app_main.cpp +++ b/main/app_main.cpp @@ -7,6 +7,7 @@ extern "C" #include "key.h" #include "wifi.h" #include "heating_plate.h" +#include "temp.h" } /*********************************************************************************************************************** * *******************************************************light******************************************************* * @@ -52,6 +53,7 @@ extern "C" void app_main(void) camera_init(); T_key_init(&T_key_structer); T_wifi_init(); + T_temp_init(); T_key_registered_cb(camera_recognition_reaction_plate); T_wifi_registered_cb(); diff --git a/main/temp.c b/main/temp.c new file mode 100644 index 0000000..8ed069a --- /dev/null +++ b/main/temp.c @@ -0,0 +1,14 @@ +/** + * @file temp.c + * @author Finny (tianjialong0106@163.com) + * @brief Temperature sensor + * @version 0.1 + * @date 2022-09-26 + * + * @copyright Copyright (c) 2022 + * + */ +#include "temp.h" + +void T_temp_init(void) {} +double T_temp_get_data(void) { return 0.0; } diff --git a/main/temp.h b/main/temp.h new file mode 100644 index 0000000..42b1cf2 --- /dev/null +++ b/main/temp.h @@ -0,0 +1,5 @@ +#pragma once +#include "stdlib.h" + +void T_temp_init(void); +double T_temp_get_data(void); \ No newline at end of file