Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/core/app_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "core/msp_displayport.h"
#include "core/osd.h"
#include "driver/dm5680.h"
#include "driver/lcd.h"
#include "driver/dm6302.h"
#include "driver/hardware.h"
#include "driver/it66121.h"
Expand Down Expand Up @@ -53,6 +54,10 @@ void app_switch_to_menu() {
IT66121_init();

system_script(REC_STOP_LIVE);

// Restore image settings from av module
LCD_Brightness(g_setting.image.oled);
Set_Contrast(g_setting.image.contrast);
}

void app_exit_menu() {
Expand All @@ -76,6 +81,12 @@ void app_exit_menu() {
void app_switch_to_analog(bool is_avin) {
Source_AV(is_avin);

// Solve LCD residual image
if (is_avin == 0) {
LCD_Brightness(7);
Set_Contrast(14);
}

dvr_update_vi_conf(VR_720P50);
osd_fhd(0);
osd_show(true);
Expand All @@ -93,6 +104,11 @@ void app_switch_to_analog(bool is_avin) {
}

void app_switch_to_hdmi_in() {

// Restore image settings from av module
LCD_Brightness(g_setting.image.oled);
Set_Contrast(g_setting.image.contrast);

Source_HDMI_in();
IT66121_close();
sleep(2);
Expand Down Expand Up @@ -127,6 +143,10 @@ void app_switch_to_hdmi_in() {
void app_switch_to_hdzero(bool is_default) {
int ch;

// Restore image settings from av module
LCD_Brightness(g_setting.image.oled);
Set_Contrast(g_setting.image.contrast);

if (is_default) {
ch = g_setting.scan.channel - 1;
} else {
Expand Down
12 changes: 10 additions & 2 deletions src/core/ht.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ static void detect_motion(bool is_moving) {
#endif
if (is_moving) {
// we got motion, turn oled back on, start over
LCD_Brightness(g_setting.image.oled);
if (g_source_info.source == SOURCE_AV_MODULE) {
LCD_Brightness(7);
} else {
LCD_Brightness(g_setting.image.oled);
}
state = OLED_MD_DETECTING;
cnt = 0;
}
Expand Down Expand Up @@ -137,7 +141,11 @@ static void detect_motion(bool is_moving) {
RTC6715_Open(1);
}
LOGI("OLED ON from protection.");
LCD_Brightness(g_setting.image.oled);
if (g_source_info.source == SOURCE_AV_MODULE) {
LCD_Brightness(7);
} else {
LCD_Brightness(g_setting.image.oled);
}
LCD_ON(1);
state = OLED_MD_DETECTING;
cnt = 0;
Expand Down