Всякие фиксы модели и заготовки для АЦП

И почему то все равно MATLAB намертво блокирует mingw64.... Приходится перезапускать матлаб для перекомпиляции
This commit is contained in:
2025-11-09 21:04:52 +03:00
parent be84043f18
commit 79ff2667c4
74 changed files with 2371 additions and 609 deletions

View File

@@ -32,7 +32,12 @@ void ThyristorWrite(real_T* Buffer)
*/
void app_readInputs(const real_T* Buffer) {
// USER APP INPUT START
ADC_Set_Channel_Value(ADC1, 0, ReadInputArray(1,0));
ADC_Set_Channel_Value(ADC3, 4, ReadInputArray(0,0));
ADC_Set_Channel_Value(ADC3, 5, ReadInputArray(0,1));
ADC_Set_Channel_Value(ADC3, 6, ReadInputArray(0,2));
ADC_Set_Channel_Value(ADC3, 7, ReadInputArray(0,3));
ADC_Set_Channel_Value(ADC3, 8, ReadInputArray(0,4));
ADC_Set_Channel_Value(ADC3, 10, ReadInputArray(0,5));
// USER APP INPUT END
}
@@ -44,6 +49,10 @@ ADC_Set_Channel_Value(ADC1, 0, ReadInputArray(1,0));
void app_writeOutputBuffer(real_T* Buffer) {
// USER APP OUTPUT START
ThyristorWrite(Buffer);
WriteOutputArray(ADC1->DR, 1, 0);
extern ADC_Period_t adc;
for(int i = 0; i < 6; i++)
{
WriteOutputArray(adc.Data[i], 1, i);
}
// USER APP OUTPUT END
}