Hi @clyde,
This is a bit of a messy subject.
most Libraries in ardupilot have some default defined in them. When a parameter is declared, the last parameter is the default value for it:
AP_GROUPINFO("VOLT_PIN", 1, AP_BattMonitor_Analog, _volt_pin, AP_BATT_VOLT_PIN),
In this case, a #define is used. this means it can be overriden on a per-board basis by changing the hwdef files.
Additionally, vehicles can override values in their parameters.cpp as we do in Ardusub
For ardusub up to 4.0, we keep some param files in here. These are not used to build the firmware, but by QGC when you click the “load default parameters” button.
But we’re moving away from that, towards having all our defaults properly defined in Ardusub itself.