nfc_scene_field.c 825 B

123456789101112131415161718192021222324252627282930313233
  1. #include "../nfc_i.h"
  2. void nfc_scene_field_on_enter(void* context) {
  3. Nfc* nfc = context;
  4. furi_hal_nfc_field_on();
  5. Popup* popup = nfc->popup;
  6. popup_set_header(
  7. popup,
  8. "Field is on\nDon't leave device\nin this mode for too long.",
  9. 64,
  10. 11,
  11. AlignCenter,
  12. AlignTop);
  13. view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewPopup);
  14. notification_internal_message(nfc->notifications, &sequence_set_blue_255);
  15. }
  16. bool nfc_scene_field_on_event(void* context, SceneManagerEvent event) {
  17. UNUSED(context);
  18. UNUSED(event);
  19. return false;
  20. }
  21. void nfc_scene_field_on_exit(void* context) {
  22. Nfc* nfc = context;
  23. furi_hal_nfc_field_off();
  24. notification_internal_message(nfc->notifications, &sequence_reset_blue);
  25. popup_reset(nfc->popup);
  26. }