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

Method save_checksum

libraries/AP_Scripting/AP_Scripting.cpp:520–536  ·  view source on GitHub ↗

Check if DEBUG_OPTS bit has been set to save current checksum values to params

Source from the content-addressed store, hash-verified

518
519// Check if DEBUG_OPTS bit has been set to save current checksum values to params
520void AP_Scripting::save_checksum() {
521
522 if (!option_is_set(DebugOption::SAVE_CHECKSUM)) {
523 // Bit not set, nothing to do
524 return;
525 }
526
527 // Save two checksum parameters to there current values
528 _required_loaded_checksum.set_and_save(lua_scripts::get_loaded_checksum() & checksum_param_mask);
529 _required_running_checksum.set_and_save(lua_scripts::get_running_checksum() & checksum_param_mask);
530
531 // Un-set debug option bit
532 option_clear(DebugOption::SAVE_CHECKSUM);
533
534 GCS_SEND_TEXT(MAV_SEVERITY_ERROR, "Scripting: %s", "saved checksums");
535
536}
537
538AP_Scripting *AP_Scripting::_singleton = nullptr;
539

Callers

nothing calls this directly

Calls 1

set_and_saveMethod · 0.45

Tested by

no test coverage detected