Типа запустилось, но все равно есть проблемы с расчетом угла

This commit is contained in:
2025-11-16 00:13:13 +03:00
parent 8041598cc5
commit 115be84ccd
10 changed files with 86 additions and 70 deletions

View File

@@ -6,7 +6,9 @@
#include "mcu_wrapper_conf.h"
#include "app_wrapper.h"
#define PIN_READ(_verbname_) (_verbname_##_GPIO_Port->ODR & (_verbname_##_Pin)) ? 1 : 0
float dbg[16];
#define PIN_READ(_verbname_) (_verbname_##_GPIO_Port->ODR & (_verbname_##_Pin)) ? 0 : 1
void Write_Thyristors(real_T* Buffer, int ind_port)
{
@@ -75,11 +77,14 @@ void app_readInputs(const real_T* Buffer) {
void app_writeOutputBuffer(real_T* Buffer) {
// USER APP OUTPUT START
Write_Thyristors(Buffer, 0);
Write_PowerMonitor(Buffer, 1);
WriteOutputArray(TIM2->CNT, 2, 0);
WriteOutputArray(TIM2->CCR1, 2, 1);
int nn = 0;
WriteOutputArray(upp.hangle.htim->Instance->CNT, 2, nn++);
WriteOutputArray(upp.hangle.htim->Instance->CCR1, 2, nn++);
WriteOutputArray(upp.hangle.htim->Instance->CCR2, 2, nn++);
WriteOutputArray(upp.hangle.htim->Instance->CCR3, 2, nn++);
// USER APP OUTPUT END
}