ENH:Support more SD card states

jira:[for sdcard]

Change-Id: Ic09198a0ed357f827768ed2f8d8a9ed6266f749f
(cherry picked from commit c877405caba2b75c515c814b7aaa0793200eee04)
This commit is contained in:
tao wang
2024-11-29 19:31:06 +08:00
committed by Noisyfox
parent f970bf8160
commit 54748aee1c
9 changed files with 59 additions and 69 deletions

View File

@@ -1026,7 +1026,7 @@ wxBoxSizer *StatusBasePanel::create_monitoring_page()
});
m_camera_switch_button->Hide();
m_bitmap_sdcard_img->SetToolTip(_L("SD Card"));
m_bitmap_sdcard_img->SetToolTip(_L("Storage"));
m_bitmap_timelapse_img->SetToolTip(_L("Timelapse"));
m_bitmap_recording_img->SetToolTip(_L("Video"));
m_bitmap_vcamera_img->SetToolTip(_L("Go Live"));
@@ -1635,16 +1635,16 @@ void StatusPanel::update_camera_state(MachineObject* obj)
if (m_last_sdcard != (int)obj->get_sdcard_state()) {
if (obj->get_sdcard_state() == MachineObject::SdcardState::NO_SDCARD) {
m_bitmap_sdcard_img->SetBitmap(m_bitmap_sdcard_state_no.bmp());
m_bitmap_sdcard_img->SetToolTip(_L("No SD Card"));
m_bitmap_sdcard_img->SetToolTip(_L("No Storage"));
} else if (obj->get_sdcard_state() == MachineObject::SdcardState::HAS_SDCARD_NORMAL) {
m_bitmap_sdcard_img->SetBitmap(m_bitmap_sdcard_state_normal.bmp());
m_bitmap_sdcard_img->SetToolTip(_L("SD Card"));
m_bitmap_sdcard_img->SetToolTip(_L("Storage"));
} else if (obj->get_sdcard_state() == MachineObject::SdcardState::HAS_SDCARD_ABNORMAL) {
m_bitmap_sdcard_img->SetBitmap(m_bitmap_sdcard_state_abnormal.bmp());
m_bitmap_sdcard_img->SetToolTip(_L("SD Card Abnormal"));
m_bitmap_sdcard_img->SetToolTip(_L("Storage Abnormal"));
} else {
m_bitmap_sdcard_img->SetBitmap(m_bitmap_sdcard_state_normal.bmp());
m_bitmap_sdcard_img->SetToolTip(_L("SD Card"));
m_bitmap_sdcard_img->SetToolTip(_L("Storage"));
}
m_last_sdcard = (int)obj->get_sdcard_state();
}