Formatted code (#1007)

* Updated style

* Updated files

* fixed new line

* Updated spacing

* File fix WIP

* Updated to clang 13

* updated comment style

* Removed old comment code
This commit is contained in:
jLynx 2023-05-19 08:16:05 +12:00 committed by GitHub
parent 7aca7ce74d
commit 033c4e9a5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
599 changed files with 70746 additions and 66896 deletions

View file

@ -24,39 +24,37 @@
namespace ui {
Thread* WipeSDView::thread { nullptr };
Thread* WipeSDView::thread{nullptr};
WipeSDView::WipeSDView(NavigationView& nav) : nav_ (nav) {
add_children({
&text_info,
&progress,
&dummy
});
WipeSDView::WipeSDView(NavigationView& nav)
: nav_(nav) {
add_children({&text_info,
&progress,
&dummy});
}
WipeSDView::~WipeSDView() {
if (thread)
chThdTerminate(thread);
if (thread)
chThdTerminate(thread);
}
void WipeSDView::focus() {
BlockDeviceInfo block_device_info;
dummy.focus();
if (!confirmed) {
nav_.push<ModalMessageView>("Warning !", "Wipe FAT of SD card?", YESCANCEL, [this](bool choice) {
if (choice)
confirmed = true;
}
);
} else {
if (sdcGetInfo(&SDCD1, &block_device_info) == CH_SUCCESS) {
thread = chThdCreateFromHeap(NULL, 2048, NORMALPRIO, WipeSDView::static_fn, this);
} else {
nav_.pop(); // Just silently abort for now
}
}
BlockDeviceInfo block_device_info;
dummy.focus();
if (!confirmed) {
nav_.push<ModalMessageView>("Warning !", "Wipe FAT of SD card?", YESCANCEL, [this](bool choice) {
if (choice)
confirmed = true;
});
} else {
if (sdcGetInfo(&SDCD1, &block_device_info) == CH_SUCCESS) {
thread = chThdCreateFromHeap(NULL, 2048, NORMALPRIO, WipeSDView::static_fn, this);
} else {
nav_.pop(); // Just silently abort for now
}
}
}
} /* namespace ui */