Browse Source

update

Finny_test
zwsd 3 years ago
parent
commit
908550b1c2
  1. 2
      main/app_main.cpp
  2. 6
      main/heating_plate.c
  3. 4
      main/heating_plate.h

2
main/app_main.cpp

@ -74,8 +74,10 @@ extern "C" void app_main(void)
T_key_init(&T_key_structer);
T_wifi_init();
T_temp_init();
T_key_registered_cb(process_key_event);
T_wifi_registered_cb();
T_heating_plate_registered_cb(T_temp_get_data);
while (true)
{

6
main/heating_plate.c

@ -11,12 +11,14 @@
#include "heating_plate.h"
static get_temp_callback_t get_temp_cb_s;
void T_heating_plate_init(void) {}
void T_heating_plate_registered_cb(void) {}
void T_heating_plate_registered_cb(get_temp_callback_t cb) { get_temp_cb_s = cb; }
void T_heating_plate_start(void) {}
void T_heating_plate_stop(void) {}
void T_heating_plate_schedule(void) {}
void T_heating_plate_schedule(void) { get_temp_cb_s(); }

4
main/heating_plate.h

@ -6,8 +6,10 @@ typedef struct
bool heating_plate_preheat_finished_flag;
} heating_plate_structer_t;
typedef double(*get_temp_callback_t)(void);
void T_heating_plate_init(void);
void T_heating_plate_registered_cb(void);
void T_heating_plate_registered_cb(get_temp_callback_t cb);
void T_heating_plate_start(void);
void T_heating_plate_stop(void);
void T_heating_plate_schedule(void);
Loading…
Cancel
Save