This commit is contained in:
rusefi 2017-04-07 16:35:43 -04:00
parent ea09908314
commit 42228d3db5
5 changed files with 15 additions and 17 deletions

@ -1 +1 @@
Subproject commit 9913d7306e76902b5c086f2092a631efc71b98b9
Subproject commit 6b9b45ff0e64e4c8d29a549204b8ed526cff653d

View File

@ -421,7 +421,7 @@ static void getFloat(int offset) {
/**
* this response is part of dev console API
*/
scheduleMsg(&logger, "float @%d is %..100000f", offset, value);// %.5f
scheduleMsg(&logger, "float @%d is %.5f", offset, value);
}
static void setFloat(const char *offsetStr, const char *valueStr) {

View File

@ -135,8 +135,7 @@ void ThermistorMath::prepareThermistorCurve(thermistor_conf_s *tc) {
float T2 = tc->tempC_2 + KELV;
float T3 = tc->tempC_3 + KELV;
#if EXTREME_TERM_LOGGING || defined(__DOXYGEN__)
// %.5f
scheduleMsg(logger, "T1=%..100000f/T2=%..100000f/T3=%..100000f", T1, T2, T3);
scheduleMsg(logger, "T1=%.5f/T2=%.5f/T3=%.5f", T1, T2, T3);
#endif
float L1 = logf(tc->resistance_1);
@ -150,10 +149,9 @@ void ThermistorMath::prepareThermistorCurve(thermistor_conf_s *tc) {
float L2 = logf(tc->resistance_2);
float L3 = logf(tc->resistance_3);
#if EXTREME_TERM_LOGGING || defined(__DOXYGEN__)
// %.5f
scheduleMsg(logger, "R1=%..100000f/R2=%..100000f/R3=%..100000f", tc->resistance_1, tc->resistance_2,
scheduleMsg(logger, "R1=%.5f/R2=%.5f/R3=%.5f", tc->resistance_1, tc->resistance_2,
tc->resistance_3);
scheduleMsg(logger, "L1=%..100000f/L2=%..100000f/L3=%..100000f", L1, L2, L3);
scheduleMsg(logger, "L1=%.5f/L2=%.5f/L3=%.5f", L1, L2, L3);
#endif
float Y1 = 1 / T1;
@ -170,9 +168,9 @@ void ThermistorMath::prepareThermistorCurve(thermistor_conf_s *tc) {
s_h_a = Y1 - (s_h_b + L1 * L1 * s_h_c) * L1;
#if EXTREME_TERM_LOGGING || defined(__DOXYGEN__)
scheduleMsg(logger, "Y1=%..100000f/Y2=%..100000f/Y3=%..100000f", Y1, Y2, Y3);
scheduleMsg(logger, "U2=%..100000f/U3=%..100000f", U2, U3);
scheduleMsg(logger, "s_h_c=%..100000f/s_h_b=%..100000f/s_h_a=%..100000f", curve->s_h_c, curve->s_h_b,
scheduleMsg(logger, "Y1=%.5f/Y2=%.5f/Y3=%.5f", Y1, Y2, Y3);
scheduleMsg(logger, "U2=%.5f/U3=%.5f", U2, U3);
scheduleMsg(logger, "s_h_c=%.5f/s_h_b=%.5f/s_h_a=%.5f", curve->s_h_c, curve->s_h_b,
curve->s_h_a);
#endif
}

View File

@ -395,7 +395,7 @@ static void printThermistor(const char *msg, ThermistorConf *config, ThermistorM
tc->tempC_3, tc->resistance_3);
// %.5f
scheduleMsg(&logger, "bias resistor=%fK A=%..100000f B=%..100000f C=%..100000f", tc->bias_resistor / 1000,
scheduleMsg(&logger, "bias resistor=%fK A=%.5f B=%.5f C=%.5f", tc->bias_resistor / 1000,
tm->s_h_a, tm->s_h_b, tm->s_h_c);
scheduleMsg(&logger, "==============================");
}

View File

@ -161,22 +161,22 @@ void appendFloat(Logging *logging, float value, int precision) {
*/
switch (precision) {
case 1:
appendPrintf(logging, "%..10f", value);
appendPrintf(logging, "%.1f", value);
break;
case 2:
appendPrintf(logging, "%..100f", value);
appendPrintf(logging, "%.2f", value);
break;
case 3:
appendPrintf(logging, "%..1000f", value);
appendPrintf(logging, "%.3f", value);
break;
case 4:
appendPrintf(logging, "%..10000f", value); // %.4f
appendPrintf(logging, "%.4f", value);
break;
case 5:
appendPrintf(logging, "%..100000f", value); // %.5f
appendPrintf(logging, "%.5f", value);
break;
case 6:
appendPrintf(logging, "%..1000000f", value);
appendPrintf(logging, "%.6f", value);
break;
default: