ardupilot/libraries/AP_HAL_Linux/HAL_Linux_Class.h
Lucas De Marchi 89420e4b2d AP_HAL_Linux: add signal handler for normal termination
This allows to terminate the flight stack nicely, ensuring it returns 0
so init system can check by return code if it terminated nicely or if it
was due to a crash.
2016-11-02 16:28:20 -02:00

17 lines
316 B
C++

#pragma once
#include <AP_HAL/AP_HAL.h>
class HAL_Linux : public AP_HAL::HAL {
public:
HAL_Linux();
void run(int argc, char* const* argv, Callbacks* callbacks) const override;
void setup_signal_handlers() const;
static void exit_signal_handler(int);
protected:
bool _should_exit = false;
};