+ Post New Thread
Results 1 to 5 of 5
  1. #1
    Member level 1
    Points: 501, Level: 4

    Join Date
    Dec 2013
    Posts
    35
    Helped
    1 / 1
    Points
    501
    Level
    4

    Microchip Mplab Plugin GDD

    Hello Friends,
    I am using pic32 usb starter kit + Epson PICtail board S1D13517 + Graphics display Truly 7" 800x480 board. I am using Microchip GDD plugin. I have done some basic display design and i got the correct output in the display.
    Now my problem is, i want to run a Engine , it is like .bmp format image. And also i want to use two Buttons, START & STOP buttons. When i pressed start button the engine will get start, when i pressed stop button the engine will get stopped. This is my task, and i don't know how to do this in GDD. Pls help me friends.....................

    Below i attached the sample screen what i want to get.........

    Thanks in advance......

    •   AltAdvertisement

        
       

  2. #2
    Member level 1
    Points: 787, Level: 6

    Join Date
    Jan 2014
    Location
    Bangalore, India
    Posts
    36
    Helped
    9 / 9
    Points
    787
    Level
    6

    Re: Microchip Mplab Plugin GDD

    i want to run a Engine
    What do you mean "run a engine"? Wanna move the picture from right to left? Are you familiar with writing callback function for button events?
    Raj Gunaseelan



    •   AltAdvertisement

        
       

  3. #3
    Member level 1
    Points: 501, Level: 4

    Join Date
    Dec 2013
    Posts
    35
    Helped
    1 / 1
    Points
    501
    Level
    4

    Re: Microchip Mplab Plugin GDD

    I am not familiar with writing code for callback function.
    ya, you are right !!!
    I want to move the picture form right to left.
    When i pressed start button the picture will get start to move from right to left,
    when i pressed stop button the movement of the picture should stop.



    •   AltAdvertisement

        
       

  4. #4
    Member level 1
    Points: 787, Level: 6

    Join Date
    Jan 2014
    Location
    Bangalore, India
    Posts
    36
    Helped
    9 / 9
    Points
    787
    Level
    6

    Re: Microchip Mplab Plugin GDD

    Okay, GOLDraw() must be called continuously(may be via. timer) which initiates any pending drawing processes, if any. If there is any change in graphics GOLMsgCallback() function is called by GDD library. This function must be implemented by the user.

    Code:
    WORD GOLMsgCallback(WORD objMsg, OBJ_HEADER * pObj, GOL_MSG * pMsg)
    {
        WORD objectID;
        objectID = GetObjID(pObj);
        if (objectID == ID_BTN_START)
        {
            if (objMsg == BTN_MSG_PRESSED)
            {
                //Start a timer here, say 100ms
            }
        }
        else  if (objectID == ID_BTN_STOP)
        {
            if (objMsg == BTN_MSG_PRESSED)
            {
                // Disable the timer
            }
        }
    }
    
    TimerISR()
    {
        OBJ_HEADER *myImage = GOLFindObject(imageID);
        myImage->left -= 2;
        myImage->right -= 2;
        SetState(myImage, IMAGE_DRAW);  //Not sure about IMAGE_DRAW macro. However, I've used BTN_DRAW for button.
    }
    Raj Gunaseelan



  5. #5
    Member level 1
    Points: 501, Level: 4

    Join Date
    Dec 2013
    Posts
    35
    Helped
    1 / 1
    Points
    501
    Level
    4

    Re: Microchip Mplab Plugin GDD

    Thanks for your Help
    I got the output



--[[ ]]--