AP_Vehicle: provide dummy implementations of log structure methods

this allows a vehicle that doesnt' want to use logging to just ignore it, rather than provide dummy methods
This commit is contained in:
Peter Barker 2024-02-12 10:56:24 +11:00 committed by Andrew Tridgell
parent bdb84181bc
commit a158b4f7b9
1 changed files with 4 additions and 3 deletions

View File

@ -320,10 +320,11 @@ protected:
#if HAL_LOGGING_ENABLED
AP_Logger logger;
AP_Int32 bitmask_unused;
// method supplied by vehicle to provide log bitmask:
virtual const AP_Int32 &get_log_bitmask() = 0;
virtual const struct LogStructure *get_log_structures() const = 0;
virtual uint8_t get_num_log_structures() const = 0;
virtual const AP_Int32 &get_log_bitmask() { return bitmask_unused; }
virtual const struct LogStructure *get_log_structures() const { return nullptr; }
virtual uint8_t get_num_log_structures() const { return 0; }
#endif
#if AP_RSSI_ENABLED