[FL-976] Removing lambdas (#1849)
* Removing lambdas... * Wake the fk up, Gordon! We have a citadel to burn! * Here comes the Nihilanth * Lambda documentation Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -145,29 +145,33 @@ void bad_usb_set_ok_callback(BadUsb* bad_usb, BadUsbOkCallback callback, void* c
|
||||
furi_assert(bad_usb);
|
||||
furi_assert(callback);
|
||||
with_view_model(
|
||||
bad_usb->view, (BadUsbModel * model) {
|
||||
bad_usb->view,
|
||||
BadUsbModel * model,
|
||||
{
|
||||
UNUSED(model);
|
||||
bad_usb->callback = callback;
|
||||
bad_usb->context = context;
|
||||
return true;
|
||||
});
|
||||
},
|
||||
true);
|
||||
}
|
||||
|
||||
void bad_usb_set_file_name(BadUsb* bad_usb, const char* name) {
|
||||
furi_assert(name);
|
||||
with_view_model(
|
||||
bad_usb->view, (BadUsbModel * model) {
|
||||
strlcpy(model->file_name, name, MAX_NAME_LEN);
|
||||
return true;
|
||||
});
|
||||
bad_usb->view,
|
||||
BadUsbModel * model,
|
||||
{ strlcpy(model->file_name, name, MAX_NAME_LEN); },
|
||||
true);
|
||||
}
|
||||
|
||||
void bad_usb_set_state(BadUsb* bad_usb, BadUsbState* st) {
|
||||
furi_assert(st);
|
||||
with_view_model(
|
||||
bad_usb->view, (BadUsbModel * model) {
|
||||
bad_usb->view,
|
||||
BadUsbModel * model,
|
||||
{
|
||||
memcpy(&(model->state), st, sizeof(BadUsbState));
|
||||
model->anim_frame ^= 1;
|
||||
return true;
|
||||
});
|
||||
},
|
||||
true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user