added BLDC Mode

This commit is contained in:
2025-02-10 22:41:59 +01:00
parent 01401b02b0
commit d08903bcbe
5 changed files with 65 additions and 18 deletions

View File

@@ -80,7 +80,7 @@ uint32_t get_voltage_in()
int32_t get_current_ASC712(int ADC_pin)
{
int32_t adc_voltage = read_voltage(ADC_pin);
int32_t current = (adc_voltage -2500)*5.405;
int32_t current = (adc_voltage +184)/(10.0/12)-2500;
ESP_LOGI("ADC", "ADC%d:voltage:%ldcurrent%ld", ADC_pin, adc_voltage, current);
return current;
}