How to update data instantly

Hi,I use I2C to get these data, but I want to be able to update the data in real time, how can I use it?

The data comes from streamruntime_RZA2M_FreeRTOS10_main.c.

The monitoring software can be changed, but cannot be updated on the screen.

Thanks.

Parents
  • Hello Nazukolin,

    to update values in the GUI from your application, you will need to use the DataPool.

    See https://www.guiliani.de/mediawiki/images/f/fa/Application_Binding.pdf chapter 3.2 for more details.

    For cyclic refresh your MyGUI-class should contain a DoAnimate-method which is called in a specific interval.

    In this method you can access the i2c like in your example and write the values to the DataPool using CGUIDataPool::Set

    To enable cyclic calls to DoAnimate you need to call GETTIMER.AddAnimationCallback(interval, this); in the constructor of CMyGUI.

    Best Regards,

    Guiliani Support

  • I have same question too.

    But now i'm use m_pktextFront->SetValue() to change my GUI .

    I have seen that pdf your give ,it seems like need to CALL API make that the same OBJECT will change value together

    But now my data is used i2c to recive from GR-MANGO ,

    And every second recive once data.

    Or maybe I loss some information form that PDF.

    Thanks.

  • Hello baba,

    you definitely should use a DataPool-element to synchronize values inside your GUI, if you are acquiring data somewhere else than the GUI-thread. This was the case for Nazukolin's sample-code.

    If you have your values somewhere inside the GUI-thread (e.g. CMyGUI::DoAnimate()) you can also update GUI-elements by setting their text or value directly. Don't forget to call pkObject->InvalidateArea() after changing texts to ensure that the contents of the screen get updated.

    Again, if you want to have cycilc updates/readouts of your values, you should use DoAnimate with the cycle you prefer.

    Best Regards,

    Guiliani Support

Reply
  • Hello baba,

    you definitely should use a DataPool-element to synchronize values inside your GUI, if you are acquiring data somewhere else than the GUI-thread. This was the case for Nazukolin's sample-code.

    If you have your values somewhere inside the GUI-thread (e.g. CMyGUI::DoAnimate()) you can also update GUI-elements by setting their text or value directly. Don't forget to call pkObject->InvalidateArea() after changing texts to ensure that the contents of the screen get updated.

    Again, if you want to have cycilc updates/readouts of your values, you should use DoAnimate with the cycle you prefer.

    Best Regards,

    Guiliani Support

Children
No Data