Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

touch to pop splash #2260

Merged
merged 10 commits into from
Sep 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove debug things
  • Loading branch information
zxkmm committed Sep 23, 2024
commit 3c6779e28eaa74ac4cd12d1fdf0531e560459153
14 changes: 0 additions & 14 deletions firmware/application/ui_navigation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@
#include "file_path.hpp"
#include "ff.h"

#include "usb_serial_asyncmsg.hpp"

#include <locale>
#include <codecvt>

Expand Down Expand Up @@ -1002,7 +1000,6 @@ BMPView::BMPView(NavigationView& nav)
: nav_(nav) {
add_children({&button_done});

// portapack::async_tx_enabled = true; // debug, remember to remove
button_done.on_select = [this](Button&) {
nav_.pop();
};
Expand All @@ -1021,21 +1018,17 @@ bool BMPView::on_touch(const TouchEvent event) {
* when that fixed (so the threshold won't make the corner always been touched), just un-comment one of the field and two var in header to make it works.
*/

UsbSerialAsyncmsg::asyncmsg("on touch");
if (!nav_.is_valid()) {
// UsbSerialAsyncmsg::asyncmsg("nav is invalid1");
return false;
}

switch (event.type) {
case TouchEvent::Type::Start:
// UsbSerialAsyncmsg::asyncmsg("case1 start");
chThdSleep(10);
handle_pop();
return false;

case TouchEvent::Type::End:
// UsbSerialAsyncmsg::asyncmsg("case2 end");
chThdSleep(10);
handle_pop();
return false;
Expand All @@ -1047,15 +1040,11 @@ bool BMPView::on_touch(const TouchEvent event) {
/// drag any direction to pop (like samsung phone)
// switch (event.type) {
// case TouchEvent::Type::Start:
// UsbSerialAsyncmsg::asyncmsg("case1 start");
// touch_start = event.point.y();
// UsbSerialAsyncmsg::asyncmsg(touch_start);
// return true;
//
// case TouchEvent::Type::End:
// UsbSerialAsyncmsg::asyncmsg("case2 end");
// touch_end = event.point.y();
// UsbSerialAsyncmsg::asyncmsg(touch_end);
//
// if (abs(touch_start - touch_end) > 100) {
// if (touch_start < touch_end) {
Expand All @@ -1065,7 +1054,6 @@ bool BMPView::on_touch(const TouchEvent event) {
// return true;
//
// default:
// // UsbSerialAsyncmsg::asyncmsg("fb");
// break;
// }

Expand Down Expand Up @@ -1095,11 +1083,9 @@ bool BMPView::on_touch(const TouchEvent event) {
}

void BMPView::handle_pop() {
UsbSerialAsyncmsg::asyncmsg("handle pop");
if (nav_.is_valid()) {
nav_.pop();
}
UsbSerialAsyncmsg::asyncmsg("nav is invalid2");
}

/* NotImplementedView ****************************************************/
Expand Down
Loading