#ifndef CHASSIS_POWER_CONTROL_WITH_SUPERCAP_H
#define CHASSIS_POWER_CONTROL_WITH_SUPERCAP_H


#ifdef __cplusplus
extern "C" {
#endif

#include "main.h"

typedef struct power_model_t
{
  uint8_t motor_num;
  float total_power;
  float* power;
	float toque_coefficient;
	float k1;
	float k2 ;
	float constant;
}power_model_t;

void power_calu(power_model_t* param,float* in_array,float* rpm_array);
float power_scale_calu(power_model_t** param_array,uint8_t num,float max_power);
void power_out_calu(power_model_t* param,float scale,float* in_array,float* rpm_array,float* out_array);
#ifdef __cplusplus
}
#endif

#endif
