in the FOC code (mcpwm_foc.c), there is a variable called last_inj_adc_isr_duration.
My understanding, looking at the mcpwm_foc_init method is that injected ADC are not used (they are used in BLDC mode). Only regular conversion is used.
Also, that variable is updated in mcpwm_foc_adc_int_handler whereas the corresponding bldc variable is updated in mcpwm_adc_inj_int_handler, so it's all a bit misleading.
To make things more complicated, there is an interface method that blends the two concepts (mc_interface_get_last_inj_adc_isr_duration).
Am I missing a higher level symetry between the 3 modes here, or is indeed that naming detrimental to the clarity of the code?
Are contribution of a "code clarifying" nature welcome (I see on the ethos page that it's good practice to discuss it here before flooding github with push requests)?
Otherwise, my hat is off to that amazing piece of work.