Format for toolchain 37, update changelog

This commit is contained in:
Willy-JL
2024-07-05 20:07:11 +02:00
parent 4830ef94c6
commit 0f4f844ff1
15 changed files with 52 additions and 46 deletions
+1
View File
@@ -74,6 +74,7 @@
- OFW: Coalesce some allocations, smaller memory footprint (by @CookiePLMonster)
- OFW: Put Input state data on the stack of the service (by @CookiePLMonster)
- OFW: BLE: Update to copro light stack v1.20.0 (by @hedger)
- OFW: FBT: Toolchain v37 (by @hedger)
- OFW: Code Cleanup: Unused includes, useless checks, unused variables, etc... (by @skotopes)
### Fixed:
@@ -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");
}
+16 -13
View File
@@ -28,7 +28,8 @@ uint8_t minmea_checksum(const char* sentence) {
uint8_t checksum = 0x00;
// The optional checksum is an XOR of all bytes between "$" and "*".
while(*sentence && *sentence != '*') checksum ^= *sentence++;
while(*sentence && *sentence != '*')
checksum ^= *sentence++;
return checksum;
}
@@ -82,17 +83,18 @@ bool minmea_scan(const char* sentence, const char* format, ...) {
va_start(ap, format);
const char* field = sentence;
#define next_field() \
do { \
/* Progress to the next field. */ \
while(minmea_isfield(*sentence)) sentence++; \
/* Make sure there is a field there. */ \
if(*sentence == ',') { \
sentence++; \
field = sentence; \
} else { \
field = NULL; \
} \
#define next_field() \
do { \
/* Progress to the next field. */ \
while(minmea_isfield(*sentence)) \
sentence++; \
/* Make sure there is a field there. */ \
if(*sentence == ',') { \
sentence++; \
field = sentence; \
} else { \
field = NULL; \
} \
} while(0)
while(*format) {
@@ -209,7 +211,8 @@ bool minmea_scan(const char* sentence, const char* format, ...) {
char* buf = va_arg(ap, char*);
if(field) {
while(minmea_isfield(*field)) *buf++ = *field++;
while(minmea_isfield(*field))
*buf++ = *field++;
}
*buf = '\0';
@@ -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;
}
+1 -2
View File
@@ -497,8 +497,7 @@ static bool menu_input_callback(InputEvent* event, void* context) {
static void menu_scroll_timer_callback(void* context) {
Menu* menu = context;
with_view_model(
menu->view, MenuModel * model, { model->scroll_counter++; }, true);
with_view_model(menu->view, MenuModel * model, { model->scroll_counter++; }, true);
}
static void menu_enter(void* context) {
+2 -1
View File
@@ -94,7 +94,8 @@ unsigned char* base64_decode(const unsigned char* src, size_t len, size_t* out_l
int pad = 0;
os_memset(dtable, 0x80, 256);
for(i = 0; i < sizeof(base64_table) - 1; i++) dtable[base64_table[i]] = (unsigned char)i;
for(i = 0; i < sizeof(base64_table) - 1; i++)
dtable[base64_table[i]] = (unsigned char)i;
dtable['='] = 0;
count = 0;
@@ -162,8 +162,7 @@ void findmy_main_set_callback(FindMyMain* findmy_main, FindMyMainCallback callba
void findmy_main_update_active(FindMyMain* findmy_main, bool active) {
furi_assert(findmy_main);
with_view_model(
findmy_main->view, FindMyMainModel * model, { model->active = active; }, true);
with_view_model(findmy_main->view, FindMyMainModel * model, { model->active = active; }, true);
}
void findmy_main_toggle_mac(FindMyMain* findmy_main, bool show_mac) {
@@ -190,6 +189,5 @@ void findmy_main_update_interval(FindMyMain* findmy_main, uint8_t interval) {
void findmy_main_update_type(FindMyMain* findmy_main, FindMyType type) {
furi_assert(findmy_main);
with_view_model(
findmy_main->view, FindMyMainModel * model, { model->type = type; }, true);
with_view_model(findmy_main->view, FindMyMainModel * model, { model->type = type; }, true);
}
@@ -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;
}
@@ -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;
+3 -3
View File
@@ -74,9 +74,9 @@ env = ENV.Clone(
FW_API_TABLE=None,
_APP_ICONS=None,
APPS=_.split(",") if (_ := GetOption("extra_int_apps")) else [],
EXTRA_EXT_APPS=_.split(",")
if (_ := GetOption("extra_ext_apps"))
else ENV["EXTRA_EXT_APPS"],
EXTRA_EXT_APPS=(
_.split(",") if (_ := GetOption("extra_ext_apps")) else ENV["EXTRA_EXT_APPS"]
),
)
env.PreConfigureFwEnvionment()
+2 -1
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);
}
+5 -5
View File
@@ -14,11 +14,11 @@ def padded_hex(i, l):
return (
"0x" + hex_result
if num_hex_chars == given_len
else "?" * given_len
if num_hex_chars > given_len
else "0x" + extra_zeros + hex_result
if num_hex_chars < given_len
else None
else (
"?" * given_len
if num_hex_chars > given_len
else "0x" + extra_zeros + hex_result if num_hex_chars < given_len else None
)
)
+5 -5
View File
@@ -14,11 +14,11 @@ def padded_hex(i, l):
return (
"0x" + hex_result
if num_hex_chars == given_len
else "?" * given_len
if num_hex_chars > given_len
else "0x" + extra_zeros + hex_result
if num_hex_chars < given_len
else None
else (
"?" * given_len
if num_hex_chars > given_len
else "0x" + extra_zeros + hex_result if num_hex_chars < given_len else None
)
)
+5 -5
View File
@@ -14,11 +14,11 @@ def padded_hex(i, l):
return (
"0x" + hex_result
if num_hex_chars == given_len
else "?" * given_len
if num_hex_chars > given_len
else "0x" + extra_zeros + hex_result
if num_hex_chars < given_len
else None
else (
"?" * given_len
if num_hex_chars > given_len
else "0x" + extra_zeros + hex_result if num_hex_chars < given_len else None
)
)