Error as described in MBs email to MS

Dependencies:   SDFileSystem app epson mbed msp430 pl tests

bookmonitor.cpp

Committer:
marcbax
Date:
2018-01-11
Revision:
1:5874c1a074a7
Parent:
0:c643d398cdb6

File content as of revision 1:5874c1a074a7:

//
// 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.