2021-01-26 08:46 PM
In TouchGFX, data transfer is done as follows.
Model.hpp
uint8_t TmpA;
In Presenter.hpp,
return Get_Data()
{
return model-> TmpA;
}
Viwe.cpp
uint8_t Test;
Test = presenter->Get_Data()
I am doing the program in this way.
But I heard that I shouldn't do this.
When the model data value is exceeded in the presenter,
Model.hpp says it should be made into a function as shown below.
uint8_t Get_Model_Data()
{
return TmpA;
}
In Presenter.hpp,
uint8_t Get_Data()
{
return Get_Model_Data()
}
This is how it should be done.
Which is the right way?