Add power Modeling functions to all components

This commit is contained in:
2025-02-15 21:42:41 +01:00
parent 5cb25a412a
commit ff80ebe4db
13 changed files with 672 additions and 334 deletions

View File

@@ -56,6 +56,24 @@ class Motor{
* @return current speedvalue of the motor
*/
uint16_t getSpeed(void);
/**
* @brief Get the current consumption of the motor at specified speed
*
* @param duty the duty cyle that should be considered, can be between 0-8192
*
* @return current consumption in milliamperes
*/
float modelCurrentConsumption(uint16_t duty);
/**
* @brief Estimate the energy consumption of the display
* @param durationMs time the display will be on
* @return consumed energy in coloumbs
*/
float modelChargeConsumptionOn(uint16_t duty, uint16_t durationMs);
protected:
uint8_t pin;
ledc_timer_t timer;