mirror of https://github.com/ArduPilot/ardupilot
6c19f741df
Instead of just doing a static cast to the desired class, use a method named "from". Pros: - When we have data shared on the parent class, the code is cleaner in child class when it needs to access this data. Almost all the data we use in AP_HAL benefits from this - There's a minimal type checking because now we are using a method that can only receive the type of the parent class |
||
---|---|---|
.. | ||
examples/AP_BattMonitor_test | ||
AP_BattMonitor.cpp | ||
AP_BattMonitor.h | ||
AP_BattMonitor_Analog.cpp | ||
AP_BattMonitor_Analog.h | ||
AP_BattMonitor_Backend.cpp | ||
AP_BattMonitor_Backend.h | ||
AP_BattMonitor_Bebop.cpp | ||
AP_BattMonitor_Bebop.h | ||
AP_BattMonitor_SMBus.h | ||
AP_BattMonitor_SMBus_I2C.cpp | ||
AP_BattMonitor_SMBus_I2C.h | ||
AP_BattMonitor_SMBus_PX4.cpp | ||
AP_BattMonitor_SMBus_PX4.h |