Skip to content

Commit 0ce1e4e

Browse files
committed
temorary deactivate_flash switch
1 parent 85f7d03 commit 0ce1e4e

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/ArduinoOcpp/Core/Configuration.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,7 @@ std::shared_ptr<LinkedList<std::shared_ptr<AbstractConfiguration>>> getAllConfig
749749
}
750750

751751
bool configuration_init() {
752+
#ifndef AO_DEACTIVATE_FLASH
752753
SPIFFSConfig cfg;
753754
cfg.setAutoFormat(true);
754755
SPIFFS.setConfig(cfg);
@@ -884,10 +885,12 @@ bool configuration_init() {
884885
file.close();
885886

886887
Serial.println(F("[Configuration] Initialization successful\n"));
888+
#endif //ndef AO_DEACTIVATE_FLASH
887889
return true;
888890
}
889891

890892
bool configuration_save() {
893+
#ifndef AO_DEACTIVATE_FLASH
891894

892895
SPIFFS.remove(CONFIGURATION_FN);
893896

@@ -942,6 +945,7 @@ bool configuration_save() {
942945
file.close();
943946
Serial.print(F("[Configuration] Saving config successful\n"));
944947

948+
#endif //ndef AO_DEACTIVATE_FLASH
945949
return true;
946950
}
947951

src/ArduinoOcpp/Tasks/SmartCharging/SmartChargingService.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ ChargingProfile *SmartChargingService::updateProfileStack(JsonObject *json){
261261
}
262262

263263
bool SmartChargingService::writeProfileToFlash(JsonObject *json, ChargingProfile *chargingProfile) {
264+
#ifndef AO_DEACTIVATE_FLASH
264265

265266
String profileFN = PROFILE_FN_PREFIX;
266267

@@ -311,11 +312,12 @@ bool SmartChargingService::writeProfileToFlash(JsonObject *json, ChargingProfile
311312
// END DEBUG
312313
}
313314

315+
#endif //ndef AO_DEACTIVATE_FLASH
314316
return true;
315317
}
316318

317319
bool SmartChargingService::loadProfiles() {
318-
320+
#ifndef AO_DEACTIVATE_FLASH
319321
const int N_PURPOSES = 3;
320322
ChargingProfilePurposeType purposes[N_PURPOSES] = {ChargingProfilePurposeType::ChargePointMaxProfile, ChargingProfilePurposeType::TxDefaultProfile, ChargingProfilePurposeType::TxProfile};
321323

@@ -425,5 +427,6 @@ bool SmartChargingService::loadProfiles() {
425427
}
426428
}
427429

430+
#endif //ndef AO_DEACTIVATE_FLASH
428431
return true;
429432
}

0 commit comments

Comments
 (0)