mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 17:43:54 +08:00
* modeld: Retain pre-20hz drive model support * Method not available anymore on OP * some fixes * Revert "Long planner get accel: new function args (#34288)" * Revert "Fix low-speed allow_throttle behavior in long planner (#33894)" * Revert "long planner: allow throttle reflects usage (#33792)" * Revert "Gate acceleration on model gas press predictions (#33643)" * Reapply "Gate acceleration on model gas press predictions (#33643)" This reverts commit76b08e37cb. * Reapply "long planner: allow throttle reflects usage (#33792)" This reverts commitc75244ca4e. * Reapply "Fix low-speed allow_throttle behavior in long planner (#33894)" This reverts commitb2b7d21b7b. * Reapply "Long planner get accel: new function args (#34288)" This reverts commit74dca2fccf. * don't need * retain snpe * wrong * they're symlinks * remove * put back into VCS * add back * don't include built * Refactor model runner retrieval with caching support Added caching for active model runner type via `ModelRunnerTypeCache` to enhance performance and avoid redundant checks. Introduced a `force_check` flag to bypass the cache when necessary. Updated related code to handle cache clearing during onroad transitions. * Update model runner determination logic with caching fix Enhances `get_active_model_runner` to utilize caching more effectively by ensuring type consistency and updating cache only when necessary. Also updates `is_snpe_model` to pass the `started` state to the runner determination function, improving behavior for dynamic checks. * default to none * enable in next PR * more --------- Co-authored-by: DevTekVE <devtekve@gmail.com>
85 lines
2.1 KiB
C++
85 lines
2.1 KiB
C++
//=============================================================================
|
|
//
|
|
// Copyright (c) 2015, 2020 Qualcomm Technologies, Inc.
|
|
// All Rights Reserved.
|
|
// Confidential and Proprietary - Qualcomm Technologies, Inc.
|
|
//
|
|
//=============================================================================
|
|
#ifndef __IDIAGLOG_HPP_
|
|
#define __IDIAGLOG_HPP_
|
|
|
|
#include <string>
|
|
|
|
#include "DiagLog/Options.hpp"
|
|
#include "DlSystem/String.hpp"
|
|
#include "DlSystem/ZdlExportDefine.hpp"
|
|
|
|
namespace zdl
|
|
{
|
|
namespace DiagLog
|
|
{
|
|
|
|
/** @addtogroup c_plus_plus_apis C++
|
|
@{ */
|
|
|
|
/// @brief .
|
|
///
|
|
/// Interface for controlling logging for zdl components.
|
|
|
|
class ZDL_EXPORT IDiagLog
|
|
{
|
|
public:
|
|
|
|
/// @brief .
|
|
///
|
|
/// Sets the options after initialization occurs.
|
|
///
|
|
/// @param[in] loggingOptions The options to set up diagnostic logging.
|
|
///
|
|
/// @return False if the options could not be set. Ensure logging is not started.
|
|
virtual bool setOptions(const Options& loggingOptions) = 0;
|
|
|
|
/// @brief .
|
|
///
|
|
/// Gets the curent options for the diag logger.
|
|
///
|
|
/// @return Diag log options object.
|
|
virtual Options getOptions() = 0;
|
|
|
|
/// @brief .
|
|
///
|
|
/// Allows for setting the log mask once diag logging has started
|
|
///
|
|
/// @return True if the level was set successfully, false if a failure occurred.
|
|
virtual bool setDiagLogMask(const std::string& mask) = 0;
|
|
|
|
/// @brief .
|
|
///
|
|
/// Allows for setting the log mask once diag logging has started
|
|
///
|
|
/// @return True if the level was set successfully, false if a failure occurred.
|
|
virtual bool setDiagLogMask(const zdl::DlSystem::String& mask) = 0;
|
|
|
|
/// @brief .
|
|
///
|
|
/// Enables logging for zdl components.
|
|
///
|
|
/// Logging should be started prior to the instantiation of zdl components
|
|
/// to ensure all events are captured.
|
|
///
|
|
/// @return False if diagnostic logging could not be started.
|
|
virtual bool start(void) = 0;
|
|
|
|
/// @brief Disables logging for zdl components.
|
|
virtual bool stop(void) = 0;
|
|
|
|
virtual ~IDiagLog() {};
|
|
};
|
|
|
|
} // DiagLog namespace
|
|
} // zdl namespace
|
|
|
|
/** @} */ /* end_addtogroup c_plus_plus_apis C++ */
|
|
|
|
#endif
|