-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add NFC Emulate UID(works only for FeliCa)
- Loading branch information
Showing
16 changed files
with
295 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* This file is part of the Capibara zero (https://github.com/CapibaraZero/fw or | ||
* https://capibarazero.github.io/). Copyright (c) 2025 Andrea Canale. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, version 3. | ||
* | ||
* This program is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include "NFCEmulateTagPage.hpp" | ||
#include "../../navigation/NFC/NFCNavigation.hpp" | ||
|
||
#include "gui.hpp" | ||
|
||
NFCEmulateTagPage::~NFCEmulateTagPage() { | ||
delete emulate_text; | ||
delete exit_page; | ||
} | ||
|
||
void NFCEmulateTagPage::display() { | ||
grid = new Grid(screen, 2, 1); | ||
emulate_text = | ||
new Text(screen, ST77XX_WHITE, "Emulating tag..."); | ||
exit_page = new List(screen, "Exit", 2, ST77XX_WHITE, 20, ST77XX_BLACK, goto_home); | ||
grid->add(emulate_text); | ||
grid->add(exit_page); | ||
grid->set_y_spacing(20); | ||
grid->set_selected(1, true); | ||
grid->display(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* This file is part of the Capibara zero (https://github.com/CapibaraZero/fw or | ||
* https://capibarazero.github.io/). Copyright (c) 2025 Andrea Canale. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, version 3. | ||
* | ||
* This program is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include "../../i18n.hpp" | ||
#include "../../i18n/NFC/nfc_format_page_keys.h" | ||
#include "../Page.hpp" | ||
#include "Grid.hpp" | ||
#include "List.hpp" | ||
#include "Text.hpp" | ||
|
||
#ifndef NFC_EMULATE_PAGE_H | ||
#define NFC_EMULATE_PAGE_H | ||
|
||
class NFCEmulateTagPage : public Page { | ||
private: | ||
Text *emulate_text; | ||
List *exit_page; | ||
|
||
public: | ||
NFCEmulateTagPage(uint8_t _position_limit, uint8_t _lower_limit, | ||
uint8_t _position_increment, GFXForms *screen) | ||
: Page(_position_limit, _lower_limit, _position_increment, screen) { | ||
}; | ||
~NFCEmulateTagPage(); | ||
void display(); | ||
|
||
void click(int pos, void callback()) { grid->click(pos, callback); }; | ||
void set_selected(int pos, bool status) { grid->set_selected(pos, status); }; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.