mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-27 16:17:31 -04:00
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:
parent
7aca7ce74d
commit
033c4e9a5b
599 changed files with 70746 additions and 66896 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue