AP_HAL_SITL: merge init() and run()

This commit is contained in:
Caio Marcelo de Oliveira Filho 2015-10-19 13:59:47 -02:00 committed by Andrew Tridgell
parent 0c837326b5
commit e4ef0e43c0
2 changed files with 3 additions and 9 deletions

View File

@ -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();

View File

@ -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: