nfc_scene_field.c 825 B

12345678910111213141516171819202122232425262728293031323334
  1. #include "../nfc_i.h"
  2. void nfc_scene_field_on_enter(void* context) {
  3. Nfc* 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. return false;
  18. }
  19. void nfc_scene_field_on_exit(void* context) {
  20. Nfc* nfc = (Nfc*)context;
  21. notification_internal_message(nfc->notifications, &sequence_reset_blue);
  22. Popup* popup = nfc->popup;
  23. popup_reset(popup);
  24. furi_hal_nfc_field_off();
  25. }