File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -193,10 +193,13 @@ void menuSystem()
193
193
else
194
194
systemPrintln (" Off" );
195
195
196
- if (settings.shutdownNoChargeTimeout_s == 0 )
197
- systemPrintln (" c) Shutdown if not charging: Disabled" );
198
- else
199
- systemPrintf (" c) Shutdown if not charging after: %d seconds\r\n " , settings.shutdownNoChargeTimeout_s );
196
+ if (present.fuelgauge_max17048 || present.fuelgauge_bq40z50 || present.charger_mp2762a )
197
+ {
198
+ if (settings.shutdownNoChargeTimeout_s == 0 )
199
+ systemPrintln (" c) Shutdown if not charging: Disabled" );
200
+ else
201
+ systemPrintf (" c) Shutdown if not charging after: %d seconds\r\n " , settings.shutdownNoChargeTimeout_s );
202
+ }
200
203
201
204
systemPrintln (" d) Debug software" );
202
205
@@ -254,7 +257,7 @@ void menuSystem()
254
257
settings.bluetoothRadioType = BLUETOOTH_RADIO_SPP_AND_BLE;
255
258
bluetoothStart ();
256
259
}
257
- else if (incoming == ' c' )
260
+ else if (( incoming == ' c' ) && (present. fuelgauge_max17048 || present. fuelgauge_bq40z50 || present. charger_mp2762a ) )
258
261
{
259
262
getNewSetting (" Enter time in seconds to shutdown unit if not charging (0 to disable)" , 0 , 60 * 60 * 24 * 7 ,
260
263
&settings.shutdownNoChargeTimeout_s ); // Arbitrary 7 day limit
You can’t perform that action at this time.
0 commit comments