#include "HardwareInfo.c"
#include "JMLib.c"
#include <SetLCDBack.h>
#include <SetLCDString.h>
#include <SetRFPassWord.h>
#include <GetRFModuleRemoteRocker.h>
#include <SetLCD8Char.h>

int main(void)
{
    X4RCU_Init();
    int xL = 0;
    int yL = 0;
    int xR = 0;
    int yR = 0;
    SetLCDBack(1);
    SetLCDString(0, 0, "Remote Rocker", YELLOW, BLACK);
    SetRFPassWord(_RFMODULE_1_, 1234567);
    SetLCDString(0, 16, "Left  X:", YELLOW, BLACK);
    SetLCDString(0, 32, "Left  Y:", YELLOW, BLACK);
    SetLCDString(0, 48, "Right X:", YELLOW, BLACK);
    SetLCDString(0, 64, "Right Y:", YELLOW, BLACK);
    while (1)
    {
        xL = GetRFModuleRemoteRocker(_RFMODULE_1_, 0, 0);
        SetLCD8Char(64, 16, xL, YELLOW, BLACK);
        yL = GetRFModuleRemoteRocker(_RFMODULE_1_, 0, 1);
        SetLCD8Char(64, 32, yL, YELLOW, BLACK);
        xR = GetRFModuleRemoteRocker(_RFMODULE_1_, 1, 0);
        SetLCD8Char(64, 48, xR, YELLOW, BLACK);
        yR = GetRFModuleRemoteRocker(_RFMODULE_1_, 1, 1);
        SetLCD8Char(64, 64, yR, YELLOW, BLACK);
    }
    while(1);
}

