CaryCoders / Mbed 2 deprecated demo_SX1276_standalone

Dependencies:   SX1276Lib mbed

Fork of SX1276_GPS by CaryCoders

Modules/TempModule.cpp

Committer:
vtraveller
Date:
2014-08-10
Revision:
10:3fcab08717fc
Child:
11:96146db429de

File content as of revision 10:3fcab08717fc:

#include "mbed.h"
#include "TempModule.h"

#include "extra_chars.h"

TempModule::TempModule(Adafruit_RGBLCDShield & in_cLCD)
    : Module(in_cLCD)
{
}

TempModule::~TempModule()
{
}
    
int TempModule::setCursor
(
    int in_nIndex,
    int in_nCursorX,
    int in_nCursorY
)
{
    const int k_aCursor[] = { 6, 7 };
    
    int nIndex = in_nIndex;
    if (nIndex < 0) nIndex = 0;
    if (nIndex >= _countof(k_aCursor)) nIndex = _countof(k_aCursor) - 1;
       
    int nCursorX = k_aCursor[nIndex];
    m_cLCD.setCursor(in_nCursorX + nCursorX,in_nCursorY);
    
    return nIndex;
}

void TempModule::show()
{
    m_cLCD.printf("Room: %i%cC     ",28,eDegree);
}