mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2024-12-14 12:08:40 +00:00
added on green sdcard load persistent settings
This commit is contained in:
parent
17250304e0
commit
7240d45a4f
@ -21,11 +21,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ui_sd_card_status_view.hpp"
|
#include "ui_sd_card_status_view.hpp"
|
||||||
|
#include "portapack_persistent_memory.hpp"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "bitmap.hpp"
|
#include "bitmap.hpp"
|
||||||
|
#include "file.hpp"
|
||||||
|
|
||||||
|
|
||||||
namespace ui {
|
namespace ui {
|
||||||
|
|
||||||
@ -72,7 +75,16 @@ const Color color_sd_card(const sd_card::Status status) {
|
|||||||
return color_sd_card_unknown;
|
return color_sd_card_unknown;
|
||||||
|
|
||||||
case sd_card::Status::Mounted:
|
case sd_card::Status::Mounted:
|
||||||
|
{
|
||||||
|
File pmem_flag_file_handle ;
|
||||||
|
std::string pmem_flag_file = "/SETTINGS/PMEM_FILEFLAG" ;
|
||||||
|
auto result = pmem_flag_file_handle.open(pmem_flag_file);
|
||||||
|
if(!result.is_valid())
|
||||||
|
{
|
||||||
|
portapack::persistent_memory::load_persistent_settings_from_file("SETTINGS/pmem_settings");
|
||||||
|
}
|
||||||
return color_sd_card_ok;
|
return color_sd_card_ok;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return color_sd_card_unknown;
|
return color_sd_card_unknown;
|
||||||
|
Loading…
Reference in New Issue
Block a user