MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / set_and_save

Method set_and_save

libraries/AP_Scripting/AP_Scripting_helpers.cpp:138–161  ·  view source on GitHub ↗

set and save value

Source from the content-addressed store, hash-verified

136
137// set and save value
138bool Parameter::set_and_save(float value)
139{
140 if (vp == nullptr) {
141 return false;
142 }
143 switch (vtype) {
144 case AP_PARAM_INT8:
145 ((AP_Int8 *)vp)->set_and_save(value);
146 return true;
147 case AP_PARAM_INT16:
148 ((AP_Int16 *)vp)->set_and_save(value);
149 return true;
150 case AP_PARAM_INT32:
151 ((AP_Int32 *)vp)->set_and_save(value);
152 return true;
153 case AP_PARAM_FLOAT:
154 ((AP_Float *)vp)->set_and_save(value);
155 return true;
156 default:
157 break;
158 }
159 // not a supported type
160 return false;
161}
162
163// Check if param had been configured
164bool Parameter::configured()

Callers 4

initMethod · 0.45
option_clearMethod · 0.45
save_checksumMethod · 0.45
initMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected