diff --git a/applications/main/nfc/plugins/supported_cards/social_moscow.c b/applications/main/nfc/plugins/supported_cards/social_moscow.c index 6f26cf833..805c77732 100644 --- a/applications/main/nfc/plugins/supported_cards/social_moscow.c +++ b/applications/main/nfc/plugins/supported_cards/social_moscow.c @@ -226,7 +226,7 @@ bool parse_transport_block(const MfClassicBlock* block, FuriString* result) { DateTime card_start_trip_minutes_s = {0}; from_minutes_to_datetime( - (card_start_trip_date)*24 * 60 + card_start_trip_time, + (card_start_trip_date) * 24 * 60 + card_start_trip_time, &card_start_trip_minutes_s, 1992); furi_string_printf( diff --git a/applications/main/nfc/plugins/supported_cards/troika.c b/applications/main/nfc/plugins/supported_cards/troika.c index 991d5be09..0ce076b47 100644 --- a/applications/main/nfc/plugins/supported_cards/troika.c +++ b/applications/main/nfc/plugins/supported_cards/troika.c @@ -175,7 +175,7 @@ bool parse_transport_block(const MfClassicBlock* block, FuriString* result) { DateTime card_start_trip_minutes_s = {0}; from_minutes_to_datetime( - (card_start_trip_date)*24 * 60 + card_start_trip_time, + (card_start_trip_date) * 24 * 60 + card_start_trip_time, &card_start_trip_minutes_s, 1992); furi_string_printf( @@ -252,7 +252,7 @@ bool parse_transport_block(const MfClassicBlock* block, FuriString* result) { DateTime card_start_trip_minutes_s = {0}; from_minutes_to_datetime( - (card_start_trip_date)*24 * 60 + card_start_trip_time, + (card_start_trip_date) * 24 * 60 + card_start_trip_time, &card_start_trip_minutes_s, 1992); furi_string_printf( @@ -426,7 +426,7 @@ bool parse_transport_block(const MfClassicBlock* block, FuriString* result) { from_days_to_datetime(card_use_before_date, &card_use_before_date_s, 1992); DateTime card_start_trip_minutes_s = {0}; from_minutes_to_datetime( - (card_start_trip_date)*24 * 60 + card_start_trip_time, + (card_start_trip_date) * 24 * 60 + card_start_trip_time, &card_start_trip_minutes_s, 1992); furi_string_printf( @@ -507,7 +507,7 @@ bool parse_transport_block(const MfClassicBlock* block, FuriString* result) { from_days_to_datetime(card_use_before_date, &card_use_before_date_s, 1992); DateTime card_start_trip_minutes_s = {0}; from_minutes_to_datetime( - (card_start_trip_date)*24 * 60 + card_start_trip_time, + (card_start_trip_date) * 24 * 60 + card_start_trip_time, &card_start_trip_minutes_s, 1992); furi_string_printf( @@ -647,7 +647,7 @@ bool parse_transport_block(const MfClassicBlock* block, FuriString* result) { DateTime card_start_trip_minutes_s = {0}; from_minutes_to_datetime( - (card_valid_to_date)*24 * 60 + card_valid_for_minutes - card_start_trip_neg_minutes, + (card_valid_to_date) * 24 * 60 + card_valid_for_minutes - card_start_trip_neg_minutes, &card_start_trip_minutes_s, 2016); //-time furi_string_printf( diff --git a/lib/subghz/protocols/magellan.c b/lib/subghz/protocols/magellan.c index 9d28afb31..260b11e75 100644 --- a/lib/subghz/protocols/magellan.c +++ b/lib/subghz/protocols/magellan.c @@ -403,43 +403,65 @@ static void subghz_protocol_magellan_get_event_serialize(uint8_t event, FuriStri const char* event_type; const char* event_subtype; - switch ((event >> 4) & 0x0F) { - case 0x00: event_type = "Nothing"; break; - case 0x01: event_type = "Door"; break; - case 0x02: event_type = "Motion"; break; - case 0x03: event_type = "Smoke Alarm"; break; - case 0x04: event_type = "REM1"; break; - case 0x05: - event_type = "REM1"; - event_subtype = "Off1"; - furi_string_cat_printf(output, "%s - %s", event_type, event_subtype); - return; - case 0x06: - event_type = "REM2"; - event_subtype = "Off1"; - furi_string_cat_printf(output, "%s - %s", event_type, event_subtype); - return; - default: event_type = "Unknown"; break; + switch((event >> 4) & 0x0F) { + case 0x00: + event_type = "Nothing"; + break; + case 0x01: + event_type = "Door"; + break; + case 0x02: + event_type = "Motion"; + break; + case 0x03: + event_type = "Smoke Alarm"; + break; + case 0x04: + event_type = "REM1"; + break; + case 0x05: + event_type = "REM1"; + event_subtype = "Off1"; + furi_string_cat_printf(output, "%s - %s", event_type, event_subtype); + return; + case 0x06: + event_type = "REM2"; + event_subtype = "Off1"; + furi_string_cat_printf(output, "%s - %s", event_type, event_subtype); + return; + default: + event_type = "Unknown"; + break; } - switch (event & 0x0F) { - case 0x00: - event_subtype = (((event >> 4) & 0x0F) > 0x03) ? "Arm1" : "Sealed"; - break; - case 0x01: - event_subtype = (((event >> 4) & 0x0F) > 0x03) ? "Btn1" : "Alarm"; - break; - case 0x02: - event_subtype = (((event >> 4) & 0x0F) > 0x03) ? "Btn2" : "Tamper"; - break; - case 0x03: - event_subtype = (((event >> 4) & 0x0F) > 0x03) ? "Btn3" : "Alarm + Tamper"; - break; - case 0x08: event_subtype = "Reset"; break; - case 0x09: event_subtype = "LowBatt"; break; - case 0x0A: event_subtype = "BattOk"; break; - case 0x0B: event_subtype = "Learn"; break; - default: event_subtype = "Unknown"; break; + switch(event & 0x0F) { + case 0x00: + event_subtype = (((event >> 4) & 0x0F) > 0x03) ? "Arm1" : "Sealed"; + break; + case 0x01: + event_subtype = (((event >> 4) & 0x0F) > 0x03) ? "Btn1" : "Alarm"; + break; + case 0x02: + event_subtype = (((event >> 4) & 0x0F) > 0x03) ? "Btn2" : "Tamper"; + break; + case 0x03: + event_subtype = (((event >> 4) & 0x0F) > 0x03) ? "Btn3" : "Alarm + Tamper"; + break; + case 0x08: + event_subtype = "Reset"; + break; + case 0x09: + event_subtype = "LowBatt"; + break; + case 0x0A: + event_subtype = "BattOk"; + break; + case 0x0B: + event_subtype = "Learn"; + break; + default: + event_subtype = "Unknown"; + break; } furi_string_cat_printf(output, "%s - %s", event_type, event_subtype);