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
bookmonitor.cpp@0:c643d398cdb6, 2018-01-11 (annotated)
- Committer:
- marcbax
- Date:
- Thu Jan 11 13:42:27 2018 +0000
- Revision:
- 0:c643d398cdb6
Marc Bax version 180111. It hangs on the WritePartImage in the RedrawAlphabet routine in hangman.cpp. Within that call it does execute Ypos(), but not Xpos().
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| marcbax | 0:c643d398cdb6 | 1 | // |
| marcbax | 0:c643d398cdb6 | 2 | // Filename: bookmonitor.h |
| marcbax | 0:c643d398cdb6 | 3 | // |
| marcbax | 0:c643d398cdb6 | 4 | // Flexbook page turn monitor. |
| marcbax | 0:c643d398cdb6 | 5 | // |
| marcbax | 0:c643d398cdb6 | 6 | |
| marcbax | 0:c643d398cdb6 | 7 | #include "bookmonitor.h" |
| marcbax | 0:c643d398cdb6 | 8 | |
| marcbax | 0:c643d398cdb6 | 9 | #include "book.h" |
| marcbax | 0:c643d398cdb6 | 10 | #include "hal.h" |
| marcbax | 0:c643d398cdb6 | 11 | #include "log.h" |
| marcbax | 0:c643d398cdb6 | 12 | #include "pagefactory.h" |
| marcbax | 0:c643d398cdb6 | 13 | |
| marcbax | 0:c643d398cdb6 | 14 | #include <iostream> |
| marcbax | 0:c643d398cdb6 | 15 | |
| marcbax | 0:c643d398cdb6 | 16 | namespace Flexbook { |
| marcbax | 0:c643d398cdb6 | 17 | |
| marcbax | 0:c643d398cdb6 | 18 | BookMonitor::BookMonitor(Book &book) |
| marcbax | 0:c643d398cdb6 | 19 | : book(book) |
| marcbax | 0:c643d398cdb6 | 20 | { |
| marcbax | 0:c643d398cdb6 | 21 | Log("Creating BookMonitor"); |
| marcbax | 0:c643d398cdb6 | 22 | } |
| marcbax | 0:c643d398cdb6 | 23 | |
| marcbax | 0:c643d398cdb6 | 24 | BookMonitor::~BookMonitor() |
| marcbax | 0:c643d398cdb6 | 25 | { |
| marcbax | 0:c643d398cdb6 | 26 | Log("Deleting BookMonitor"); |
| marcbax | 0:c643d398cdb6 | 27 | } |
| marcbax | 0:c643d398cdb6 | 28 | |
| marcbax | 0:c643d398cdb6 | 29 | void BookMonitor::CheckForPageChange() |
| marcbax | 0:c643d398cdb6 | 30 | { |
| marcbax | 0:c643d398cdb6 | 31 | PageType hardwaretype = HAL::GetPageType(); |
| marcbax | 0:c643d398cdb6 | 32 | |
| marcbax | 0:c643d398cdb6 | 33 | if(book.GetPageType() != hardwaretype) |
| marcbax | 0:c643d398cdb6 | 34 | { |
| marcbax | 0:c643d398cdb6 | 35 | book.PageChange(hardwaretype); |
| marcbax | 0:c643d398cdb6 | 36 | } |
| marcbax | 0:c643d398cdb6 | 37 | } |
| marcbax | 0:c643d398cdb6 | 38 | |
| marcbax | 0:c643d398cdb6 | 39 | } // End Flexbook namespace. |
| marcbax | 0:c643d398cdb6 | 40 | |
| marcbax | 0:c643d398cdb6 | 41 |