This commit is contained in:
cfif 2026-04-23 12:10:21 +03:00
parent a7aa5c8b55
commit 59db4b83e9
1 changed files with 11 additions and 10 deletions

View File

@ -186,7 +186,7 @@ static _Noreturn void Mma_Thread(tMma *env) {
*/ */
int32_t step100, step10; int32_t step100, step10;
/*
// Использование // Использование
float R_ab_100k = 100000.0f; float R_ab_100k = 100000.0f;
float R_ab_10k = 10000.0f; float R_ab_10k = 10000.0f;
@ -204,7 +204,7 @@ static _Noreturn void Mma_Thread(tMma *env) {
float Rwa_desired_10k = (float)CountStep10 * Step10; float Rwa_desired_10k = (float)CountStep10 * Step10;
step10 = calc_D_for_Rwa(Rwa_desired_10k, R_ab_10k, Rw_typ); step10 = calc_D_for_Rwa(Rwa_desired_10k, R_ab_10k, Rw_typ);
*/
/* /*
float Rwa_desired2_100k = 000.00f - R_const; float Rwa_desired2_100k = 000.00f - R_const;
step100 = calc_D_for_Rwa(Rwa_desired2_100k, R_ab_100k, Rw_typ); step100 = calc_D_for_Rwa(Rwa_desired2_100k, R_ab_100k, Rw_typ);
@ -215,12 +215,13 @@ static _Noreturn void Mma_Thread(tMma *env) {
float required_resistance = 8000.00f; float required_resistance = 8000.00f;
// CalculateSteps2(required_resistance, &step100, &step10); CalculateSteps(required_resistance, &step100, &step10);
// CalculateSteps(required_resistance, &step100, &step10);
step100 = 255 - step100; step100 = 255 - step100;
step10 = 255 - step10; step10 = 255 - step10;
result = setSpiSensor(&env->sensorSPI, SENSOR_TYPE_A, SENSOR_ADR_1, step100);
result = setSpiSensor(&env->sensorSPI, SENSOR_TYPE_A, SENSOR_ADR_2, step10);
asm("nop"); asm("nop");