Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SDFileSystem app epson mbed msp430 pl tests
Diff: bookmonitor.cpp
- Revision:
- 0:c643d398cdb6
diff -r 000000000000 -r c643d398cdb6 bookmonitor.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bookmonitor.cpp Thu Jan 11 13:42:27 2018 +0000
@@ -0,0 +1,41 @@
+//
+// Filename: bookmonitor.h
+//
+// Flexbook page turn monitor.
+//
+
+#include "bookmonitor.h"
+
+#include "book.h"
+#include "hal.h"
+#include "log.h"
+#include "pagefactory.h"
+
+#include <iostream>
+
+namespace Flexbook {
+
+BookMonitor::BookMonitor(Book &book)
+: book(book)
+{
+ Log("Creating BookMonitor");
+}
+
+BookMonitor::~BookMonitor()
+{
+ Log("Deleting BookMonitor");
+}
+
+void BookMonitor::CheckForPageChange()
+{
+ PageType hardwaretype = HAL::GetPageType();
+
+ if(book.GetPageType() != hardwaretype)
+ {
+ book.PageChange(hardwaretype);
+ }
+}
+
+} // End Flexbook namespace.
+
+