Hugo Hu / Mbed 2 deprecated BRAVEHEART

Dependencies:   mbed N5110 ShiftReg PinDetect

State.cpp

Committer:
Siriagus
Date:
2015-05-02
Revision:
8:9ac6a428fa26
Parent:
7:678873947b29
Child:
12:8178fad5e660

File content as of revision 8:9ac6a428fa26:

#include "State.h"
#include "StateManager.h"

// Request the fsm to change to a new state
void State::requestStateChange(MainState newState)
{
    fsm->requestStateChange(newState);
}

void State::drawImage(const int img[HEIGHT][WIDTH])
{
    for (int i = 0; i < HEIGHT; ++i)
    {
        for (int j = 0; j < WIDTH; ++j)
        {
            if (img[i][j])
                lcd->setPixel(j,i);
        }
    }
}