aboutsummaryrefslogtreecommitdiffstats
path: root/source/controller.cpp
diff options
context:
space:
mode:
authortcsullivan <tullivan99@gmail.com>2019-04-01 22:41:39 -0400
committertcsullivan <tullivan99@gmail.com>2019-04-01 22:41:39 -0400
commite064af7bf4d18e7397318d40b40deb1caa4a52ec (patch)
tree2f954458922bacd0c44eef1586691cfa211d7c59 /source/controller.cpp
parentd1a1e7a053cb8840e9c90b380a005ddd2caf3eff (diff)
fullscreen widgets, limited scrolling
Diffstat (limited to 'source/controller.cpp')
-rwxr-xr-xsource/controller.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/controller.cpp b/source/controller.cpp
index defae8a..423e433 100755
--- a/source/controller.cpp
+++ b/source/controller.cpp
@@ -92,8 +92,10 @@ void loop(void)
scrolled = true;
}
} else {
- if (last != 0 && !scrolled)
+ if (last != 0 && !scrolled) {
Sharp::sendInput(touchToCoord(last));
+ delay(100);
+ }
last = 0;
Sharp::setScroll();
}
@@ -101,6 +103,12 @@ void loop(void)
delay(10);
}
+static void addNewNote(const char *buf)
+{
+ unsigned int count = (buf[1] - '0') * 10 + (buf[2] - '0');
+ Sharp::addWidget<NoteWidget>(buf + 3, count);
+}
+
void handlePacket(void)
{
char buf[64];
@@ -119,6 +127,9 @@ void handlePacket(void)
Sharp::addWidget<NotificationWidget>("Time updated");
RTC::setTicks(std::atoi(buf + 1) * 60);
break;
+ case 'N':
+ Vibrate::pulse();
+ addNewNote(buf);
default:
break;
}