#include "HardwareInfo.c"
#include "JMLib.c"
#include <SetLCDBack.h>
#include <GetMotorCode.h>
#include <SetMotor_Code.h>
#include <GetSysTimeMs.h>
#include <SetLCD5Char.h>
void task1(void)
{;}

int main(void)
{
    X4RCU_Init();
    long var0 = 0;
    unsigned int dir1 = 0;
    long var1 = 0;
    unsigned int dir2 = 0;
    unsigned long time = 0;
    unsigned int dir = 0;
    unsigned long time1 = 0;
    SetLCDBack(1);
    while (1)
    {
        var0 = GetMotorCode(1);
        if ( dir1!=1 )
        {
            if ( abs(var0)>=1500 )
            {
                SetMotor_Code(1, 1, 100);
                time = GetSysTimeMs();
                time=time+2000;dir1=1;
                SetLCD5Char(8, 0, var0, YELLOW, BLACK);
            }
            else
            {
                SetMotor_Code(1, dir, 100);
            }
        }
    }
    while(1);
}

