Add power Modeling functions to all components
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user