AP_HAL_SITL: merge init() and run()
This commit is contained in:
parent
0c837326b5
commit
e4ef0e43c0
@ -66,8 +66,10 @@ HAL_SITL::HAL_SITL() :
|
||||
_sitl_state(&sitlState)
|
||||
{}
|
||||
|
||||
void HAL_SITL::init(int argc, char * const argv[]) const
|
||||
void HAL_SITL::run(int argc, char * const argv[], Callbacks* callbacks) const
|
||||
{
|
||||
assert(callbacks);
|
||||
|
||||
_sitl_state->init(argc, argv);
|
||||
scheduler->init(NULL);
|
||||
uartA->begin(115200);
|
||||
@ -79,13 +81,6 @@ void HAL_SITL::init(int argc, char * const argv[]) const
|
||||
//i2c->begin();
|
||||
//i2c->setTimeout(100);
|
||||
analogin->init(NULL);
|
||||
}
|
||||
|
||||
void HAL_SITL::run(int argc, char * const argv[], Callbacks* callbacks) const
|
||||
{
|
||||
assert(callbacks);
|
||||
|
||||
init(argc, argv);
|
||||
|
||||
callbacks->setup();
|
||||
scheduler->system_initialized();
|
||||
|
@ -13,7 +13,6 @@
|
||||
class HAL_SITL : public AP_HAL::HAL {
|
||||
public:
|
||||
HAL_SITL();
|
||||
void init(int argc, char * const argv[]) const;
|
||||
void run(int argc, char * const argv[], Callbacks* callbacks) const override;
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user