Browse Source
In order to allow other libraries to use the InertialSensor we need a way to let them to get the only instance of InertialSensor. The conventional way to do a singleton would be to let the constructor private and force it to be instantiated from the get_instance() method. Here however we just call panic() on the constructor if there's already an instance alive. This allows us to let the vehicles as is. Later we can change it so they call the get_instance() method instead.mission-4.1.18
Lucas De Marchi
10 years ago
committed by
Andrew Tridgell
2 changed files with 18 additions and 0 deletions
Loading…
Reference in new issue