Difference between pins and parameters?
25 Jan 2017 16:09 #86636
by Wirewrap
Difference between pins and parameters? was created by Wirewrap
When writing my own little HAL components, I have so far only used pins.
Is there anything a parameter can do that a pin can't do?
Is there anything a parameter can do that a pin can't do?
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5008
- Thank you received: 1441
25 Jan 2017 16:54 #86638
by Todd Zuercher
Replied by Todd Zuercher on topic Difference between pins and parameters?
As far as I know the main difference is a parameter can not be connected to a hal signal. Hopefully someone more knowledgeable will give more detail.
Please Log in or Create an account to join the conversation.
25 Jan 2017 17:10 #86639
by rodw
Replied by rodw on topic Difference between pins and parameters?
Some Components have values that need to be set before use. Thats what parameters do. Usually they don't ever need to be changed. For an example, look at the THC component. It is for use with the Mesa THCAD hardware. Each of these boards is individually calibrated and the calibration data is applied to a sticker attached to the board.
So paramaters are used to set this calibration data as shown in thic code excerpt.
So paramaters are used to set this calibration data as shown in thic code excerpt.
// Parameters
param rw float vel_scale "The scale to convert the Velocity signal to Volts";
param rw float scale_offset "The offset of the velocity input at 0 volts";
Please Log in or Create an account to join the conversation.
25 Jan 2017 17:11 #86640
by andypugh
Replied by andypugh on topic Difference between pins and parameters?
Parameters use up fractionally less shared-memory. This used to matter, but rarely does now.
Whenever you think that somthing should be a parameter because nobody would ever want to change it at run-time, you are probably wrong.
Whenever you think that somthing should be a parameter because nobody would ever want to change it at run-time, you are probably wrong.
Please Log in or Create an account to join the conversation.
Time to create page: 0.125 seconds