auto-sync
This commit is contained in:
parent
b20e5e3d40
commit
e37e3e2136
|
@ -293,8 +293,8 @@ ULIBS = -lm
|
|||
##############################################################################
|
||||
|
||||
ifeq ($(USE_FPU),yes)
|
||||
USE_OPT += -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
||||
USE_CPPOPT += -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
||||
USE_OPT += -mfloat-abi=softfp -mfpu=fpv4-sp-d16
|
||||
USE_CPPOPT += -mfloat-abi=softfp -mfpu=fpv4-sp-d16
|
||||
DDEFS += -DCORTEX_USE_FPU=TRUE
|
||||
else
|
||||
DDEFS += -DCORTEX_USE_FPU=FALSE
|
||||
|
|
|
@ -133,16 +133,20 @@ void setThermistorConfiguration(ThermistorConf * tc, float tempC1, float r1, flo
|
|||
}
|
||||
|
||||
void prepareThermistorCurve(ThermistorConf * config) {
|
||||
efiAssertVoid(config!=NULL, "therm config");
|
||||
efiAssertVoid(config!=NULL, "therm config");
|
||||
float T1 = config->tempC_1 + KELV;
|
||||
float T2 = config->tempC_2 + KELV;
|
||||
float T3 = config->tempC_3 + KELV;
|
||||
scheduleMsg(logger, "T1=%..100000f/T2=%..100000f/T3=%..100000f", T1, T2, T3);
|
||||
|
||||
float L1 = logf(config->resistance_1);
|
||||
if (L1 == config->resistance_1) {
|
||||
firmwareError("log is broken?");
|
||||
}
|
||||
float L2 = logf(config->resistance_2);
|
||||
float L3 = logf(config->resistance_3);
|
||||
scheduleMsg(logger, "R1=%..100000f/R2=%..100000f/R3=%..100000f", config->resistance_1, config->resistance_2, config->resistance_3);
|
||||
scheduleMsg(logger, "R1=%..100000f/R2=%..100000f/R3=%..100000f", config->resistance_1, config->resistance_2,
|
||||
config->resistance_3);
|
||||
scheduleMsg(logger, "L1=%..100000f/L2=%..100000f/L3=%..100000f", L1, L2, L3);
|
||||
|
||||
float Y1 = 1 / T1;
|
||||
|
@ -156,12 +160,12 @@ void prepareThermistorCurve(ThermistorConf * config) {
|
|||
|
||||
scheduleMsg(logger, "U2=%..100000f/U3=%..100000f", U2, U3);
|
||||
|
||||
|
||||
config->s_h_c = (U3 - U2) / (L3 - L2) * pow(L1 + L2 + L3, -1);
|
||||
config->s_h_b = U2 - config->s_h_c * (L1 * L1 + L1 * L2 + L2 * L2);
|
||||
config->s_h_a = Y1 - (config->s_h_b + L1 * L1 * config->s_h_c) * L1;
|
||||
|
||||
scheduleMsg(logger, "s_h_c=%..100000f/s_h_b=%..100000f/s_h_a=%..100000f", config->s_h_c, config->s_h_b, config->s_h_a);
|
||||
scheduleMsg(logger, "s_h_c=%..100000f/s_h_b=%..100000f/s_h_a=%..100000f", config->s_h_c, config->s_h_b,
|
||||
config->s_h_a);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by Version2Header
|
||||
// Wed Feb 18 21:12:04 EST 2015
|
||||
// Wed Feb 18 22:08:55 EST 2015
|
||||
#ifndef VCS_VERSION
|
||||
#define VCS_VERSION "6940"
|
||||
#define VCS_VERSION "6947"
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue