You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.0 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. #include "camera.h"
  2. //
  3. extern "C"
  4. {
  5. #include "ble_spp_server_demo.h"
  6. #include "light.h"
  7. }
  8. power_state_light_structer_t power_state_light_structer = {
  9. .state = ShutDown,
  10. .change_flag = false,
  11. };
  12. heating_state_light_structer_t heating_state_light_structer = {
  13. .state = NoHeat,
  14. .change_flag = false,
  15. };
  16. reaction_state_light_structer_t reaction_state_light_structer = {
  17. .state = NoReaction,
  18. .change_flag = false,
  19. };
  20. wifi_state_light_structer_t wifi_state_light_structer = {
  21. .state = NotConnected,
  22. .change_flag = false,
  23. };
  24. static void T_all_light_init(void)
  25. {
  26. T_power_light_init(&power_state_light_structer);
  27. T_heating_state_light_init(&heating_state_light_structer);
  28. T_reaction_state_light_init(&reaction_state_light_structer);
  29. T_wifi_state_light_init(&wifi_state_light_structer);
  30. }
  31. extern "C" void app_main(void)
  32. {
  33. T_debug_light_init();
  34. T_all_light_init();
  35. ble_spp_server_init();
  36. camera_motion_detection_init();
  37. while (true)
  38. {
  39. T_debug_light_schedule();
  40. T_light_schedule();
  41. }
  42. }