add file browser to movement, remove old app
This commit is contained in:
@@ -117,9 +117,11 @@ bool filesystem_init(void) {
|
||||
// reformat if we can't mount the filesystem
|
||||
// this should only happen on the first boot
|
||||
if (err) {
|
||||
printf("Ignore that error! Formatting filesystem...\n");
|
||||
err = lfs_format(&lfs, &cfg);
|
||||
if (err) return false;
|
||||
err = lfs_mount(&lfs, &cfg) == LFS_ERR_OK;
|
||||
printf("Filesystem mounted with %d bytes free.\n", filesystem_get_free_space());
|
||||
}
|
||||
|
||||
return err == LFS_ERR_OK;
|
||||
|
||||
@@ -254,6 +254,8 @@ void app_init(void) {
|
||||
movement_state.next_available_backup_register = 4;
|
||||
_movement_reset_inactivity_countdown();
|
||||
|
||||
filesystem_init();
|
||||
|
||||
#if __EMSCRIPTEN__
|
||||
int32_t time_zone_offset = EM_ASM_INT({
|
||||
return -new Date().getTimezoneOffset();
|
||||
@@ -450,7 +452,7 @@ bool app_loop(void) {
|
||||
#else
|
||||
read(0, line, 256);
|
||||
#endif
|
||||
if (strlen(line)) printf(line);
|
||||
if (strlen(line)) filesystem_process_command(line);
|
||||
}
|
||||
|
||||
event.subsecond = 0;
|
||||
|
||||
Reference in New Issue
Block a user