Browse Source

HAL_SITL: g_state is not needed any more

mission-4.1.18
Andrew Tridgell 10 years ago
parent
commit
878549530d
  1. 5
      libraries/AP_HAL_AVR_SITL/SITL_State.cpp
  2. 2
      libraries/AP_HAL_AVR_SITL/Scheduler.cpp

5
libraries/AP_HAL_AVR_SITL/SITL_State.cpp

@ -51,8 +51,6 @@ extern const AP_HAL::HAL& hal; @@ -51,8 +51,6 @@ extern const AP_HAL::HAL& hal;
using namespace AVR_SITL;
SITL_State *g_state;
// catch floating point exceptions
static void _sig_fpe(int signum)
{
@ -237,9 +235,6 @@ void SITL_State::_sitl_setup(void) @@ -237,9 +235,6 @@ void SITL_State::_sitl_setup(void)
// start with non-zero clock
hal.scheduler->stop_clock(1);
}
// keep a global state pointer for static callbacks
g_state = this;
}

2
libraries/AP_HAL_AVR_SITL/Scheduler.cpp

@ -82,8 +82,6 @@ uint32_t SITLScheduler::millis() @@ -82,8 +82,6 @@ uint32_t SITLScheduler::millis()
return millis64() & 0xFFFFFFFF;
}
extern AVR_SITL::SITL_State *g_state;
void SITLScheduler::delay_microseconds(uint16_t usec)
{
uint64_t start = micros64();

Loading…
Cancel
Save