add file browser to movement, remove old app

This commit is contained in:
Joey Castillo
2022-05-09 13:01:12 -04:00
parent 22b1ac0283
commit e71a70d231
5 changed files with 5 additions and 234 deletions

View File

@@ -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;

View File

@@ -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;