@@ -268,6 +268,11 @@ WiFiManagerParameter custom_sAF("sAF", "Acceleration times (0=real, 1=movie)", s
268268WiFiManagerParameter custom_sAF (" sAF" , " Real-life acceleration figures" , settings.speedoAF, 1 , " autocomplete='off' title='If unchecked, movie-like times are used' type='checkbox' style='margin-top:12px'" , WFM_LABEL_AFTER);
269269#endif // -------------------------------------------------
270270WiFiManagerParameter custom_speedoFact (" speFac" , " <br>Factor for real-life figures (0.5-5.0)" , settings.speedoFact, 3 , " type='number' min='0.5' max='5.0' step='0.5' title='1.0 means real-world DMC-12 acceleration time.' autocomplete='off'" );
271+ #ifdef TC_NOCHECKBOXES // --- Standard text boxes: -------
272+ WiFiManagerParameter custom_sL0 (" sL0" , " Display speed with leading 0 (0=no, 1=yes)" , settings.speedoL0Spd, 1 , " autocomplete='off'" );
273+ #else // -------------------- Checkbox hack: --------------
274+ WiFiManagerParameter custom_sL0 (" sL0" , " Display speed with leading 0" , settings.speedoL0Spd, 1 , " autocomplete='off' type='checkbox' style='margin-top:12px'" , WFM_LABEL_AFTER);
275+ #endif // -------------------------------------------------
271276#ifdef TC_HAVEGPS
272277#ifdef TC_NOCHECKBOXES // --- Standard text boxes: -------
273278WiFiManagerParameter custom_useGPSS (" uGPSS" , " Display GPS speed (0=no, 1=yes)" , settings.useGPSSpeed, 1 , " autocomplete='off' title='Enable to display actual GPS speed on speedo'" );
@@ -545,6 +550,7 @@ void wifi_setup()
545550 &custom_speedoBright,
546551 &custom_sAF,
547552 &custom_speedoFact,
553+ &custom_sL0,
548554 #ifdef TC_HAVEGPS
549555 &custom_useGPSS,
550556 &custom_updrt,
@@ -964,6 +970,7 @@ void wifi_loop()
964970
965971 #ifdef TC_HAVESPEEDO
966972 mystrcpy (settings.speedoAF , &custom_sAF);
973+ mystrcpy (settings.speedoL0Spd , &custom_sL0);
967974 #ifdef TC_HAVEGPS
968975 mystrcpy (settings.useGPSSpeed , &custom_useGPSS);
969976 #endif
@@ -1025,6 +1032,7 @@ void wifi_loop()
10251032
10261033 #ifdef TC_HAVESPEEDO
10271034 strcpyCB (settings.speedoAF , &custom_sAF);
1035+ strcpyCB (settings.speedoL0Spd , &custom_sL0);
10281036 #ifdef TC_HAVEGPS
10291037 strcpyCB (settings.useGPSSpeed , &custom_useGPSS);
10301038 #endif
@@ -1671,6 +1679,7 @@ void updateConfigPortalValues()
16711679 #endif
16721680 #ifdef TC_HAVESPEEDO
16731681 custom_sAF.setValue (settings.speedoAF , 1 );
1682+ custom_sL0.setValue (settings.speedoL0Spd , 1 );
16741683 #ifdef TC_HAVEGPS
16751684 custom_useGPSS.setValue (settings.useGPSSpeed , 1 );
16761685 #endif
@@ -1721,6 +1730,7 @@ void updateConfigPortalValues()
17211730 #endif
17221731 #ifdef TC_HAVESPEEDO
17231732 setCBVal (&custom_sAF, settings.speedoAF );
1733+ setCBVal (&custom_sL0, settings.speedoL0Spd );
17241734 #ifdef TC_HAVEGPS
17251735 setCBVal (&custom_useGPSS, settings.useGPSSpeed );
17261736 #endif
0 commit comments