Skip to content

Commit

Permalink
Fixe dpotential issue with corrupted JSON - maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
ste2425 committed Dec 6, 2024
1 parent 24eca68 commit a4f9acc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions software/src/bt_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ static int att_write_callback(hci_con_handle_t con_handle,
switch (att_handle) {
// save controller mappings
case ATT_CHARACTERISTIC_4627C4A4_AC03_46B9_B688_AFC5C1BF7F63_01_VALUE_HANDLE: {
FileUtility::deleteFile(LittleFS, "/mapping.json");
FileUtility::writeFile(LittleFS, "/mapping.json", (const char*)buffer);

reloadControllerMappings();
Expand Down

0 comments on commit a4f9acc

Please sign in to comment.