I studied it ,but i still have a little problem.I couldn't understand when I studied step 13. I set the value of 120.
In the link above,which code is in step 13. Implementation in .c document ?(DeviceDriver.c ?)
If i set Voltage 36V in my C Code(This is what I set outside ),and how can i get 36V in the code and display it?
In addition,in the example-device-class-property-1.https://doc.embedded-wizard.de/device-class-property?v=9.30
This function requires me to declare externally?If I only want to get the value of the device, do I need to define it?
concerning your first question, sorry but I don't understand what you mean. Are you looking for a way to notify the GUI when some device value has been changed? In such case the step 8-12 addresse it. The invocation of the function ApplicationDeviceClass__UpdateVoltage() in step 13 is performed from your C code. This invocation triggers then the observer from step 8 to execute its associated slot method from step 9. The displayed value should be updated thereupon. Or are you asking where to implement the code from step 13? In this is the case, the code can be implemented in any C module.
Concerning your second question, the C function write_dac_voltage_value() expects to be declared. This function is just an example to demonstrate the idea. In the real project you will have other functions. Please see the section Implement the OnSet method of the Property. It explains the possible approaches how to declare the C function.
Yes,As you said.For example:I have a hardware knob,and when i turn the knob,I want synchronization with the HorizontalSlider on embedded wizard,I followed the 1-12 steps, in step 13 ,my code is :
call function functions;
Can this method achieve my purpose ? I just need UI show the data,and no functionality required.
I far as I understand your application case, yes, it should be the right way. Please ensure to call the right Update function. Please see for this purpose the section Update the Property in ANSI C and C++ compatible systems.
Ask Embedded Wizard
Welcome to the question and answer site for Embedded Wizard users and UI developers.
Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!