Fixed:formatting bug and cross compile.
This commit is contained in:
parent
dd0f1b0895
commit
93cb0f8573
|
@ -65,6 +65,6 @@ void FormattingState::FormattingThread(void)
|
||||||
IFilesManager::GetInstance()->UnInit();
|
IFilesManager::GetInstance()->UnInit();
|
||||||
IStorageManager::GetInstance()->FormatSDCardNow();
|
IStorageManager::GetInstance()->FormatSDCardNow();
|
||||||
// IFilesManager::GetInstance()->Init();
|
// IFilesManager::GetInstance()->Init();
|
||||||
MissionStateMachine::GetInstance()->SwitchState(SystemState::STORAGE_HANDLE_STATE);
|
MissionStateMachine::GetInstance()->SwitchState(SystemState::IDLE_STATE);
|
||||||
LogInfo("Formatting SD card done.\n");
|
LogInfo("Formatting SD card done.\n");
|
||||||
}
|
}
|
|
@ -147,8 +147,8 @@ void SdCardHal::DevDetectingThread(void)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// LogInfo("sdCardHal: %s is inserted.\n", SD_CARD_DEVICE);
|
// LogInfo("sdCardHal: %s is inserted.\n", SD_CARD_DEVICE);
|
||||||
if (SdCardHalStatus::INSERTED != mStatus && SdCardHalStatus::MOUNTED != mStatus &&
|
if (SdCardHalStatus::INSERTED != mStatus && SdCardHalStatus::MOUNTED != mStatus /* &&
|
||||||
SdCardHalStatus::UNMOUNTED != mStatus) {
|
SdCardHalStatus::UNMOUNTED != mStatus*/) {
|
||||||
mStatus = SdCardHalStatus::INSERTED;
|
mStatus = SdCardHalStatus::INSERTED;
|
||||||
ReportDetecedChangedResult(mStatus);
|
ReportDetecedChangedResult(mStatus);
|
||||||
}
|
}
|
||||||
|
@ -220,6 +220,8 @@ void SdCardHal::UnmountSdCard(void)
|
||||||
LogError("Format sd card failed [%s].\n", SD_CARD_DEVICE);
|
LogError("Format sd card failed [%s].\n", SD_CARD_DEVICE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
mStatus = SdCardHalStatus::UNMOUNTED;
|
||||||
|
ReportDetecedChangedResult(mStatus);
|
||||||
}
|
}
|
||||||
void SdCardHal::MountSdCard(void)
|
void SdCardHal::MountSdCard(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@ aux_source_directory(./src SRC_FILES)
|
||||||
set(TARGET_NAME MediaBase)
|
set(TARGET_NAME MediaBase)
|
||||||
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
|
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
|
||||||
|
|
||||||
target_link_libraries(${TARGET_NAME} avformat avcodec avutil swresample avdevice avfilter swscale postproc fdk-aac StatusCode Log)
|
target_link_libraries(${TARGET_NAME} LinuxApi avformat avcodec avutil swresample avdevice avfilter swscale postproc fdk-aac StatusCode Log)
|
||||||
if(${TARGET_PLATFORM} MATCHES ${DEFINE_LINUX})
|
if(${TARGET_PLATFORM} MATCHES ${DEFINE_LINUX})
|
||||||
target_link_libraries(${TARGET_NAME} z)
|
target_link_libraries(${TARGET_NAME} z)
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user