Browse Source

update

Finny_test
zwsd 3 years ago
parent
commit
dd0144697d
  1. 24
      main/app_main.cpp
  2. 8
      main/heating_plate.h

24
main/app_main.cpp

@ -37,6 +37,13 @@ T_key_structer_t T_key_structer = {
.key_now_state = false,
};
/***********************************************************************************************************************
* ***************************************************heating_plate*************************************************** *
***********************************************************************************************************************/
heating_plate_structer_t heating_plate_structer = {
.heating_plate_preheat_finished_flag = false,
};
static void T_all_light_init(void)
{
T_power_light_init(&power_state_light_structer);
@ -45,22 +52,19 @@ static void T_all_light_init(void)
T_wifi_state_light_init(&wifi_state_light_structer);
}
/* 有反应板的处理 */
void process_camera_identifies_successful_event(void) {}
/* 没有反应板的处理(加热) */
void process_camera_identifies_failed_event(void)
void process_key_event(void)
{
if (T_temp_get_data() <= 48.0)
if (heating_plate_structer.heating_plate_preheat_finished_flag)
{
/* 加热完成 */
}
else
{
/* 加热未完成 */
T_heating_plate_start();
}
}
void process_key_event(void)
{
}
extern "C" void app_main(void)
{
T_debug_light_init();

8
main/heating_plate.h

@ -1,4 +1,10 @@
#pragma once
#pragma once
#include <stdbool.h>
typedef struct
{
bool heating_plate_preheat_finished_flag;
} heating_plate_structer_t;
void T_heating_plate_init(void);
void T_heating_plate_registered_cb(void);

Loading…
Cancel
Save