fbt format

This commit is contained in:
MX 2024-07-08 07:37:28 +03:00
parent 646bc7db23
commit e4f315188b
No known key found for this signature in database
GPG key ID: 7CCC66B7DBDD1C83
8 changed files with 14 additions and 12 deletions

View file

@ -18,8 +18,7 @@ const uint32_t default_passwords[] = {
0xA0000000, 0xA0A1A2A3, 0xA5B4C3D2, 0xAA55AA55, 0xAA55BBBB, 0xAAAAAAAA, 0xAABBCCDD, 0xABCD1234,
0xB0000000, 0xB0B1B2B3, 0xB5F44686, 0xBBBBBBBB, 0xBBCCDDEE, 0xC0000000, 0xC0F5009A, 0xC6EF3720,
0xCCCCCCCC, 0xCCDDEEFF, 0xD0000000, 0xDDDDDDDD, 0xDEADC0DE, 0xE0000000, 0xE4204998, 0xE9920427,
0xEEEEEEEE, 0xF0000000, 0xF1EA5EED, 0xF9DCEBA0, 0xFABADA11, 0xFEEDBEEF, 0xFFFFFFFF
};
0xEEEEEEEE, 0xF0000000, 0xF1EA5EED, 0xF9DCEBA0, 0xFABADA11, 0xFEEDBEEF, 0xFFFFFFFF};
const uint32_t* lfrfid_get_t5577_default_passwords(uint8_t* len) {
*len = sizeof(default_passwords) / sizeof(uint32_t);

View file

@ -68,7 +68,8 @@ void nfc_render_emv_application(const EmvApplication* apl, FuriString* str) {
const uint8_t len = apl->aid_len;
furi_string_cat_printf(str, "AID: ");
for(uint8_t i = 0; i < len; i++) furi_string_cat_printf(str, "%02X", apl->aid[i]);
for(uint8_t i = 0; i < len; i++)
furi_string_cat_printf(str, "%02X", apl->aid[i]);
furi_string_cat_printf(str, "\n");
}

View file

@ -59,7 +59,7 @@ static const MfClassicKeyPair social_moscow_4k_keys[] = {
{.a = 0xa229e68ad9e5, .b = 0x49c2b5296ef4}, {.a = 0xa229e68ad9e5, .b = 0x49c2b5296ef4},
};
#define TOPBIT(X) (1 << ((X)-1))
#define TOPBIT(X) (1 << ((X) - 1))
void from_days_to_datetime(uint16_t days, DateTime* datetime, uint16_t start_year) {
uint32_t timestamp = days * 24 * 60 * 60;

View file

@ -402,7 +402,8 @@ uint32_t round_int(uint32_t value, uint8_t n) {
value /= 10;
if(i >= 5) value++;
}
while(on--) value *= 10;
while(on--)
value *= 10;
return value;
}

View file

@ -289,8 +289,7 @@ HidNumpad* hid_numpad_alloc(Hid* bt_hid) {
view_set_draw_callback(hid_numpad->view, hid_numpad_draw_callback);
view_set_input_callback(hid_numpad->view, hid_numpad_input_callback);
with_view_model(
hid_numpad->view, HidNumpadModel * model, { model->y = 0; }, true);
with_view_model(hid_numpad->view, HidNumpadModel * model, { model->y = 0; }, true);
return hid_numpad;
}

View file

@ -456,14 +456,16 @@ MassStorageUsb* mass_storage_usb_start(const char* filename, SCSIDeviceFunc fn)
struct usb_string_descriptor* str_prod_descr = malloc(len * 2 + 2);
str_prod_descr->bLength = len * 2 + 2;
str_prod_descr->bDescriptorType = USB_DTYPE_STRING;
for(uint8_t i = 0; i < len; i++) str_prod_descr->wString[i] = name[i];
for(uint8_t i = 0; i < len; i++)
str_prod_descr->wString[i] = name[i];
mass->usb.str_prod_descr = str_prod_descr;
len = strlen(filename);
struct usb_string_descriptor* str_serial_descr = malloc(len * 2 + 2);
str_serial_descr->bLength = len * 2 + 2;
str_serial_descr->bDescriptorType = USB_DTYPE_STRING;
for(uint8_t i = 0; i < len; i++) str_serial_descr->wString[i] = filename[i];
for(uint8_t i = 0; i < len; i++)
str_serial_descr->wString[i] = filename[i];
mass->usb.str_serial_descr = str_serial_descr;
mass->fn = fn;

View file

@ -52,7 +52,8 @@ void lfrfid_worker_delay(LFRFIDWorker* worker, uint32_t milliseconds) {
void t5577_trace(LFRFIDT5577 t5577, const char* message) {
if(furi_log_get_level() == FuriLogLevelTrace) {
FURI_LOG_T(TAG, "%s", message);
for(uint8_t i = 0; i < 8; i++) FURI_LOG_T(TAG, "\nBlock %u %08lX", i, t5577.block[i]);
for(uint8_t i = 0; i < 8; i++)
FURI_LOG_T(TAG, "\nBlock %u %08lX", i, t5577.block[i]);
FURI_LOG_T(TAG, "Mask: %u", t5577.mask);
FURI_LOG_T(TAG, "Blocks to write: %lu", t5577.blocks_to_write);
}

View file

@ -352,8 +352,7 @@ void protocol_em4100_render_data(ProtocolEM4100* protocol, FuriString* result) {
data[2],
(uint16_t)((data[3] << 8) | (data[4])),
protocol->clock_per_bit,
(uint32_t)((data[2] << 16) | (data[3] << 8) | (data[4]))
);
(uint32_t)((data[2] << 16) | (data[3] << 8) | (data[4])));
};
const ProtocolBase protocol_em4100 = {