Check if DEBUG_OPTS bit has been set to save current checksum values to params
| 518 | |
| 519 | // Check if DEBUG_OPTS bit has been set to save current checksum values to params |
| 520 | void 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 | |
| 538 | AP_Scripting *AP_Scripting::_singleton = nullptr; |
| 539 |
nothing calls this directly
no test coverage detected