Skip to content

Commit 7b9517f

Browse files
authored
Merge pull request #10 from luu176/dev
v0.3
2 parents 19267b0 + 4a0bf50 commit 7b9517f

21 files changed

+3110
-96
lines changed

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
## v0.1
22

33
- Initial release by luu176
4+
45
## v0.2
56

67
- Update Rav-Kav parsing to show more data such as transaction logs
7-
- Add Navigo parser!
8+
- Add Navigo parser! (Paris, France)
89
- Bug fixes
10+
11+
## v0.3
12+
13+
- Added Clipper parser (San Francisco, CA, USA)
14+
- Added Troika parser (Moscow, Russia)
15+
- Added Myki parser (Melbourne (and surrounds), VIC, Australia)
16+
- Added Opal parser (Sydney (and surrounds), NSW, Australia)
17+
- Added ITSO parser (United Kingdom)

README.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,29 @@ This is a list of metro cards and transit systems that need support or have part
1010

1111
## ✅ Supported Cards
1212
- [x] **Rav-Kav**
13-
- Status: Needs more functionality (currently only able to read balance).
13+
- Status: Partially Supported
1414
- [x] **Charliecard**
1515
- Status: Fully supported.
1616
- [x] **Metromoney**
1717
- Status: Fully supported.
1818
- [x] **Bip!**
1919
- Status: Fully supported.
2020
- [x] **Navigo**
21-
- Status: Fully supported. (v0.2)
22-
23-
## 🚧 In Progress / Needs More Functionality
24-
- [ ] **Rav-Kav**
25-
- Current functionality: Reads balance only. (v0.1)
26-
- To Do: Parse more data from the card (e.g., transaction history, expiration date, etc.). (v0.2)
21+
- Status: Fully supported.
22+
- [x] **Troika**
23+
- Status: Fully supported.
24+
- [x] **Clipper**
25+
- Status: Fully supported.
26+
- [x] **Myki**
27+
- Status: Fully supported.
28+
- [x] **Opal**
29+
- Status: Fully supported.
30+
- [x] **ITSO**
31+
- Status: Fully supported.
2732

2833
## 📝 To Do (Unimplemented)
2934
- [ ] **Tianjin Railway Transit (TRT)**
3035
- To Do: Add support for reading and analyzing Tianjin Railway Transit cards.
31-
- [ ] **Clipper**
32-
- To Do: Add support for reading and analyzing Clipper cards. (v0.3)
33-
3436

3537
---
3638

@@ -41,5 +43,9 @@ This is a list of metro cards and transit systems that need support or have part
4143
- **Navigo Parser**: [@luu176](https://github.com/luu176)
4244
- **Metromoney Parser**: [@Leptopt1los](https://github.com/Leptopt1los)
4345
- **Bip! Parser**: [@rbasoalto](https://github.com/rbasoalto) [@gornekich](https://github.com/gornekich)
44-
- **Info Slave**: [@equipter](https://github.com/equipter)
45-
46+
- **Clipper Parser**: [@ke6jjj](https://github.com/ke6jjj)
47+
- **Troika Parser**: [@gornekich](https://github.com/gornekich)
48+
- **Myki Parser**: [@gornekich](https://github.com/gornekich)
49+
- **Opal parser**: [@gornekich](https://github.com/gornekich)
50+
- **ITSO parser**: [@gsp8181](https://github.com/gsp8181), [@hedger](https://github.com/hedger), [@gornekich](https://github.com/gornekich)
51+
- **Info Slaves**: [@equipter](https://github.com/equipter), [TheDingo8MyBaby](https://github.com/TheDingo8MyBaby)

api/mosgortrans/mosgortrans_util.c

Lines changed: 1322 additions & 0 deletions
Large diffs are not rendered by default.

api/mosgortrans/mosgortrans_util.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#pragma once
2+
3+
#include <bit_lib.h>
4+
#include <datetime.h>
5+
#include <furi/core/string.h>
6+
#include <nfc/protocols/mf_classic/mf_classic.h>
7+
#include <furi_hal_rtc.h>
8+
9+
#ifdef __cplusplus
10+
extern "C" {
11+
#endif
12+
13+
void render_section_header(
14+
FuriString* str,
15+
const char* name,
16+
uint8_t prefix_separator_cnt,
17+
uint8_t suffix_separator_cnt);
18+
bool mosgortrans_parse_transport_block(const MfClassicBlock* block, FuriString* result);
19+
20+
#ifdef __cplusplus
21+
}
22+
#endif

app/README.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,36 @@ This is a list of metro cards and transit systems that are supported.
1212
- **Rav-Kav**
1313
- Status: Partially supported
1414
- **Navigo**
15-
- Status: Fully supported
15+
- Status: Fully supported.
1616
- **Charliecard**
17-
- Status: Fully supported
17+
- Status: Fully supported.
1818
- **Metromoney**
19-
- Status: Fully supported
19+
- Status: Fully supported.
2020
- **Bip!**
21-
- Status: Fully supported
21+
- Status: Fully supported.
22+
- **Clipper**
23+
- Status: Fully supported.
24+
- **Troika**
25+
- Status: Fully supported.
26+
- **Myki**
27+
- Status: Fully supported.
28+
- **Opal**
29+
- Status: Fully supported.
30+
- **ITSO**
31+
- Status: Fully supported.
2232

23-
More coming soon!
33+
More coming soon!
2434

25-
## Credits
26-
- App Author: luu176
27-
- Charliecard Parser: zacharyweiss
28-
- Rav-Kav Parser: luu176
29-
- Navigo Parser: luu176
30-
- Metromoney Parser: Leptopt1los
31-
- Bip! Parser: rbasoalto, gornekich
32-
- Info Slave: equipter
35+
## Credits:
36+
- **App Author**: luu176
37+
- **Charliecard Parser**: zacharyweiss
38+
- **Rav-Kav Parser**: luu176
39+
- **Navigo Parser**: luu176
40+
- **Metromoney Parser**: Leptopt1los
41+
- **Bip! Parser**: rbasoaltor & gornekich
42+
- **Clipper Parser**: ke6jjj
43+
- **Troika Parser**: gornekich
44+
- **Myki Parser**: gornekich
45+
- **Opal parser**: gornekich
46+
- **ITSO parser**: gsp8181, hedger, gornekich
47+
- **Info Slaves**: Equip, TheDingo8MyBaby

metroflip.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,15 @@ void metroflip_app_blink_stop(Metroflip* metroflip) {
126126
notification_message(metroflip->notifications, &metroflip_app_sequence_blink_stop);
127127
}
128128

129+
void metroflip_exit_widget_callback(GuiButtonType result, InputType type, void* context) {
130+
Metroflip* app = context;
131+
UNUSED(result);
132+
133+
if(type == InputTypeShort) {
134+
scene_manager_search_and_switch_to_previous_scene(app->scene_manager, MetroflipSceneStart);
135+
}
136+
}
137+
129138
// Calypso
130139

131140
void byte_to_binary(uint8_t byte, char* bits) {

metroflip_i.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ void metroflip_app_blink_stop(Metroflip* metroflip);
122122
if(!(locked)) submenu_add_item(submenu, label, index, callback, callback_context)
123123
#endif
124124

125+
void metroflip_exit_widget_callback(GuiButtonType result, InputType type, void* context);
126+
125127
///////////////////////////////// Calypso /////////////////////////////////
126128

127129
#define Metroflip_POLLER_MAX_BUFFER_SIZE 1024

scenes/metroflip_scene_about.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,6 @@
33

44
#define TAG "Metroflip:Scene:About"
55

6-
void metroflip_about_widget_callback(GuiButtonType result, InputType type, void* context) {
7-
Metroflip* app = context;
8-
UNUSED(result);
9-
10-
if(type == InputTypeShort) {
11-
scene_manager_search_and_switch_to_previous_scene(app->scene_manager, MetroflipSceneStart);
12-
}
13-
}
14-
156
void metroflip_scene_about_on_enter(void* context) {
167
Metroflip* app = context;
178
Widget* widget = app->widget;
@@ -29,7 +20,7 @@ void metroflip_scene_about_on_enter(void* context) {
2920
widget_add_text_scroll_element(widget, 0, 0, 128, 64, furi_string_get_cstr(str));
3021

3122
widget_add_button_element(
32-
widget, GuiButtonTypeRight, "Exit", metroflip_about_widget_callback, app);
23+
widget, GuiButtonTypeRight, "Exit", metroflip_exit_widget_callback, app);
3324

3425
furi_string_free(str);
3526
view_dispatcher_switch_to_view(app->view_dispatcher, MetroflipViewWidget);

scenes/metroflip_scene_bip.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -272,15 +272,6 @@ static bool
272272
return parsed;
273273
}
274274

275-
void metroflip_bip_widget_callback(GuiButtonType result, InputType type, void* context) {
276-
Metroflip* app = context;
277-
UNUSED(result);
278-
279-
if(type == InputTypeShort) {
280-
scene_manager_search_and_switch_to_previous_scene(app->scene_manager, MetroflipSceneStart);
281-
}
282-
}
283-
284275
static NfcCommand metroflip_scene_bip_poller_callback(NfcGenericEvent event, void* context) {
285276
furi_assert(context);
286277
furi_assert(event.event_data);
@@ -332,7 +323,7 @@ static NfcCommand metroflip_scene_bip_poller_callback(NfcGenericEvent event, voi
332323
widget_add_text_scroll_element(widget, 0, 0, 128, 64, furi_string_get_cstr(parsed_data));
333324

334325
widget_add_button_element(
335-
widget, GuiButtonTypeRight, "Exit", metroflip_bip_widget_callback, app);
326+
widget, GuiButtonTypeRight, "Exit", metroflip_exit_widget_callback, app);
336327

337328
furi_string_free(parsed_data);
338329
view_dispatcher_switch_to_view(app->view_dispatcher, MetroflipViewWidget);

scenes/metroflip_scene_charliecard.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,15 +1183,6 @@ static bool charliecard_parse(FuriString* parsed_data, const MfClassicData* data
11831183
return parsed;
11841184
}
11851185

1186-
void metroflip_charliecard_widget_callback(GuiButtonType result, InputType type, void* context) {
1187-
Metroflip* app = context;
1188-
UNUSED(result);
1189-
1190-
if(type == InputTypeShort) {
1191-
scene_manager_search_and_switch_to_previous_scene(app->scene_manager, MetroflipSceneStart);
1192-
}
1193-
}
1194-
11951186
static NfcCommand
11961187
metroflip_scene_charlicard_poller_callback(NfcGenericEvent event, void* context) {
11971188
furi_assert(context);
@@ -1243,7 +1234,7 @@ static NfcCommand
12431234
widget_add_text_scroll_element(widget, 0, 0, 128, 64, furi_string_get_cstr(parsed_data));
12441235

12451236
widget_add_button_element(
1246-
widget, GuiButtonTypeRight, "Exit", metroflip_charliecard_widget_callback, app);
1237+
widget, GuiButtonTypeRight, "Exit", metroflip_exit_widget_callback, app);
12471238

12481239
furi_string_free(parsed_data);
12491240
view_dispatcher_switch_to_view(app->view_dispatcher, MetroflipViewWidget);

0 commit comments

Comments
 (0)